Skip to content

Commit

Permalink
build: Covert build to use pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
ketiltrout committed Jul 31, 2024
1 parent f5f4de0 commit 1a0b38f
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 859 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

43 changes: 18 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.11"

Expand All @@ -30,31 +30,26 @@ jobs:

strategy:
matrix:
python-version: [3.9, 3.11]
python-version: [3.9, 3.12]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y libopenmpi-dev openmpi-bin libhdf5-serial-dev
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install pip dependencies
run: |
pip install wheel
pip install mpi4py
pip install numpy
pip install cython
pip install h5py
pip install --use-deprecated=legacy-resolver -e . --no-binary bitshuffle
pip install pytest
- name: Install ch_util
run: pip install -e .[test] --no-binary bitshuffle

- name: Run tests
run: pytest --ignore=tests/test_db.py tests/
Expand All @@ -64,27 +59,25 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y libopenmpi-dev openmpi-bin libhdf5-serial-dev
- name: Set up Python 3.11
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install pip dependencies
run: |
pip install wheel
pip install mpi4py
pip install numpy
pip install cython
pip install h5py
pip install --use-deprecated=legacy-resolver -e . --no-binary bitshuffle
pip install -r doc/requirements.txt
- name: Install ch_util
run: pip install -e . --no-binary bitshuffle

- name: Install doc requirements
run: pip install -r doc/requirements.txt

- name: Build sphinx docs
run: sphinx-build -W -b html doc/ doc/_build/html
3 changes: 1 addition & 2 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ jobs:
fetch-depth: 0
- name: Install pip requirements
run: |
pip install -r requirements.txt
pip install -r doc/requirements.txt
pip install .
pip install -r doc/requirements.txt
- name: Sphinx build
run: |
git checkout -b gh-pages
Expand Down
55 changes: 0 additions & 55 deletions CHANGELOG.md

This file was deleted.

2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

9 changes: 7 additions & 2 deletions ch_util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
tools
"""

from . import _version
from importlib.metadata import version, PackageNotFoundError

__version__ = _version.get_versions()["version"]
try:
__version__ = version("ch_util")
except PackageNotFoundError:
# package is not installed
pass
del version, PackageNotFoundError
Loading

0 comments on commit 1a0b38f

Please sign in to comment.