Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add tests and ci instructions
  • Loading branch information
lukelbd committed Jun 6, 2023
commit 97f1713556cf236fc32e785885a7ce7896f4de11
30 changes: 12 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Travis Continuos Integration
# Currently only tests notebook files
# Based on https://conda.pydata.org/docs/travis.html
sudo: false # use container based build
# Travis Continuous Integration
# For mamba links see https://mamba.readthedocs.io/en/latest/installation.html
# For sample travis file see https://conda.pydata.org/docs/travis.html
dist: xenial
language: python
dist: focal

notifications:
email: false

Expand All @@ -18,25 +18,19 @@ before_install:
echo "Only doc files were updated, not running the CI."
exit
fi
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- curl micro.mamba.pm/install.sh | bash
- export PATH="$HOME/micromamba/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
- conda update -q conda
- conda info -a
- micromamba config --set always_yes yes --set changeps1 no --set show_channel_urls true

install:
- conda env create --file ci/environment.yml
- source activate proplot-dev
- conda list
- which conda
- micromamba env create --file ci/environment.yml
- micromamba activate proplot-dev
- micromamba list
- which micromamba
- which python
- python setup.py sdist bdist_wheel
- pip install --user ./dist/*.whl

script:
- ci/run-linter.sh
- pushd docs
- make html
- popd
18 changes: 5 additions & 13 deletions ci/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ channels:
dependencies:
- python==3.8
- numpy==1.19.5
- pandas
- xarray
- matplotlib==3.2.2
- cartopy==0.20.2
- ipykernel
- pandoc
- seaborn
- pandas
- xarray
- pint
- python-build
- setuptools
- setuptools_scm
Expand All @@ -26,14 +26,6 @@ dependencies:
- black
- doc8
- pytest
- pytest-sugar
- pyqt5
- docutils==0.16
- sphinx>=3.0
- sphinx-copybutton
- sphinx-rtd-light-dark
- jinja2==2.11.3
- markupsafe==2.0.1
- nbsphinx==0.8.1
- jupytext
- git+https://github.com/proplot-dev/sphinx-automodapi@proplot-mods
- git+https://github.com/proplot-dev/pytest-mpl@proplot-mods
3 changes: 3 additions & 0 deletions ci/run-linter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ flake8 proplot docs --exclude .ipynb_checkpoints --max-line-length=88 --ignore=W
echo '[isort]'
isort --recursive --check-only --line-width=88 --skip __init__.py --multi-line=3 --force-grid-wrap=0 --trailing-comma proplot

echo '[pytest]'
pytest proplot

# echo '[black]'
# black --check -S proplot

Expand Down
Loading