Skip to content

Commit

Permalink
Publish version as bluepysnap.__version__ (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaFicarelli committed May 24, 2023
1 parent 8116e29 commit bb2f9e1
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ venv/
.ipynb_checkpoints/
.idea/
.vscode
bluepysnap/_version.py
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
Changelog
=========

Version v1.0.6
--------------

Improvements
~~~~~~~~~~~~
- Clarification for partial circuit configs
- Publish version as ``bluepysnap.__version__``

Version v1.0.5
--------------
Expand Down
5 changes: 5 additions & 0 deletions bluepysnap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@
from bluepysnap.config import Config
from bluepysnap.exceptions import BluepySnapError
from bluepysnap.simulation import Simulation

try:
from bluepysnap._version import version as __version__
except ImportError: # pragma: no cover
__version__ = "unknown"
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ known_local_folder = [
'test_module',
]

[tool.pylint.main]
# Files or directories to be skipped. They should be base names, not paths.
ignore = ["CVS", "_version.py"]

[tool.pylint.messages_control]
disable = [
'fixme',
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def __init__(self, *args, **kwargs):
package_data={
"bluepysnap": ["schemas/*.yaml", "schemas/*/*.yaml"],
},
use_scm_version=True,
use_scm_version={
"write_to": "bluepysnap/_version.py",
},
setup_requires=[
"setuptools_scm",
],
Expand Down
9 changes: 9 additions & 0 deletions tests/test_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import bluepysnap as test_module


def test_version():
result = test_module.__version__

assert isinstance(result, str)
assert len(result) > 0
assert result[0].isdigit()

0 comments on commit bb2f9e1

Please sign in to comment.