Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT: Update ACT to use setuptools-scm #869

Merged
merged 10 commits into from
Oct 31, 2024
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
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