Skip to content

Commit

Permalink
Merge pull request #23 from kthyng/fix_ci
Browse files Browse the repository at this point in the history
Fix CI
  • Loading branch information
kthyng authored Jan 31, 2023
2 parents 27c07f0 + ca17637 commit 0cf2098
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/setup-python@v4
- name: Install dependencies
run: |
python -m pip install -U pip wheel setuptools setuptools-scm twine
python -m pip install -U pip wheel "setuptools<66.0.0" setuptools-scm twine
- name: Build distributions
run: python setup.py sdist bdist_wheel

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ jobs:
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment-py${{ matrix.python-version }}.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*" # activate this to build with mamba.
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
channels: conda-forge, defaults # These need to be specified to use mamba
# channel-priority: true
environment-file: ci/environment-py${{ matrix.python-version }}.yml
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
args: [--max-line-length=105, --ignore=E203,E501,W503, --select=select=C,E,F,W,B,B950]

- repo: https://github.com/pycqa/isort
rev: 5.8.0
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
Expand Down
8 changes: 4 additions & 4 deletions cf_pandas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cf-pandas: an accessor for pandas objects that interprets CF attributes
"""

from pkg_resources import DistributionNotFound, get_distribution
from importlib.metadata import PackageNotFoundError, version

from .accessor import CFAccessor # noqa
from .options import set_options # noqa
Expand All @@ -12,7 +12,7 @@
from .widget import Selector, dropdown

try:
__version__ = get_distribution("cf-pandas").version
except DistributionNotFound:
__version__ = version("cf-pandas")
except PackageNotFoundError:
# package is not installed
__version__ = "unknown"
pass
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
# see https://pypi.org/project/setuptools-scm/ for details
from pkg_resources import get_distribution
from importlib.metadata import version as imversion

print("python exec:", sys.executable)
print("sys.path:", sys.path)
Expand All @@ -31,10 +31,10 @@
# -- Project information -----------------------------------------------------

project = "cf-pandas"
copyright = "2022, Axiom Data Science"
copyright = "2022–2023, Axiom Data Science"
author = "Axiom Data Science"

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

Expand Down
17 changes: 11 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ Welcome to cf-pandas's documentation!
Installation
------------

To install from conda-forge:

>>> conda install -c conda-forge cf_pandas

To install from PyPI:

>>> pip install cf-pandas


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



Indices and tables
==================
.. Indices and tables
.. ==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
.. * :ref:`genindex`
.. * :ref:`modindex`
.. * :ref:`search`
.. _reStructuredText: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
.. .. _reStructuredText: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html

0 comments on commit 0cf2098

Please sign in to comment.