Skip to content

Commit

Permalink
Merge branch 'main' of github.com:GreenBankObservatory/dysh
Browse files Browse the repository at this point in the history
  • Loading branch information
mpound committed Sep 8, 2023
2 parents def27c3 + db222b1 commit 98601e7
Show file tree
Hide file tree
Showing 53 changed files with 2,448 additions and 1,982 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: hatch build
name: Build with hatch

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

strategy:
fail-fast: false
matrix:
Expand All @@ -28,4 +28,4 @@ jobs:
pip install -e .
- name: Build with hatch
run: |
hatch build -c
hatch build -c
20 changes: 20 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: pre-commit

on:
pull_request:
push:
branches: [main, release*]


jobs:
pre-commit:
env:
SKIP: ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
# must match the version in .pre-commit-config.yaml:default_language_version.python
python-version: '3.9'
- uses: pre-commit/[email protected]
6 changes: 3 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ on:
jobs:
build:
runs-on: ${{ matrix.os }}

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

steps:
- uses: actions/checkout@v3
Expand All @@ -32,4 +32,4 @@ jobs:
pip install -e .
- name: Test with pytest
run: |
pytest
pytest
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Publish Release to PyPi

on:
release:
types:
- published

name: release
types: [ published ]
workflow_dispatch:

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

strategy:
fail-fast: false
matrix:
Expand All @@ -27,7 +27,8 @@ jobs:
pip install -r requirements-dev.txt
pip install -e .
- name: Build with hatch
hatch build -c
run: |
hatch build -c
pypi-publish:
name: upload release to PyPI
Expand Down
33 changes: 23 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# See https://pre-commit.com for more information
default_language_version:
python: python3.8
python: python3.9

# See https://pre-commit.com/hooks.html for more hooks
repos:
Expand All @@ -12,27 +12,40 @@ repos:
- id: end-of-file-fixer
exclude: LICENSE
- id: check-yaml
# Might make sense once everything is at Python 3
# - id: check-ast
- id: check-added-large-files
args:
- '--maxkb=1024'
- id: debug-statements
- id: mixed-line-ending
args:
- '--fix=lf'
- id: check-docstring-first
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort

# - 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

- repo: 'https://github.com/psf/black'
rev: 23.1.0
rev: 23.7.0
hooks:
- id: black


- repo: https://github.com/jazzband/pip-tools
rev: 6.12.3
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'
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Getting Started
### Installation

Dysh requires Python 3.8+ and recent versions of [astropy]( https://astropy.org), [numpy](https://numpy.org), [scipy](https://scipy.org), [pandas](https://pandas.pydata.org), [specutils](https://specutils.readthedocs.io/en/stable/), and [matplotlib](https://matplotlib.org).
Dysh requires Python 3.8+ and recent versions of [astropy]( https://astropy.org), [numpy](https://numpy.org), [scipy](https://scipy.org), [pandas](https://pandas.pydata.org), [specutils](https://specutils.readthedocs.io/en/stable/), and [matplotlib](https://matplotlib.org).

#### With pip from PyPi
Dysh is most easily installed with *pip*, which will take care of any dependencies. The packaged code is hosted at the [Python Packaging Index](https://pypi.org/project/dysh).
Expand All @@ -15,7 +15,7 @@ Dysh is most easily installed with *pip*, which will take care of any dependenci
```

#### From github
To install from github without creating a separate virtual environment:
To install from github without creating a separate virtual environment:

```bash
$ git clone [email protected]:GreenBankObservatory/dysh.git
Expand Down Expand Up @@ -64,7 +64,7 @@ The virtual environment will be created the first time; subsequent invoking ``ha

```bash
(dysh) $ exit
$
$
```

4. Each time when you come back in this directory without being in this virtual environment, you'll need to load the virtual environment
Expand All @@ -80,4 +80,3 @@ The virtual environment will be created the first time; subsequent invoking ``ha
```bash
$ pytest
```

Loading

0 comments on commit 98601e7

Please sign in to comment.