Skip to content

Commit

Permalink
use_scm_version and write version to package dist (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
manzt authored Aug 22, 2022
1 parent 18ce7fb commit 3aa512f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ __pycache__/
build/
dist/
test_notebooks/
gosling/_version.py

.ipynb_checkpoints
Untitled*.ipynb
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,6 @@ python tools/generate_schema_wrapper.py

```bash
git checkout main && git pull
```

Update version in `setup.cfg` and `doc/conf.py`:

```bash
git add setup.cfg doc/conf.py
git commit -m "v0.[minor].[patch]"
git tag -a v0.[minor].[patch] -m "v0.[minor].[patch]"
git push --follow-tags
Expand Down
3 changes: 2 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import sys
import os
from setuptools_scm import get_version

sys.path.insert(0, os.path.abspath(".."))

Expand Down Expand Up @@ -34,7 +35,7 @@
copyright = "2021, Trevor Manz"
author = "Trevor Manz"

version = "0.0.11"
version = get_version(root="..", relative_to=__file__)
release = version

todo_include_todos = False
Expand Down
5 changes: 5 additions & 0 deletions gosling/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
try:
from ._version import version as __version__
except ImportError:
__version__ = "unknown"

import pandas as pd

from gosling.schema import *
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[metadata]
name = gosling
version = 0.0.11
author = Trevor Manz
author_email = [email protected]
license = MIT
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from setuptools import setup

if __name__ == "__main__":
setup()
setup(use_scm_version={ "write_to": "gosling/_version.py" })

0 comments on commit 3aa512f

Please sign in to comment.