Check list params values #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python package | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "*" | |
pull_request: | |
schedule: | |
- cron: '30 2 * * 1' # Every Monday @ 2h30am UTC | |
env: | |
POETRY_VERSION: 2.0.1 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache Installations | |
id: cache-installs | |
uses: actions/cache@v3 | |
with: | |
path: ~/.local | |
key: install-${{ env.INSTALL_CACHE_HASH }}-2 | |
- name: Install Poetry | |
uses: abatilo/actions-poetry@v3 | |
with: | |
poetry-version: ${{ env.POETRY_VERSION }} | |
- name: Test poetry | |
run: poetry --version | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: Install breizorro | |
run: poetry install | |
- name: Install breizorro with all modules | |
run: poetry install --extras "all" | |
- name: Install breizorro with tests | |
run: poetry install --with tests --no-interaction | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Test command | |
run: | | |
poetry run breizorro --help | |
- name: Download test dataset | |
run: | | |
curl -L -o mypipelinerun_circinus_p3_3-MFS-image.tar "https://www.dropbox.com/scl/fi/xoaqth4jhjnx098xbegvn/mypipelinerun_circinus_p3_3-MFS-image.tar?rlkey=vdgkz2xpjgpp7v7hjxm7kg6g2&st=isg70eve&dl=1" && tar -xvf mypipelinerun_circinus_p3_3-MFS-image.tar | |
- name: Run end-to-end test | |
run: | | |
poetry run breizorro -r mypipelinerun_circinus_p3_3-MFS-image.fits --outfile test.mask.fits --outregion test.mask.rgn | |
poetry run breizorro -r mypipelinerun_circinus_p3_3-MFS-image.fits -t 10 --merge test.mask.fits,test.mask.rgn --remove-islands 19,21,14h16m20.3:-65d42m07 --number-islands |