Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from HERA-Team/infrastructure
Infrastructure
- Loading branch information
Showing
26 changed files
with
1,638 additions
and
1,006 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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
[run] | ||
omit = | ||
omit = | ||
*/tests/* | ||
*/version.py | ||
|
||
[report] | ||
omit = | ||
omit = | ||
*/tests/* | ||
*/version.py |
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,41 @@ | ||
[flake8] | ||
ignore = | ||
# No space before colon | ||
E203 | ||
W503 | ||
# Variable name should be lower case. We have some single-letter variables that make more sense to be caps. | ||
N806 | ||
# Class attribute shadows a python builtin -- not much chance of that causing a problem | ||
A003 | ||
# First line should be in imperative mood -- cached_properties don't fit this bill. | ||
D401 | ||
# Missing docstring in public class -- my docstrings are in the __init__ which seems to fail this ? | ||
D101 | ||
# Otherwise it flags down **kwargs in docstrings. | ||
RST210 | ||
N815 | ||
# Allow method names to start and end with __ | ||
N807 | ||
# allow method names to include upper-case characters | ||
N802 | ||
# allow variable names to be upper-case | ||
N803 | ||
# Missing docstring in public method: TODO: this should be removed and docs added! | ||
D102 | ||
max-line-length = 88 | ||
max-complexity = 18 | ||
inline-quotes = double | ||
docstring-convention=numpy | ||
rst-roles = | ||
class | ||
method | ||
func | ||
attr | ||
mod | ||
|
||
# Ignoring F841 allows assigning local variables without using them. This happens | ||
# because we "eval" strings which is not caught by flake8. This should be fixed in | ||
# the tests. | ||
per-file-ignores = | ||
src/linsolve/__init__.py: F401 | ||
tests/test_linsolve.py: F841 |
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 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: monthly | ||
- package-ecosystem: pip | ||
directory: "/.github/workflows" | ||
schedule: | ||
interval: monthly | ||
- package-ecosystem: pip | ||
directory: "/docs" | ||
schedule: | ||
interval: monthly | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: monthly | ||
versioning-strategy: lockfile-only | ||
allow: | ||
- dependency-type: "all" |
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,81 @@ | ||
--- | ||
# Labels names are important as they are used by Release Drafter to decide | ||
# regarding where to record them in changelog or if to skip them. | ||
# | ||
# The repository labels will be automatically configured using this file and | ||
# the GitHub Action https://github.com/marketplace/actions/github-labeler. | ||
- name: API breaking | ||
description: Breaking Changes | ||
color: e305fc | ||
- name: good first issue | ||
description: Good for newcomers | ||
color: 7057ff | ||
- name: "status: duplicate" | ||
description: This issue or pull request already exists | ||
color: d93f0b | ||
- name: "status: invalid" | ||
description: Invalid issue or pull request | ||
color: d93f0b | ||
- name: "status: requires discussion" | ||
description: Issue requires further discussion before implementation | ||
color: f71bd2 | ||
- name: "status: requires research" | ||
description: Issue requires further research before implementation | ||
color: "d93f0b" | ||
- name: "status: wontfix" | ||
description: Valid issue, but out of scope for future fixes | ||
color: "d93f0b" | ||
- name: "type: maint: dependencies" | ||
description: Pull requests that update a dependency file | ||
color: "0366d6" | ||
- name: "type: maint: documentation" | ||
description: Improvements or additions to documentation | ||
color: "0075ca" | ||
- name: "type: maint: refactoring" | ||
description: Refactoring | ||
color: ef67c4 | ||
- name: "type: maint: removal" | ||
description: Removals and Deprecations | ||
color: 9ae7ea | ||
- name: "type: maint: style" | ||
description: Style | ||
color: c120e5 | ||
- name: "type: maint: build" | ||
description: Build System and Dependencies | ||
color: bfdadc | ||
- name: "type: accuracy" | ||
description: "Enhancement that improves accuracy" | ||
color: "bfd4f2" | ||
- name: "type: bug" | ||
description: Something isn't working | ||
color: d73a4a | ||
- name: "type: feature: ui" | ||
description: New feature that adds functionality for the user | ||
color: "0e8a16" | ||
- name: "type: feature: physical" | ||
description: New feature that adds new analysis/physical model | ||
color: "0e8a16" | ||
- name: "type: testing" | ||
description: Testing improvements | ||
color: b1fc6f | ||
- name: "type: performance: memory" | ||
description: Performance improvements that reduce memory usage | ||
color: "016175" | ||
- name: "type: performance: cpu" | ||
description: Performance improvements that reduce walltime | ||
color: "016175" | ||
- name: "type: ci" | ||
description: Updates to CI (GH actions, RTD, etc.) | ||
color: "000000" | ||
- name: "type: question" | ||
description: A question about the code or documentation | ||
color: d876e3 | ||
- name: "priority: low" | ||
description: Low priority | ||
color: "BFD4F2" | ||
- name: "priority: medium" | ||
description: Medium priority | ||
color: "E99695" | ||
- name: "priority: high" | ||
description: High priority | ||
color: "B60205" |
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,62 @@ | ||
# See https://github.com/marketplace/actions/release-drafter for configuration | ||
categories: | ||
- title: ":boom: Breaking Changes" | ||
label: "API breaking" | ||
- title: ":rocket: Features" | ||
labels: | ||
- "type: feature: ui" | ||
- "type: feature: physical" | ||
- title: ":fire: Removals and Deprecations" | ||
label: "type: maint: removal" | ||
- title: ":beetle: Fixes" | ||
label: "type: bug" | ||
- title: ":racehorse: Performance" | ||
labels: | ||
- "type: performance: memory" | ||
- "type: performance: cpu" | ||
- title: ":rotating_light: Testing" | ||
label: "type: testing" | ||
- title: ":construction_worker: Continuous Integration" | ||
label: "type: ci" | ||
- title: ":books: Documentation" | ||
label: "type: maint: documentation" | ||
- title: ":hammer: Refactoring" | ||
label: "type: maint: refactoring" | ||
- title: ":lipstick: Style" | ||
label: "type: maint: style" | ||
- title: ":package: Dependencies" | ||
labels: | ||
- "type: maint: dependencies" | ||
- "type: maint: build" | ||
name-template: 'v$RESOLVED_VERSION' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
autolabeler: | ||
- label: 'type: maint: documentation' | ||
files: | ||
- '*.md' | ||
branch: | ||
- '/.*docs{0,1}.*/' | ||
- label: 'type: bug' | ||
branch: | ||
- '/fix.*/' | ||
title: | ||
- '/fix/i' | ||
- label: "type: maint: removal" | ||
title: | ||
- "/remove .*/i" | ||
- label: "type: ci" | ||
files: | ||
- '.github/*' | ||
- '.pre-commit-config.yaml' | ||
- '.coveragrc' | ||
- label: "type: maint: style" | ||
files: | ||
- ".flake8" | ||
- label: "type: maint: refactoring" | ||
title: | ||
- "/.* refactor.*/i" | ||
|
||
template: | | ||
## Changes | ||
$CHANGES |
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,14 @@ | ||
name: auto-merge | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
auto-merge: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ahmadnassri/action-dependabot-auto-merge@v2 | ||
with: | ||
target: minor | ||
github-token: ${{ secrets.AUTO_MERGE }} |
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 | ||
run: | | ||
python -m build . | ||
- 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,17 @@ | ||
name: Labeler | ||
|
||
on: push | ||
|
||
jobs: | ||
labeler: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Labeler | ||
uses: crazy-max/ghaction-github-labeler@v4.1.0 | ||
with: | ||
yaml-file: .github/labels.yml |
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,37 +1,30 @@ | ||
name: Publish Python distributions to PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build-n-publish: | ||
name: Build and publish to PyPI | ||
name: Make Release on PyPI and Github | ||
runs-on: ubuntu-latest | ||
env: | ||
ENV_NAME: publish | ||
PYTHON: "3.10" | ||
steps: | ||
- uses: actions/checkout@main | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON }} | ||
python-version: "3.10" | ||
|
||
- name: Install build | ||
- name: Install Build Tools | ||
run: pip install build | ||
|
||
- name: Build a binary wheel and a source tarball | ||
- name: Build a binary wheel | ||
run: | | ||
python -m build | ||
python -m build . | ||
- name: Publish to PyPI | ||
if: startsWith(github.event.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_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 |
---|---|---|
|
@@ -7,4 +7,4 @@ dist/* | |
*.ipynb_checkpoints* | ||
coverage.xml | ||
*.DS_Store | ||
*/_version.py | ||
*/_version.py |
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,57 @@ | ||
exclude: '^docs/conf.py|^devel/|^tests/data/' | ||
|
||
ci: | ||
autoupdate_schedule: monthly | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-added-large-files | ||
- 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: mixed-line-ending | ||
args: ['--fix=no'] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.7.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.0.0 # 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/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: rst-backticks | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.9.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py38-plus] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.