diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 69fe5bbf..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,191 +0,0 @@ -version: 2 -jobs: - test-autoio-interfaces: - docker: - - image: continuumio/miniconda3 - steps: - - checkout # checkout the code - - run: - name: Create conda environment - command: | - apt-get update --yes - apt-get install --yes libxrender-dev build-essential - conda env create -f autoio-interfaces/environment.yml - - run: - name: Build/install autoio-interfaces - command: | - source activate autoio-interfaces-env - cd autoio-interfaces - python setup.py install - - run: - name: Test chemkin_io - command: | - cd autoio-interfaces/chemkin_io - source activate autoio-interfaces-env - pytest . -v --disable-pytest-warnings --cov=chemkin_io --pyargs chemkin_io --cov-report=html - coverage report - # - run: - # name: Test intder_io - # command: | - # cd autoio-interfaces/intder_io - # source activate autoio-interfaces-env - # pytest . -v --disable-pytest-warnings --cov=intder_io --pyargs intder_io --cov-report=html - # coverage report - - run: - name: Test pac99_io - command: | - cd autoio-interfaces/pac99_io - source activate autoio-interfaces-env - pytest . -v --disable-pytest-warnings --cov=pac99_io --pyargs pac99_io --cov-report=html - coverage report - - run: - name: Test projrot_io - command: | - cd autoio-interfaces/projrot_io - source activate autoio-interfaces-env - pytest . -v --disable-pytest-warnings --cov=projrot_io --pyargs projrot_io --cov-report=html - coverage report - - run: - name: Test polyrate_io - command: | - cd autoio-interfaces/polyrate_io - source activate autoio-interfaces-env - pytest . -v --disable-pytest-warnings --cov=polyrate_io --pyargs polyrate_io --cov-report=html - coverage report - - run: - name: Test thermp_io - command: | - cd autoio-interfaces/thermp_io - source activate autoio-interfaces-env - pytest . -v --disable-pytest-warnings --cov=thermp_io --pyargs thermp_io --cov-report=html - coverage report - - run: - name: Test varecof_io - command: | - cd autoio-interfaces/varecof_io - source activate autoio-interfaces-env - pytest . -v --disable-pytest-warnings --cov=varecof_io --pyargs varecof_io --cov-report=html - coverage report - - run: - name: Test onedmin_io - command: | - cd autoio-interfaces/onedmin_io - source activate autoio-interfaces-env - pytest . -v --disable-pytest-warnings --cov=onedmin_io --pyargs onedmin_io --cov-report=html - coverage report - - run: - name: Test mess_io - command: | - cd autoio-interfaces/mess_io - source activate autoio-interfaces-env - pytest . -v --disable-pytest-warnings --cov=mess_io --pyargs mess_io --cov-report=html - coverage report - - run: - name: Test autorun - command: | - cd autoio-interfaces/autorun - source activate autoio-interfaces-env - pytest . -v --disable-pytest-warnings --cov=autorun --pyargs autorun --cov-report=html - coverage report - - run: - name: Test elstruct - command: | - cd autoio-interfaces/elstruct - source activate autoio-interfaces-env - pytest -v --cov=elstruct . --cov-report=html - coverage report - - run: - name: Test autoio-interfaces format - command: | - cd autoio-interfaces - source activate autoio-interfaces-env - flake8 --exit-zero ../autoio-interfaces - pylint --rcfile=../.pylintrc $(git ls-files '*.py') - - store_artifacts: - path: autoio-interfaces/chemkin_io/htmlcov - - store_artifacts: - path: autoio-interfaces/intder_io/htmlcov - - store_artifacts: - path: autoio-interfaces/pac99_io/htmlcov - - store_artifacts: - path: autoio-interfaces/projrot_io/htmlcov - - store_artifacts: - path: autoio-interfaces/polyrate_io/htmlcov - - store_artifacts: - path: autoio-interfaces/thermp_io/htmlcov - - store_artifacts: - path: autoio-interfaces/varecof_io/htmlcov - - store_artifacts: - path: autoio-interfaces/onedmin_io/htmlcov - - store_artifacts: - path: autoio-interfaces/mess_io/htmlcov - - store_artifacts: - path: autoio-interfaces/elstruct/htmlcov - - store_artifacts: - path: autoio-interfaces/autorun/htmlcov - test-autoio-base: - docker: - - image: continuumio/miniconda3 - steps: - - checkout # checkout the code - - run: - name: Create conda environment - command: | - apt-get update --yes - apt-get install --yes libxrender-dev build-essential - conda env create -f autoio-base/environment.yml - - run: - name: Build/install autoio-base - command: | - source activate autoio-base-env - cd autoio-base - python setup.py install - - run: - name: Test autoparse - command: | - source activate autoio-base-env - cd autoio-base/autoparse - pytest . -v --disable-pytest-warnings --cov=autoparse --cov-report=html - coverage report - - run: - name: Test autoread - command: | - cd autoio-base/autoread - source activate autoio-base-env - pytest . -v --disable-pytest-warnings --cov=autoread --cov-report=html - coverage report - - run: - name: Test autowrite - command: | - cd autoio-base/autowrite - source activate autoio-base-env - pytest . -v --disable-pytest-warnings --cov=autowrite --cov-report=html - coverage report - - run: - name: Test ioformat - command: | - cd autoio-base/ioformat - source activate autoio-base-env - pytest . -v --disable-pytest-warnings --cov=ioformat --cov-report=html - coverage report - - run: - name: Test autoio-base format - command: | - cd autoio-base - source activate autoio-base-env - flake8 --exit-zero ../autoio-base - pylint --rcfile=../.pylintrc $(git ls-files '*.py') - - store_artifacts: - path: autoio-base/autoparse/htmlcov - - store_artifacts: - path: autoio-base/autoread/htmlcov - - store_artifacts: - path: autoio-base/autowrite/htmlcov - - store_artifacts: - path: autoio-base/ioformat/htmlcov -workflows: - version: 2 - build-all: - jobs: - - test-autoio-base - - test-autoio-interfaces diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 00000000..f7195b7e --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,37 @@ +name: lint + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + # Repository + - name: Checkout the code + uses: actions/checkout@v4 + + # Environment + - name: Download environment files + run: | + wget https://raw.githubusercontent.com/Auto-Mech/amech-dev/main/pixi.toml + wget https://raw.githubusercontent.com/Auto-Mech/amech-dev/main/pixi.lock + + - name: Set up Pixi + uses: prefix-dev/setup-pixi@v0.8.1 + + - name: Pip install + run: | + pixi run pip install -e . --no-deps + + # Lint + - name: Lint + run: | + # # broken + # pixi run ./lint.sh + echo "Skipping until we are ready to turn this on again..." diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..4535d6ff --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,50 @@ +name: test + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + # Repository + - name: Checkout the code + uses: actions/checkout@v4 + + # Environment + - name: Download environment files + run: | + wget https://raw.githubusercontent.com/Auto-Mech/amech-dev/main/pixi.toml + wget https://raw.githubusercontent.com/Auto-Mech/amech-dev/main/pixi.lock + + - name: Set up Pixi + uses: prefix-dev/setup-pixi@v0.8.1 + + - name: Pip install + run: | + pixi run pip install git+https://github.com/Auto-Mech/autochem.git + pixi run pip install -e . --no-deps + + # Test + - name: Test + run: | + pixi run pytest -v autoparse + pixi run pytest -v autoread + pixi run pytest -v autowrite + pixi run pytest -v ioformat + pixi run pytest -v chemkin_io + pixi run pytest -v projrot_io + pixi run pytest -v polyrate_io + pixi run pytest -v thermp_io + pixi run pytest -v onedmin_io + # # broken: + # pixi run pytest -v pac99_io # ! fix + # pixi run pytest -v varecof_io # ! fix + # pixi run pytest -v mess_io # ! FIX ! + # pixi run pytest -v autorun # ! fix + # pixi run pytest -v elstruct # ! fix