Skip to content

Commit

Permalink
Fix documentation release and version tag (#40)
Browse files Browse the repository at this point in the history
* Take version from package metadata

* Update API docs
  • Loading branch information
jmyrberg authored Nov 14, 2022
1 parent 6d8c878 commit ff92d28
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
import os
import sys

from setuptools_scm import get_version
from importlib.metadata import version


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

Expand All @@ -25,9 +26,8 @@
author = 'Jesse Myrberg'

# The full version, including alpha/beta/rc tags
release = get_version('../../')
if '+' in release:
release = release.split('+')[0]
release = version('mknapsack')
version = '.'.join(release.split('.')[:2])


# -- General configuration ---------------------------------------------------
Expand Down
8 changes: 8 additions & 0 deletions docs/source/mknapsack.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
mknapsack package
=================

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

.. toctree::
:maxdepth: 4

mknapsack.tests

Module contents
---------------

Expand Down
93 changes: 93 additions & 0 deletions docs/source/mknapsack.tests.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
mknapsack.tests package
=======================

Submodules
----------

mknapsack.tests.test\_\_bin\_packing module
-------------------------------------------

.. automodule:: mknapsack.tests.test__bin_packing
:members:
:undoc-members:
:show-inheritance:

mknapsack.tests.test\_\_bounded module
--------------------------------------

.. automodule:: mknapsack.tests.test__bounded
:members:
:undoc-members:
:show-inheritance:

mknapsack.tests.test\_\_bounded\_change\_making module
------------------------------------------------------

.. automodule:: mknapsack.tests.test__bounded_change_making
:members:
:undoc-members:
:show-inheritance:

mknapsack.tests.test\_\_change\_making module
---------------------------------------------

.. automodule:: mknapsack.tests.test__change_making
:members:
:undoc-members:
:show-inheritance:

mknapsack.tests.test\_\_generalized\_assignment module
------------------------------------------------------

.. automodule:: mknapsack.tests.test__generalized_assignment
:members:
:undoc-members:
:show-inheritance:

mknapsack.tests.test\_\_multiple module
---------------------------------------

.. automodule:: mknapsack.tests.test__multiple
:members:
:undoc-members:
:show-inheritance:

mknapsack.tests.test\_\_single module
-------------------------------------

.. automodule:: mknapsack.tests.test__single
:members:
:undoc-members:
:show-inheritance:

mknapsack.tests.test\_\_subset\_sum module
------------------------------------------

.. automodule:: mknapsack.tests.test__subset_sum
:members:
:undoc-members:
:show-inheritance:

mknapsack.tests.test\_\_unbounded module
----------------------------------------

.. automodule:: mknapsack.tests.test__unbounded
:members:
:undoc-members:
:show-inheritance:

mknapsack.tests.utils module
----------------------------

.. automodule:: mknapsack.tests.utils
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: mknapsack.tests
:members:
:undoc-members:
:show-inheritance:

0 comments on commit ff92d28

Please sign in to comment.