-
Notifications
You must be signed in to change notification settings - Fork 3
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 #19 from larrybradley/packaging
Move package metadata to pyproject.toml
- Loading branch information
Showing
23 changed files
with
498 additions
and
314 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
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,46 @@ | ||
name: Wheel building | ||
|
||
on: | ||
schedule: | ||
# run every Monday at 5am UTC | ||
- cron: '0 5 * * 1' | ||
pull_request: | ||
# We also want this workflow triggered if the 'Build all wheels' | ||
# label is added or present when PR is updated | ||
types: | ||
- synchronize | ||
- labeled | ||
push: | ||
branches: | ||
- '*' | ||
tags: | ||
- '*' | ||
- '!*dev*' | ||
- '!*pre*' | ||
- '!*post*' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build_and_publish: | ||
# This job builds the wheels and publishes them to PyPI for all | ||
# tags, except those ending in ".dev". For PRs with the "Build all | ||
# wheels" label, wheels are built, but are not uploaded to PyPI. | ||
|
||
permissions: | ||
contents: none | ||
|
||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 | ||
|
||
if: (github.repository == 'larrybradley/lacosmic' && (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Build all wheels'))) | ||
with: | ||
# We upload to PyPI for all tag pushes, except tags ending in .dev | ||
upload_to_pypi: ${{ startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref, '.dev') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }} | ||
|
||
test_extras: test | ||
test_command: pytest -p no:warnings --pyargs lacosmic | ||
|
||
secrets: | ||
pypi_token: ${{ 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
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,86 @@ | ||
ci: | ||
autofix_prs: false | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-added-large-files | ||
# Prevent giant files from being committed. | ||
- id: check-ast | ||
# Simply check whether files parse as valid python. | ||
- id: check-case-conflict | ||
# Check for files with names that would conflict on a case-insensitive | ||
# filesystem like MacOS HFS+ or Windows FAT. | ||
- id: check-json | ||
# Attempts to load all json files to verify syntax. | ||
- id: check-merge-conflict | ||
# Check for files that contain merge conflict strings. | ||
- id: check-symlinks | ||
# Checks for symlinks which do not point to anything. | ||
- id: check-toml | ||
# Attempts to load all TOML files to verify syntax. | ||
- id: check-xml | ||
# Attempts to load all xml files to verify syntax. | ||
- id: check-yaml | ||
# Attempts to load all yaml files to verify syntax. | ||
- id: debug-statements | ||
# Check for debugger imports and py37+ breakpoint() calls in python | ||
# source. | ||
- id: detect-private-key | ||
# Checks for the existence of private keys. | ||
- id: end-of-file-fixer | ||
# Makes sure files end in a newline and only a newline. | ||
exclude: ".*(svg.*|extern.*|_templates.*)$" | ||
- id: trailing-whitespace | ||
# Trims trailing whitespace. | ||
exclude: ".*(data.*|extern.*)$" | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: python-check-mock-methods | ||
# Prevent common mistakes of assert mck.not_called(), assert | ||
# mck.called_once_with(...) and mck.assert_called. | ||
- id: rst-directive-colons | ||
# Detect mistake of rst directive not ending with double colon. | ||
- id: rst-inline-touching-normal | ||
# Detect mistake of inline code touching normal text in rst. | ||
- id: text-unicode-replacement-char | ||
# Forbid files which have a UTF-8 Unicode replacement character. | ||
- id: python-check-blanket-noqa | ||
# Enforce that all noqa annotations always occur with specific codes. | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.11.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: ["--py39-plus"] | ||
exclude: ".*(extern.*)$" | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
additional_dependencies: [toml] | ||
- id: isort | ||
name: isort (cython) | ||
types: [cython] | ||
additional_dependencies: [toml] | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.1.0 | ||
hooks: | ||
- id: flake8 | ||
args: ["--ignore", "E501,W503"] | ||
|
||
- repo: https://github.com/asottile/yesqa | ||
rev: v1.5.0 | ||
hooks: | ||
- id: yesqa | ||
|
||
# - repo: https://github.com/MarcoGorelli/absolufy-imports | ||
# rev: v0.3.1 | ||
# hooks: | ||
# - id: absolufy-imports |
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
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
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,10 @@ | ||
comment: off | ||
codecov: | ||
branch: main | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: auto | ||
# this allows a small drop from the previous base commit coverage | ||
threshold: 0.05% |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.