Skip to content

Commit

Permalink
PROD move to conda in CI job (#58)
Browse files Browse the repository at this point in the history
* PROD move to conda in CI job

* BUG missed a name change

* BUG h5py needs mpi too

* REF use environment file
  • Loading branch information
beckermr authored Mar 24, 2023
1 parent 5ea3534 commit 049524c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,29 @@ jobs:
build:

runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: [3.8, 3.9, "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge,defaults
channel-priority: strict
show-channel-urls: true
miniforge-version: latest
miniforge-variant: Mambaforge
use-mamba: true
environment-file: environment.yml
activate-environment: tables_io
- name: Install dependencies
run: |
sudo apt install -y libopenmpi-dev libhdf5-mpi-dev
python -m pip install --upgrade pip
python -m pip install pylint pytest pytest-cov
python -m pip install jupyter
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
CC="mpicc" HDF5_MPI="ON" pip install --upgrade --force-reinstall --no-binary=h5py h5py
pip install .
pip install .[dev]
env:
CC: mpicc
HDF5_MPI: ON
pip install --no-deps .
- name: Lint with pylint
run: |
# stop the build if there are Pylint errors
Expand Down
22 changes: 22 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: tables_io
channels:
- conda-forge
- defaults
dependencies:
- numpy>=1.21.0
- astropy
- h5py>=2.9=*mpi_openmpi*
- pandas
- pyarrow
- pytables
- mpi4py
- hdf5=*=*mpi_openmpi*
- pylint
- pytest
- pytest-cov
- jupyter
- pip
- setuptools
- coverage
- flake8
- jax

0 comments on commit 049524c

Please sign in to comment.