Skip to content

Commit 0cf2098

Browse files
authored
Merge pull request #23 from kthyng/fix_ci
Fix CI
2 parents 27c07f0 + ca17637 commit 0cf2098

File tree

6 files changed

+22
-16
lines changed

6 files changed

+22
-16
lines changed

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/setup-python@v4
1313
- name: Install dependencies
1414
run: |
15-
python -m pip install -U pip wheel setuptools setuptools-scm twine
15+
python -m pip install -U pip wheel "setuptools<66.0.0" setuptools-scm twine
1616
- name: Build distributions
1717
run: python setup.py sdist bdist_wheel
1818

.github/workflows/test.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment-py${{ matrix.python-version }}.yml') }}
3131
- uses: conda-incubator/setup-miniconda@v2
3232
with:
33-
mamba-version: "*" # activate this to build with mamba.
33+
python-version: ${{ matrix.python-version }}
34+
miniforge-variant: Mambaforge
3435
channels: conda-forge, defaults # These need to be specified to use mamba
3536
# channel-priority: true
3637
environment-file: ci/environment-py${{ matrix.python-version }}.yml

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929
args: [--max-line-length=105, --ignore=E203,E501,W503, --select=select=C,E,F,W,B,B950]
3030

3131
- repo: https://github.com/pycqa/isort
32-
rev: 5.8.0
32+
rev: 5.12.0
3333
hooks:
3434
- id: isort
3535
name: isort (python)

cf_pandas/__init__.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
cf-pandas: an accessor for pandas objects that interprets CF attributes
33
"""
44

5-
from pkg_resources import DistributionNotFound, get_distribution
5+
from importlib.metadata import PackageNotFoundError, version
66

77
from .accessor import CFAccessor # noqa
88
from .options import set_options # noqa
@@ -12,7 +12,7 @@
1212
from .widget import Selector, dropdown
1313

1414
try:
15-
__version__ = get_distribution("cf-pandas").version
16-
except DistributionNotFound:
15+
__version__ = version("cf-pandas")
16+
except PackageNotFoundError:
1717
# package is not installed
18-
__version__ = "unknown"
18+
pass

docs/conf.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# |version| and |release|, also used in various other places throughout the
1919
# built documents.
2020
# see https://pypi.org/project/setuptools-scm/ for details
21-
from pkg_resources import get_distribution
21+
from importlib.metadata import version as imversion
2222

2323
print("python exec:", sys.executable)
2424
print("sys.path:", sys.path)
@@ -31,10 +31,10 @@
3131
# -- Project information -----------------------------------------------------
3232

3333
project = "cf-pandas"
34-
copyright = "2022, Axiom Data Science"
34+
copyright = "2022–2023, Axiom Data Science"
3535
author = "Axiom Data Science"
3636

37-
release = get_distribution("cf_pandas").version
37+
release = imversion("cf-pandas")
3838
# for example take major/minor
3939
version = ".".join(release.split(".")[:2])
4040

docs/index.rst

+11-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ Welcome to cf-pandas's documentation!
99
Installation
1010
------------
1111

12+
To install from conda-forge:
13+
14+
>>> conda install -c conda-forge cf_pandas
15+
1216
To install from PyPI:
17+
1318
>>> pip install cf-pandas
1419

1520

@@ -27,11 +32,11 @@ To install from PyPI:
2732

2833

2934

30-
Indices and tables
31-
==================
35+
.. Indices and tables
36+
.. ==================
3237
33-
* :ref:`genindex`
34-
* :ref:`modindex`
35-
* :ref:`search`
38+
.. * :ref:`genindex`
39+
.. * :ref:`modindex`
40+
.. * :ref:`search`
3641
37-
.. _reStructuredText: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
42+
.. .. _reStructuredText: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html

0 commit comments

Comments
 (0)