Skip to content

Commit

Permalink
Update to toolviper.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhosk committed Sep 10, 2024
1 parent 29d4445 commit 2aae0f1
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 7 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/python-testing-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Linux

on:
push:
paths-ignore:
- '**.md'
- '**.rst'

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9","3.10","3.11","3.12", "3.13"]
steps:
- uses: actions/checkout@v4

- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies with pip
run: |
python -m pip install --upgrade pip
pip install .
- name: Test with pytest
run: |
pytest -v tests/ --html=test-results.html --self-contained-html --cov=viper --no-cov-on-fail --cov-report=html --doctest-modules
- name: Upload pytest test results and coverage reports
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.python-version }}
path: |
./test-results.html
./htmlcov
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
41 changes: 41 additions & 0 deletions .github/workflows/python-testing-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: MacOS

on:
push:
branches:
- main
paths-ignore:
- '**.md'
- '**.rst'

jobs:
build:
name: macos (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: ["macos-latest"]
python-version: ["3.9", "3.10","3.11","3.12", "3.13"]
steps:
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: false
activate-environment: xradiotest
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge

- uses: actions/checkout@v4

- name: Install dependencies with pip
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: Test with pytest
run: pytest
55 changes: 55 additions & 0 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This workflows will upload a Python Package for tagged commits
# For more information see: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI

on:
release:
types: [created]

jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a source distribution
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/project/toolviper
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
7 changes: 0 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,24 @@ readme = "README.md"
requires-python = ">= 3.9, < 3.13"

dependencies = [
'astropy',
'cerberus',
'dask',
'dask_jobqueue',
'distributed',
'matplotlib',
'numba>=0.57.0',
'numpy',
'psutil',
'ipywidgets',
'prettytable',
'pytest',
'pytest-cov',
'pytest-html',
'rich',
'scipy',
'tqdm',
'xarray',
'zarr',
'bokeh',
'jupyterlab',
'pyarrow',
'graphviz',
'rich',
'python_casacore>=3.6.1; sys_platform != "darwin" '
]


Expand Down

0 comments on commit 2aae0f1

Please sign in to comment.