Skip to content

Commit

Permalink
Merge pull request #138 from GreenBankObservatory/release-0.2.0
Browse files Browse the repository at this point in the history
Release 0.2.0b into main.
  • Loading branch information
mpound authored Dec 1, 2023
2 parents 38cd9c8 + 54e2c5e commit ac7a728
Show file tree
Hide file tree
Showing 159 changed files with 246,189 additions and 22,002 deletions.
8 changes: 8 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Template environment file for building the docs
# Copy this to .env, then edit all indicated lines

# Documentation Settings
export DOCS_ROOT="path/to/dysh/docs" # EDIT ME
export DOCS_HOST="" # EDIT ME
export DOCS_PORT="" # EDIT ME
alias startdocs="cd $DOCS_ROOT && cd source && sphinx-autobuild . _build -b html --host $DOCS_HOST --port $DOCS_PORT"
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package
name: Build and Pytest

on:
push:
branches: [ "main", "release-0.1.0", "cat-devel", "mwp-devel", "pedro-devel", "evan-devel" ]
branches: [ "main", "release-*", "cat-devel", "mwp-devel", "pedro-devel", "evan-devel" ]
pull_request:
branches: [ "main", "release-0.1.0", "cat-devel", "mwp-devel", "pedro-devel", "evan-devel" ]
branches: [ "main", "release-*", "cat-devel", "mwp-devel", "pedro-devel", "evan-devel" ]
workflow_dispatch: # needed for "Run" button to show up in action
jobs:
build:
runs-on: ${{ matrix.os }}
environment: hatch build

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand All @@ -30,6 +32,9 @@ jobs:
python -m pip install flake8 pytest
pip install -r requirements.txt
pip install -e .
- name: Build with hatch
run: |
hatch build -c
- name: Test with pytest
run: |
pytest
38 changes: 38 additions & 0 deletions .github/workflows/pyinstaller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

name: Package GUI with Pyinstaller

on:
push:
branches: [ "cat-devel" ]
pull_request:
branches: [ "cat-devel" ]

jobs:
build:
runs-on: ${{ matrix.os }}
environment: hatch build

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
- name: Build with hatch
run: |
hatch build -c
- name: Package GUI with PyInstaller
run: |
cd gui
pyinstaller app.py
26 changes: 8 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Release to PyPi
name: Publish Release to PyPI

on:
release:
Expand All @@ -9,12 +9,14 @@ jobs:
build:
runs-on: ${{ matrix.os }}
environment: release

permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: "3.x"
python-version: ["3.x"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -24,22 +26,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -r requirements.txt
pip install -e .
- name: Build with hatch
run: |
hatch build -c
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
# retrieve your distributions here

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: upload release to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
File renamed without changes.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Custom
*.fits
.ignore/
docs/source/_build/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
44 changes: 16 additions & 28 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
# See https://pre-commit.com for more information
default_language_version:
python: python3.9
python: python3.10

# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: '(notebooks|attic|benchmark|testdata)/.*'
- id: end-of-file-fixer
exclude: LICENSE
- id: check-yaml
Expand All @@ -19,33 +20,20 @@ repos:
- id: mixed-line-ending
args:
- '--fix=lf'

# - repo: https://github.com/astral-sh/ruff-pre-commit
# rev: v0.0.285
# hooks:
# - id: ruff
# alias: autoformat
# args:
# - '--fix'
# - '--exit-non-zero-on-fix'
# - '--select=F,E,B,I'
# - '--ignore=E501' # Ignore line-too-long errors; these are only long comment lines

- id: check-docstring-first
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
exclude: '(notebooks|attic|benchmark|testdata)/.*'
- repo: 'https://github.com/psf/black'
rev: 23.7.0
rev: 23.1.0
hooks:
- id: black


- repo: https://github.com/jazzband/pip-tools
rev: 7.3.0
hooks:
- id: pip-compile
args:
- 'pyproject.toml'
- '--all-extras'
- '--resolver=backtracking'
- '--output-file=requirements.txt'
- '--no-strip-extras'
- '--quiet'
- '--no-emit-trusted-host'
exclude: '(notebooks|attic|benchmark|testdata)/.*'
# - repo: https://github.com/jazzband/pip-tools
# rev: 6.12.3
# hooks:
# - id: pip-compile
# args:
# - '--resolver=backtracking'
24 changes: 12 additions & 12 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.9"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"
os: ubuntu-22.04
tools:
python: "3.9"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
configuration: docs/source/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
# - pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
install:
- requirements: requirements.txt
- method: pip
path: .
Loading

0 comments on commit ac7a728

Please sign in to comment.