Skip to content

Commit

Permalink
MNT: Update ACT to use setuptools-scm (#869)
Browse files Browse the repository at this point in the history
* CI: Update tile image.

* MNT: Update ACT to use setuptools-scm.

* FIX: Remove more versioneer.py.

* FIX: More versioneer removal.

* MNT: Attempted fix.

* CI: Remove setuptools-scm from build.

* Testing.

* FIX: Add missing git fetch to get version history.
  • Loading branch information
zssherman authored Oct 31, 2024
1 parent 849e4ec commit baa24dc
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 2,435 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
environment-name: act-docs
cache-downloads: true

- name: Fetch all history for all tags and branches
run: |
git fetch --prune --unshallow
- name: Install ACT
run: |
pip install -e . --no-deps --force-reinstall
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
environment-name: act_env
micromamba-version: 1.5.10-0

- name: Fetch all history for all tags and branches
run: |
git fetch --prune --unshallow
- name: Install ACT
run: |
python -m pip install -e . --no-deps --force-reinstall
Expand Down
13 changes: 8 additions & 5 deletions act/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"""

import importlib.metadata as _importlib_metadata

import lazy_loader as lazy

# No more pandas warnings
from pandas.plotting import register_matplotlib_converters

from ._version import get_versions

register_matplotlib_converters()

# Import early so these classes are available to the object
Expand All @@ -29,6 +29,9 @@
]
__getattr__, __dir__, _ = lazy.attach(__name__, submodules)

# Version for source builds
vdict = get_versions()
__version__ = vdict['version']
# Get the version
try:
__version__ = _importlib_metadata.version("act-atmos")
except _importlib_metadata.PackageNotFoundError:
# package is not installed
__version__ = "0.0.0"
Loading

0 comments on commit baa24dc

Please sign in to comment.