From f83efe52a2c7f84588768dbffa5684f667ebc64a Mon Sep 17 00:00:00 2001 From: Kristen Thyng Date: Tue, 31 Jan 2023 11:18:20 -0600 Subject: [PATCH 1/6] changed setup tools<66.0.0 for release --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f6d91b3..3e1a7ee 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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 From f58fe9440c9e162382a3e5c6e8eed4dd56d89a8f Mon Sep 17 00:00:00 2001 From: Kristen Thyng Date: Tue, 31 Jan 2023 11:18:47 -0600 Subject: [PATCH 2/6] fixed mamba in linux ci --- .github/workflows/test.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a36fe0a..08a5fcd 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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 From f8b37ad174d6efabf374a4e090698d02ab7e089a Mon Sep 17 00:00:00 2001 From: Kristen Thyng Date: Tue, 31 Jan 2023 11:19:19 -0600 Subject: [PATCH 3/6] updated version to come from importlib --- cf_pandas/__init__.py | 8 ++++---- docs/conf.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cf_pandas/__init__.py b/cf_pandas/__init__.py index a318508..c430493 100644 --- a/cf_pandas/__init__.py +++ b/cf_pandas/__init__.py @@ -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 @@ -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 \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 9708e90..24a3b9f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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) @@ -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]) From ad61b78c2269898f998374cc3ae3da6db70c2f5c Mon Sep 17 00:00:00 2001 From: Kristen Thyng Date: Tue, 31 Jan 2023 11:19:37 -0600 Subject: [PATCH 4/6] updated docs index --- docs/index.rst | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 8c96a1a..2491712 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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 @@ -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 From 4414045211dbae102eef1e6debf916e125e32faf Mon Sep 17 00:00:00 2001 From: Kristen Thyng Date: Tue, 31 Jan 2023 11:21:08 -0600 Subject: [PATCH 5/6] lint --- cf_pandas/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cf_pandas/__init__.py b/cf_pandas/__init__.py index c430493..1169692 100644 --- a/cf_pandas/__init__.py +++ b/cf_pandas/__init__.py @@ -15,4 +15,4 @@ __version__ = version("cf-pandas") except PackageNotFoundError: # package is not installed - pass \ No newline at end of file + pass From ca1763725f79dce9ea23108c4327a11f27809750 Mon Sep 17 00:00:00 2001 From: Kristen Thyng Date: Tue, 31 Jan 2023 11:46:41 -0600 Subject: [PATCH 6/6] updated isort https://github.com/PyCQA/isort/issues/2077 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a0b788d..57ea670 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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)