Skip to content

Commit

Permalink
use versioneer for version management (#88)
Browse files Browse the repository at this point in the history
- fix #87
- user versioneer for version management
   - use tag "vMAJOR.MINOR.PATCH" to indicate release number
   - exclude generated files from coverage;
      also exclude tests from coverage reporting;
      allow use of "# pragma: no cover" to exclude lines of code
      from coverage
   - configure coverage with entries in setup.cfg (removed
      commandline config from workflows/python-package.yml)
- related doc updates
   - make docs automatically use current version
      (docs use versioneer-based propka.__version__)
   - also added @IAlibay to authors (forgotten in previous
      PRs #84 and #85)
   - generate a sitemap (add sphinx_sitemap to requirements.txt)
- add test_version
   Note: Versioneer-generated version is “0-untagged” on the branch where
   it is tested so need to add it to a valid result.
  • Loading branch information
orbeckst authored Jul 18, 2020
1 parent 7563a70 commit cb65c64
Show file tree
Hide file tree
Showing 11 changed files with 2,396 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
propka/_version.py export-subst
3 changes: 2 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest and coverage
run: |
coverage run --source=propka -m pytest
# configure coverage with entries in setup.cfg
coverage run -m pytest
coverage report -m | tee coverage.txt
coverage html
- name: Upload coverage to https://codecov.io/gh/jensengroup/propka
Expand Down
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
include README.md INSTALL
include setup.py
include setup.py setup.cfg
include propka.cfg

include versioneer.py
include propka/_version.py
13 changes: 8 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
# -- Project information -----------------------------------------------------

project = 'PROPKA 3'
copyright = '2020, Jan H. Jensen, Chresten R. Søndergaard, Mats H. M. Olsson, Michał Rostkowski, Nathan A. Baker, Matvey Adzhigirey, Oliver Beckstein, Jimmy Charnley Kromann, Mike Beachy, Toni G, Thomas Holder'
author = 'Jan H. Jensen, Chresten R. Søndergaard, Mats H. M. Olsson, Michał Rostkowski, Nathan A. Baker, Matvey Adzhigirey, Oliver Beckstein, Jimmy Charnley Kromann, Mike Beachy, Toni G, Thomas Holder'
author = ('Jan H. Jensen, Chresten R. Søndergaard, Mats H. M. Olsson, '
'Michał Rostkowski, Nathan A. Baker, Matvey Adzhigirey, '
'Oliver Beckstein, Jimmy Charnley Kromann, Mike Beachy, '
'Toni G, Thomas Holder, Irfan Alibay')
copyright = '2020, ' + author

# The full version, including alpha/beta/rc tags
release = '3.2.0'
release = __import__('propka').__version__


# -- General configuration ---------------------------------------------------
Expand All @@ -39,14 +42,14 @@
'sphinx.ext.mathjax', 'sphinx.ext.viewcode',
'sphinx.ext.napoleon', 'sphinx.ext.todo',
'sphinx.ext.autosummary',
## 'sphinx_sitemap',
'sphinx_sitemap',
'sphinx_rtd_theme']

mathjax_path = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML'

# for sitemap with https://github.com/jdillard/sphinx-sitemap
# change if we put it under a custom domain; for right now, assume RTD
##site_url = "https://propka.readthedocs.io"
site_url = "https://propka.readthedocs.io"

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
4 changes: 4 additions & 0 deletions propka/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@
"hybrid36", "iterative", "input", "lib", "ligand_pka_values",
"ligand", "molecular_container", "output", "parameters",
"protonate", "run", "vector_algebra", "version"]

from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
Loading

0 comments on commit cb65c64

Please sign in to comment.