Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Sep 6, 2022
1 parent 2b29c90 commit ef2e30c
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 20 deletions.
9 changes: 9 additions & 0 deletions .circleci/codecov_upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash -e
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
curl -Os https://uploader.codecov.io/latest/linux/codecov
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
shasum -a 256 -c codecov.SHA256SUM
chmod +x codecov
./codecov "$@"
21 changes: 12 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ apt-run: &apt-install
name: Install apt packages
command: |
sudo apt update
sudo apt install -y graphviz build-essential libopenjp2-7 python3-dev
sudo apt install -y libopenjp2-7
jobs:
figure:
parameters:
jobname:
type: string
docker:
- image: cimg/python:3.9
- image: cimg/python:3.10
environment:
TOXENV=<< parameters.jobname >>
steps:
Expand All @@ -42,8 +42,10 @@ jobs:
- run: *merge-check
- run: *apt-install
- run: pip install --user -U tox tox-pypi-filter
- run: tox
- run: curl -s https://codecov.io/bash | bash
- run: tox -v
- run:
name: Running codecov
command: bash -e .circleci/codecov_upload.sh -f ".tmp/${TOXENV}/coverage.xml"
- store_artifacts:
path: .tmp/<< parameters.jobname >>/figure_test_images
- run:
Expand All @@ -55,7 +57,7 @@ jobs:
jobname:
type: string
docker:
- image: cimg/python:3.9
- image: cimg/python:3.10
environment:
TOXENV: << parameters.jobname >>
GIT_SSH_COMMAND: ssh -i ~/.ssh/id_rsa_6464b6a8248237ca368fd4690777d921
Expand All @@ -74,7 +76,8 @@ jobs:
- run: git clone [email protected]:sunpy/sunpy-figure-tests.git --depth 1 -b sunkit-image-${CIRCLE_BRANCH} ~/sunpy-figure-tests/
# Generate Reference images
- run: pip install --user -U tox tox-pypi-filter
- run: tox -- --mpl-generate-path=/home/circleci/sunpy-figure-tests/figures/$TOXENV | tee toxlog
- run: rm -rf /home/circleci/sunpy-figure-tests/figures/$TOXENV/*
- run: tox -v -- --mpl-generate-path=/home/circleci/sunpy-figure-tests/figures/$TOXENV | tee toxlog
- run: |
hashlib=$(grep "^figure_hashes.*\.json$" toxlog)
cp ./sunkit_image/tests/$hashlib /home/circleci/sunpy-figure-tests/figures/$TOXENV/
Expand All @@ -96,16 +99,16 @@ workflows:
matrix:
parameters:
jobname:
- "py38-figure"
- "py310-figure"

- deploy-reference-images:
name: baseline-<< matrix.jobname >>
matrix:
parameters:
jobname:
- "py38-figure"
- "py310-figure"
requires:
- "py38-figure"
- << matrix.jobname >>
filters:
branches:
only:
Expand Down
14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sunkit-image
============
``sunkit-image``
================

|Latest Version| |codecov| |Powered by NumFOCUS| |Powered by Sunpy|

Expand All @@ -12,16 +12,16 @@ sunkit-image
.. |Powered by NumFOCUS| image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A
:target: http://numfocus.org

sunkit-image is a a open-source toolbox for solar physics image processing.
``sunkit-image`` is a a open-source toolbox for solar physics image processing.
Currently it is an experimental library for various solar physics specific image processing routines.

Installation
------------

For detailed (general) installation instructions, see the `installation guide`_ in the SunPy docs.
This takes you through the options for installing sunpy, but they are the same for sunkit-image.
For detailed (general) installation instructions, see the `installation guide`_ in the ``sunpy`` docs.
This takes you through the options for installing sunpy, but they are the same for ``sunkit-image``.

If you want help develop sunkit-image you will need to install it from GitHub.
If you want help develop ``sunkit-image`` you will need to install it from GitHub.
The best way to do this is to create a new python virtual environment (either with ``pipenv`` or ``conda``).
Once you have that virtual environment, you will want to fork the repo and then run::

Expand All @@ -32,7 +32,7 @@ Once you have that virtual environment, you will want to fork the repo and then
Getting Help
------------

For more information or to ask questions about sunkit-image or sunpy, check out:
For more information or to ask questions about ``sunkit-image`` or ``sunpy``, check out:

- `#sunpy:matrix.org`_
- `sunkit-image Documentation`_
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ setup_requires =
setuptools_scm
install_requires =
scikit-image>=0.18.0
sunpy>=4.0.0
sunpy>=4.0.4

[options.extras_require]
tests =
Expand Down
8 changes: 5 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,17 @@ deps =
online: pytest-rerunfailures
online: pytest-timeout
# Figure tests need a tightly controlled environment
figure-!devdeps: astropy==4.1.0
figure-!devdeps: matplotlib==3.3.2
figure-!devdeps: sunpy==3.0.0
figure-!devdeps: astropy==5.1.0
figure-!devdeps: matplotlib==3.5.3
figure-!devdeps: sunpy==4.0.4
# Coverage reporting
pytest-cov
# The following indicates which extras_require from setup.cfg will be installed
# dev is special in that it installs everything
extras =
dev
commands =
pip freeze --all --no-input
!online-!figure: {env:PYTEST_COMMAND} {posargs}
# We have online figure tests we don't want to run.
online: {env:PYTEST_COMMAND} --reruns 2 --timeout=180 --remote-data=any {posargs}
Expand All @@ -71,6 +72,7 @@ changedir = docs
description = Invoke sphinx-build to build the HTML docs
extras = docs
commands =
pip freeze --all --no-input
sphinx-build --color -W --keep-going -b html -d _build/.doctrees . _build/html {posargs}
python -c 'import pathlib; print("Documentation available under file://\{0\}".format(pathlib.Path(r"{toxinidir}") / "docs" / "_build" / "index.html"))'

Expand Down

0 comments on commit ef2e30c

Please sign in to comment.