Skip to content

Commit

Permalink
Merge pull request #1648 from zacharyburnett/build/fix_build_workflow
Browse files Browse the repository at this point in the history
retrieve version from package
  • Loading branch information
mfixstsci authored Jan 22, 2025
2 parents c1ed93e + 2b119a0 commit 1c3ed1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ jobs:
- run: pip install .
- run: pip list
- id: version
uses: mtkennerly/dunamai-action@v1
with:
args: --strict --pattern "default-unprefixed" --style semver
name: retrieve package version
run: echo version=$(python -c "import jwql; print(jwql.__version__)") >> $GITHUB_OUTPUT
- id: filename
run: echo "filename=jwql_${{ steps.version.outputs.version }}_conda_${{ runner.os }}_${{ runner.arch }}_py${{ matrix.python-version }}.yml" >> $GITHUB_OUTPUT
- run: conda env export --no-build | grep -v "name:" | grep -v "prefix:" > ${{ steps.filename.outputs.filename }}
Expand Down
4 changes: 3 additions & 1 deletion jwql/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import warnings
from importlib.metadata import version

from jwql.utils import utils

__version__ = version('jwql')
Expand All @@ -10,4 +12,4 @@
f"while JWQL is using {__version__}")

except FileNotFoundError:
print('Could not determine jwql config version')
warnings.warn('Could not determine jwql config version')

0 comments on commit 1c3ed1c

Please sign in to comment.