Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
include versioneer.py
include hed/_version.py
include requirements.txt
8 changes: 4 additions & 4 deletions RELEASE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ git push origin main

### 2. Create GitHub release

The project uses [versioneer](https://github.com/python-versioneer/python-versioneer) for version management, which automatically derives the version from git tags. We'll create the release tag and release directly on GitHub.
The project uses [setuptools-scm](https://github.com/pypa/setuptools_scm) for version management, which automatically derives the version from git tags. We'll create the release tag and release directly on GitHub.

#### 2.1 Navigate to create release

Expand Down Expand Up @@ -538,8 +538,8 @@ git fetch upstream --tags
# Verify tag exists
git tag -l

# Check versioneer can find it
python -c "import hed._version; print(hed._version.get_versions())"
# Check setuptools-scm can find the version
python -m setuptools_scm
```

#### Issue: Build fails with "No module named X"
Expand Down Expand Up @@ -703,7 +703,7 @@ python -m twine upload dist/* # Upload
## Additional Resources

- [Python Packaging Guide](https://packaging.python.org/)
- [Versioneer Documentation](https://github.com/python-versioneer/python-versioneer)
- [setuptools-scm Documentation](https://github.com/pypa/setuptools_scm)
- [PyPI Help](https://pypi.org/help/)
- [Semantic Versioning](https://semver.org/)
- [HED Documentation](https://www.hedtags.org/)
Expand Down
12 changes: 9 additions & 3 deletions hed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@
from hed.schema.hed_schema_group import HedSchemaGroup
from hed.schema.hed_schema_io import load_schema, load_schema_version

try:
from hed._version import __version__
except ImportError:
# Version file not generated yet (editable install without build)
from importlib.metadata import version, PackageNotFoundError

from . import _version

__version__ = _version.get_versions()["version"]
try:
__version__ = version("hedtools")
except PackageNotFoundError:
__version__ = "unknown"
Loading