-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: add .github yamls required for nicer releasing * maint: use setuptools_scm like the rest of the hera stack * maint: require pyuvdata for tests
- Loading branch information
1 parent
7cdd8b6
commit 555b74c
Showing
16 changed files
with
294 additions
and
220 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[flake8] | ||
ignore = | ||
E203 # No space before colon | ||
W503 | ||
A003 # Class attribute shadows a python builtin -- not much chance of that causing a problem | ||
D401 # First line should be in imperative mood -- cached_properties don't fit this bill. | ||
D101 # Missing docstring in public class -- my docstrings are in the __init__ which seems to fail this ? | ||
RST210 # Otherwise it flags down **kwargs in docstrings. | ||
# These are the only things currently checked, but should be expanded. | ||
# Would be much easier to use black. | ||
select = | ||
E9 | ||
F63 | ||
F7 | ||
F82 | ||
max-line-length = 127 | ||
max-complexity = 10 | ||
inline-quotes = double | ||
per-file-ignores = | ||
tests/*:D | ||
**/__init__.py:F401 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Check Distribution Build | ||
|
||
on: push | ||
|
||
jobs: | ||
check-build: | ||
name: Twine Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Build Tools | ||
run: pip install build twine | ||
|
||
- name: Build a binary wheel and a source tarball | ||
run: | | ||
python -m build -s . | ||
- name: Check Distribution | ||
run: | | ||
twine check dist/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Labeler | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
labeler: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Labeler | ||
uses: crazy-max/ghaction-github-labeler@v4.1.0 | ||
with: | ||
skip-delete: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Publish Python distributions to PyPI | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build-n-publish: | ||
name: Make Release on PyPI and Github | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Build Tools | ||
run: pip install build | ||
|
||
- name: Build a binary wheel and a source tarball | ||
run: | | ||
python -m build -s . | ||
ls dist/ | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.pypi_password }} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Update Draft Release | ||
|
||
on: push | ||
|
||
jobs: | ||
draft-release: | ||
name: Update Draft Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Publish the release notes | ||
uses: release-drafter/release-drafter@v5.21.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Run Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.9, "3.10"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install | ||
run: | | ||
pip install .[dev] | ||
- name: Test with pytest | ||
run: pytest --cov=./ --cov-report=xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: ./coverage.xml | ||
flags: unittests | ||
fail_ci_if_error: true | ||
verbose: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
exclude: '^uvtools/data/' | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-added-large-files | ||
args: ['--maxkb=1000'] | ||
- id: check-ast | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: check-xml | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: requirements-txt-fixer | ||
- id: check-merge-conflict | ||
- id: mixed-line-ending | ||
args: ['--fix=no'] | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: '5.0.4' # pick a git hash / tag to point to | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- flake8-quotes | ||
- flake8-comprehensions | ||
- flake8-builtins | ||
- flake8-eradicate | ||
- pep8-naming | ||
- flake8-docstrings | ||
- flake8-rst-docstrings | ||
- flake8-rst | ||
- flake8-copyright | ||
|
||
# - repo: https://github.com/psf/black | ||
# rev: 22.10.0 | ||
# hooks: | ||
# - id: black | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.9.0 | ||
hooks: | ||
- id: rst-backticks | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black"] | ||
|
||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.2.2 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py38-plus] |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
from importlib.metadata import PackageNotFoundError, version | ||
|
||
from . import dspec | ||
from . import version | ||
|
||
__version__ = version.version | ||
try: | ||
from ._version import version as __version__ | ||
except ModuleNotFoundError: # pragma: no cover | ||
try: | ||
__version__ = version("hera_filters") | ||
except PackageNotFoundError: | ||
# package is not installed | ||
__version__ = "unknown" |
Oops, something went wrong.