Skip to content

Commit

Permalink
Updated env config files (separated out deps for devs) and added gh a…
Browse files Browse the repository at this point in the history
…ctions workflow
  • Loading branch information
jkbhagatio committed Aug 16, 2023
1 parent 0305a35 commit ebcaf0f
Show file tree
Hide file tree
Showing 10 changed files with 171 additions and 93 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build_env_run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Builds the aeon environment, flakes via flake8, tests via pytest, reports
# test coverage via pytest-cov and codecov, and reports security
# vulnerabilities via bandit.

name: build_env_run_tests
on:
push:
branches: [ main, reorg, jai_dev, config ]
pull_request:
branches: [ main ]
workflow_dispatch: # Allows running manually from Github's 'Actions' tab
jobs:
build_env_run_tests:
name: Build env and run tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
defaults:
run:
shell: bash -l {0} # reset shell for each step
steps:
- name: checkout repo
uses: actions/checkout@v2
- name: set up conda env
uses: conda-incubator/setup-miniconda@v2 # from github marketplace
with:
activate-environment: aeon
environment-file: ./env_config/env.yml
use-mamba: true
miniforge-variant: Mambaforge
- name: Update conda env with dev reqs
run: mamba env update -f ./env_config/env_dev.yml
- name: flake
run: python -m flake8 .
- name: bandit
run: python -m bandit . -r -ll
- name: pytest
run: python -m pytest tests/
# Only run coverage report job and upload for ubuntu.
- name: generate test coverage report
if: matrix.os == 'ubuntu-latest'
run: |
python -m pytest --cov=aeon ./tests/ --cov-report=xml:./tests/test_coverage/test_coverage_report.xml
python -m pytest --cov=aeon ./tests/ --cov-report=html:./tests/test_coverage/test_coverage_report_html
- name: upload test coverage report to codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./tests/test_coverage/
files: test_coverage_report.xml
fail_ci_if_error: true
verbose: true
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

48 changes: 0 additions & 48 deletions env.yml

This file was deleted.

2 changes: 2 additions & 0 deletions env_config/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# For installing aeon env via pyenv and poetry
3.11
36 changes: 36 additions & 0 deletions env_config/env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Run e.g. w/mamba: `mamba env create -q -f env.yml`

name: aeon
channels:
- conda-forge
- defaults
dependencies:
- python>=3.9, <3.12
- pip
- blas>=2.0, <3
- bottleneck>=1.2.1, <2
- dash
- dotmap
- fastparquet
- graphviz
- ipykernel
- jupyter
- jupyterlab
- matplotlib
- numba>=0.46.0, <1
- numexpr>=2.6.8, <3
- numpy>=1.21.0, <2
- pandas>=1.3
- plotly
- pyarrow
- pydotplus
- pymysql
- pyyaml
- scikit-learn
- scipy
- seaborn
- xarray>=0.12.3, <1
- pip:
- datajoint>=0.13.6, <1
- git+https://github.com/datajoint-company/datajoint-utilities.git
- opencv-python
22 changes: 22 additions & 0 deletions env_config/env_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Contains only the dev package requirements.
# Run e.g. w/mamba: `mamba env create -q -f env.yml -f env_dev.yml`

name: aeon
channels:
- conda-forge
- defaults
dependencies:
- bandit
- black
- flake8
- gh
- ipdb
- isort
- pre-commit
- pydantic
- pytest
- pytest-cov
- sphinx
- tox
- pip:
- git+https://github.com/Technologicat/pyan.git
10 changes: 10 additions & 0 deletions env_config/env_gpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Contains only the gpu package requirements.
# Run e.g. w/mamba: `mamba env create -q -f env.yml -f env_gpu.yml`

name: aeon_gpu
channels:
- conda-forge
- defaults
dependencies:
- cupy
- dask
30 changes: 30 additions & 0 deletions env_config/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Run with `pip install -r requirements.txt`

python>=3.9, <3.12
pip
blas>=1.1, <2
bottleneck>=1.2.1, <2
datajoint>=0.13, <1
git+https://github.com/vathes/datajoint-utilities.git
dotmap
dash
fastparquet
ipykernel
jupyter
jupyterlab
matplotlib
numba>=0.46.0, <1
numexpr>=2.6.8, <3
numpy>=1.21.0, <2
opencv-python
pandas>=1.3
plotly
pyarrow
pydotplus
pymysql
python-graphviz
pyyaml
scikit-learn
scipy
seaborn
xarray>=0.12.3, <1
16 changes: 16 additions & 0 deletions env_config/requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Run with `pip install -r requirements_dev.txt`

-r requirements.txt
bandit
black
flake8
gh
ipdb
isort
pre-commit
git+https://github.com/Technologicat/pyan.git
pydantic
pytest
pytest-cov
sphinx
tox
44 changes: 0 additions & 44 deletions requirements.txt

This file was deleted.

0 comments on commit ebcaf0f

Please sign in to comment.