File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
2+
3+ # These owners will be the default owners for everything in
4+ # the repo. Unless a later match takes precedence,
5+
6+ * @ nocollier
7+ * @ mgrover1
Original file line number Diff line number Diff line change 1+ name : Publish intake-esgf to PyPI
2+
3+ on :
4+ release :
5+ types :
6+ - published
7+
8+ jobs :
9+ deploy :
10+ if : github.repository == 'esgf2-us/intake-esgf'
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ - name : Set up Python
15+ uses : actions/setup-python@v5
16+ with :
17+ python-version : " 3.x"
18+ - name : Install dependencies
19+ run : |
20+ python -m pip install --upgrade pip
21+ python -m pip install setuptools setuptools-scm wheel twine check-manifest
22+ - name : Build tarball and wheels
23+ run : |
24+ git clean -xdf
25+ git restore -SW .
26+ python -m build --sdist --wheel .
27+ - name : Test the artifacts
28+ run : |
29+ python -m twine check dist/*
30+ - name : Publish package to PyPI
31+ uses : pypa/gh-action-pypi-publish@v1.8.11
32+ with :
33+ user : __token__
34+ password : ${{ secrets.PYPI_TOKEN }}
35+ verbose : true
Original file line number Diff line number Diff line change 33import warnings
44
55import xarray as xr
6+ from pkg_resources import DistributionNotFound , get_distribution
67
78warnings .simplefilter ("ignore" , category = xr .SerializationWarning )
89
@@ -26,3 +27,8 @@ def in_notebook() -> bool:
2627from intake_esgf .catalog import ESGFCatalog # noqa
2728
2829__all__ = ["ESGFCatalog" , "IN_NOTEBOOK" ]
30+
31+ try :
32+ __version__ = get_distribution (__name__ ).version
33+ except DistributionNotFound : # pragma: no cover
34+ __version__ = "0.0.0" # pragma: no cover
Original file line number Diff line number Diff line change 11# https://snarky.ca/what-the-heck-is-pyproject-toml/
22
33[build-system ]
4- requires = [" setuptools" ]
4+ requires = [" setuptools" , " setuptools_scm " , " wheel " ]
55build-backend = " setuptools.build_meta"
66
7+ [tool .setuptools_scm ]
8+ version_scheme = " no-guess-dev"
9+
710[tool .coverage .run ]
811omit = [" */intake_esgf/tests/*" ]
912
You can’t perform that action at this time.
0 commit comments