Skip to content

Commit

Permalink
Updated tests and added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemellophone committed Jul 9, 2020
1 parent 2d87b5a commit 1b04644
Show file tree
Hide file tree
Showing 114 changed files with 16,081 additions and 5,808 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

- name: Build wheel
env:
CIBW_MANYLINUX_X86_64_IMAGE: wildme/manylinux:opencv-4.2.0
CIBW_MANYLINUX_X86_64_IMAGE: wildme/manylinux:opencv-3.4.10
CIBW_SKIP: cp27-* pp27-* pp36-* *-win32 *-win_amd64 *-manylinux_i686 *-manylinux_aarch64 *-manylinux_ppc64le *-manylinux_s390x
CIBW_BEFORE_BUILD_LINUX: bash scripts/ci_prepare_centos_for_build.sh
CIBW_BEFORE_BUILD_MACOS: bash scripts/ci_prepare_macos_for_build.sh
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ cmake_builds

# setuptools_scm version discovery writes the version to <pkg>/_version.py
**/_version.py

_docs/_build
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: |
(?x)(
^docs/ |
^_docs/_build/html/
)
repos:
# - repo: https://github.com/psf/black
# rev: stable
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ if(OS_IS_MACOS)
endif()
endif()

find_package(OpenCV REQUIRED)
find_package(OpenCV 3.4 REQUIRED)
if(OpenCV_FOUND)
include_directories(${OpenCV_INCLUDE_DIR})
include_directories(${OpenCV_INCLUDE_DIRS})
else()
message(FATAL_ERROR "OpenCV NOT found")
endif()
Expand Down
21 changes: 15 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
|Travis| |Pypi|
======================
Wildbook IA - PyHesaff
======================

|Build| |Pypi| |ReadTheDocs|

Hessian Affine + SIFT keypoints in Python
=========================================
Hessian Affine + SIFT keypoints in Python! - Part of the WildMe / Wildbook IA Project.

This is an implementation of Hessian-Affine detector.

Expand Down Expand Up @@ -71,7 +73,14 @@ NOTES
Requires opencv. On ubuntu you can: ``sudo apt-get install libopencv-dev``. You can also build / use wheels. If cmake is unable to find OpenCV, manually set the location of OpenCV to the OpenCV_DIR environment variable


.. |Travis| image:: https://img.shields.io/travis/WildbookOrg/hesaff/master.svg?label=Travis%20CI
:target: https://travis-ci.org/WildbookOrg/hesaff?branch=master
.. |Pypi| image:: https://img.shields.io/pypi/v/hesaff.svg
.. |Build| image:: https://img.shields.io/github/workflow/status/WildbookOrg/wbia-tpl-pyhesaff/Build%20and%20upload%20to%20PyPI/master
:target: https://github.com/WildbookOrg/wbia-tpl-pyhesaff/actions?query=branch%3Amaster+workflow%3A%22Build+and+upload+to+PyPI%22
:alt: Build and upload to PyPI (master)

.. |Pypi| image:: https://img.shields.io/pypi/v/wbia-pyhesaff.svg
:target: https://pypi.python.org/pypi/wbia-pyhesaff
:alt: Latest PyPI version

.. |ReadTheDocs| image:: https://readthedocs.org/projects/wbia-tpl-pyhesaff/badge/?version=latest
:target: http://wbia-tpl-pyhesaff.readthedocs.io/en/latest/
:alt: Documentation on ReadTheDocs
19 changes: 19 additions & 0 deletions _docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
74 changes: 74 additions & 0 deletions _docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# -*- coding: utf-8 -*-
from sphinx.ext.autodoc import between
import alabaster # NOQA
import sys
import os

sys.path.append(sys.path.insert(0, os.path.abspath('../')))

autosummary_generate = True

modindex_common_prefix = ['_']

master_doc = 'index'

html_theme = 'alabaster'

html_sidebars = {
'**': [
'about.html',
'navigation.html',
'relations.html',
'searchbox.html',
'donate.html',
]
}

# -- Project information -----------------------------------------------------

project = 'wbia-pyhesaff'
copyright = '2020, Wild Me'
author = 'Krystian Mikolajczyk, Michal Perdoch, Jon Crall, Avi Weinstock, WildMe Developers'

# The short X.Y version
version = '3.1.0'

# The full version, including alpha/beta/rc tags
release = '3.1.0'


# -- General configuration ---------------------------------------------------

MOCK_MODULES = []
if len(MOCK_MODULES) > 0:
import mock

for mod_name in MOCK_MODULES:
sys.modules[mod_name] = mock.Mock()

extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
# For LaTeX
'sphinx.ext.imgmath',
# For Google Sytle Docstrs
# https://pypi.python.org/pypi/sphinxcontrib-napoleon
'sphinx.ext.napoleon',
'alabaster',
]


# -- Extension configuration -------------------------------------------------

# -- Options for todo extension ----------------------------------------------

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True


def setup(app):
# Register a sphinx.ext.autodoc.between listener to ignore everything
# between lines that contain the word IGNORE
app.connect('autodoc-process-docstring', between('^.*IGNORE.*$', exclude=True))
return app
5 changes: 2 additions & 3 deletions dev/_grave/_page/_sources/index.txt → _docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
.. pyhesaff documentation master file, created by
sphinx-quickstart on Thu Oct 9 15:14:26 2014.
sphinx-quickstart on Wed Jul 8 16:17:41 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to pyhesaff's documentation!
====================================

Contents:

.. toctree::
:maxdepth: 8
:caption: Contents:

pyhesaff

Expand Down
35 changes: 35 additions & 0 deletions _docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd
23 changes: 12 additions & 11 deletions dev/_grave/_page/_sources/pyhesaff.txt → _docs/pyhesaff.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
pyhesaff package
================

Subpackages
-----------

.. toctree::

pyhesaff.tests

Submodules
----------

pyhesaff._pyhesaff module
-------------------------
pyhesaff.\_\_main\_\_ module
----------------------------

.. automodule:: pyhesaff.__main__
:members:
:undoc-members:
:show-inheritance:

pyhesaff.\_pyhesaff module
--------------------------

.. automodule:: pyhesaff._pyhesaff
:members:
:undoc-members:
:show-inheritance:

pyhesaff.ctypes_interface module
--------------------------------
pyhesaff.ctypes\_interface module
---------------------------------

.. automodule:: pyhesaff.ctypes_interface
:members:
Expand Down
8 changes: 8 additions & 0 deletions build_documentation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# python -m utool.util_setup --exec-autogen_sphinx_apidoc --nomake

make -C _docs html
rm -rf docs/
mkdir -p docs/
cp -r _docs/_build/html/* docs/
touch docs/.nojekyll
27 changes: 0 additions & 27 deletions dev/_grave/Dockerfile

This file was deleted.

2 changes: 0 additions & 2 deletions dev/_grave/Makefile

This file was deleted.

Loading

0 comments on commit 1b04644

Please sign in to comment.