-
Notifications
You must be signed in to change notification settings - Fork 10
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 #178 from mwcraig/update-setup
Switch to hatch/pyproject
- Loading branch information
Showing
8 changed files
with
124 additions
and
2,325 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,12 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
# Open update PRs in groups rather than one-by-one | ||
groups: | ||
actions: | ||
patterns: | ||
- "*" |
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,55 @@ | ||
name: Build and upload to PyPI | ||
|
||
on: | ||
# Allow manual triggering of the workflow, but note that the upload | ||
# to PyPI step will not run manual trigger. | ||
workflow_dispatch: | ||
# Run workflow on pullrequests, but note that the upload to PyPI step | ||
# will not run on pull requests. | ||
pull_request: | ||
# Run workflow on push to main branch, but note that the upload to | ||
# PyPI step will not run on pushes. We could change that if we wanted | ||
# to have it publish on tags -- see the upload_pypi job below. | ||
push: | ||
branches: | ||
- main | ||
# Run workflow on GitHub release done through the UI -- this is the only | ||
# time the upload to PyPI step will run. | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build_wheel_sdist: | ||
name: Build wheel and sdist | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build wheel and sdist | ||
run: pipx run build | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheel-sdist | ||
path: dist/* | ||
|
||
upload_pypi: | ||
needs: [build_wheel_sdist] | ||
runs-on: ubuntu-latest | ||
environment: publish | ||
permissions: | ||
id-token: write | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this) | ||
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
# unpacks all CIBW artifacts into dist/ | ||
pattern: wheel-sdist | ||
path: dist | ||
merge-multiple: true | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 |
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ reducer.egg-info | |
docs/_build | ||
docs/api | ||
.ropeproject | ||
_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,56 @@ | ||
[build-system] | ||
requires = ["hatchling", "hatch-vcs"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "reducer" | ||
dynamic = ["version"] | ||
description = "Process FITS files" | ||
readme = "README.rst" | ||
license = "BSD-3-clause" | ||
authors = [ | ||
{ name = "Matt Craig", email = "[email protected]" }, | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Scientific/Engineering :: Astronomy", | ||
] | ||
dependencies = [ | ||
"astropy>=4.0", | ||
"ccdproc>=2", | ||
"dask", | ||
"ipywidgets >=7.5", | ||
"matplotlib", | ||
"msumastro>=1", | ||
"numpy", | ||
"scikit-image", | ||
"scipy", | ||
] | ||
|
||
[project.optional-dependencies] | ||
docs = [ | ||
"numpydoc", | ||
"sphinx-argparse", | ||
"sphinx_rtd_theme", | ||
] | ||
|
||
[project.scripts] | ||
reducer = "reducer:main" | ||
|
||
[project.urls] | ||
Homepage = "http://reducer.readthedocs.org" | ||
|
||
[tool.hatch.version] | ||
source = "vcs" | ||
|
||
[tool.hatch.build.hooks.vcs] | ||
version-file = "reducer/_version.py" | ||
|
||
[tool.hatch.build.targets.sdist] | ||
include = [ | ||
"/reducer", | ||
] |
Oops, something went wrong.