From a4b955198e33572d5189edc463cf92995972f1cd Mon Sep 17 00:00:00 2001 From: Tom Body Date: Thu, 15 Dec 2022 17:12:13 -0500 Subject: [PATCH] Add HDF5 and importlib.metadata to repair pipeline --- .github/workflows/benchmark.yml | 3 ++- .github/workflows/tests.yml | 3 ++- freegs/__init__.py | 7 +++++-- pyproject.toml | 1 + requirements.txt | 1 + 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 12c6884..19713f0 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -25,7 +25,8 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip + sudo apt-get install libhdf5-serial-dev + python -m pip install --upgrade pip setuptools wheel python -m pip install asv virtualenv - name: Run benchmarks diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d13b4a5..21db002 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,7 +21,8 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip + sudo apt-get install libhdf5-serial-dev + python -m pip install --upgrade pip setuptools wheel python -m pip install flake8 python -m pip install .[tests] - name: Lint with flake8 diff --git a/freegs/__init__.py b/freegs/__init__.py index 6f4a163..00f4846 100644 --- a/freegs/__init__.py +++ b/freegs/__init__.py @@ -28,8 +28,7 @@ along with FreeGS. If not, see . """ - -from ._version import __version__ +from importlib_metadata import metadata from .equilibrium import Equilibrium @@ -44,3 +43,7 @@ from .dump import OutputFile from . import plotting + + +__version__ = metadata(__package__)["Version"] +__author__ = metadata(__package__)["Author"] diff --git a/pyproject.toml b/pyproject.toml index 8f21f35..376e331 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,7 @@ dependencies = [ "matplotlib>=1.3", "h5py>=2.10.0", "Shapely>=1.7.1", + "importlib-metadata<4.3,>=1.1.0" ] dynamic = ["version"] diff --git a/requirements.txt b/requirements.txt index 7192f46..c79fce3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ scipy>=1.0.0 matplotlib>=2.0.0 h5py>=2.10.0 Shapely>=1.7.1 +importlib-metadata<4.3,>=1.1.0