Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add autodetect cadetpath functionality from CADET-Process to CADET-Python #14

Merged
merged 5 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 33 additions & 6 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,50 @@ on:
jobs:
test-job:
runs-on: ubuntu-latest

defaults:
run:
shell: bash -l {0}

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4

- name: Get Date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash

- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
use-mamba: true
activate-environment: cadet-python
channels: conda-forge,

- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ${{ env.CONDA }}/envs
key: python_${{ matrix.python-version }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}

- name: Test Wheel install and import
run: |
mamba install python==${{ matrix.python-version }}
pip install wheel
python setup.py bdist_wheel
cd dist
pip install CADET_Python*.whl
python -c "import cadet; print(cadet.__version__)"
cd ..
- name: Test with pytest
run: |
pip install pytest
pytest tests --rootdir=tests
pip install .[testing]
mamba install cadet -c conda-forge
pytest tests --rootdir=tests -m "not slow"
19 changes: 4 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
################################################################################
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
################################################################################


/.vs
*.h5
*.csv
/__pycache__
/fix_h5.py
/HICWang.py
/Pilot_Bypass_noBT_noC.py
/Test.py
/test_lwe.py
/comp2_1.csv
/comp2_2.csv
/comp2_comb.csv
/comp2_fraction.csv
/comp_1.csv
/ron.py
/CADET.egg-info
/dist
/build/lib/cadet
/cadet/__pycache__
/CADET_Python.egg-info
.idea
*tmp*
Loading
Loading