-
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 #48 from soar-telescope/update_publish_action
Update publish action
- Loading branch information
Showing
13 changed files
with
200 additions
and
252 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 |
---|---|---|
@@ -1,31 +1,45 @@ | ||
|
||
# This workflows will upload a Python Package using Twine when a release is created | ||
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | ||
|
||
name: Upload to PYPI | ||
|
||
on: | ||
release: | ||
types: [created] | ||
on: push | ||
|
||
jobs: | ||
deploy: | ||
|
||
release-build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine build | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python -m build . | ||
twine upload dist/* | ||
python3 -m pip install build | ||
- name: Build a binary wheel and source tarball | ||
run: python3 -m build | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: release-dists | ||
path: dist/ | ||
|
||
pypi-publish: | ||
name: Publish Package to PyPI | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
needs: | ||
- release-build | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- name: Retrieve release distributions | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: release-dists | ||
path: dist/ | ||
- name: Publish release distributions to PyPI | ||
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 |
---|---|---|
|
@@ -5,3 +5,8 @@ build/* | |
*__pycache__* | ||
*.egg-info/* | ||
.tox/* | ||
/coverage.xml | ||
/.tox/ | ||
/.coverage* | ||
/goodman_focus/version.py | ||
.DS_Store |
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,6 +1,5 @@ | ||
version: 2 | ||
|
||
|
||
build: | ||
os: ubuntu-lts-latest | ||
tools: | ||
|
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 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,6 +1,6 @@ | ||
name: goodman_focus | ||
dependencies: | ||
- python=3.8 | ||
- python=3.12 | ||
- astropy | ||
- matplotlib | ||
- numpy | ||
|
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,3 +1,6 @@ | ||
from .version import __version__ # noqa: F401 | ||
from importlib.metadata import version | ||
|
||
from .goodman_focus import GoodmanFocus # noqa: F401 | ||
from .goodman_focus import run_goodman_focus # noqa: F401 | ||
|
||
__version__ = version('goodman_focus') |
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,7 +1,72 @@ | ||
[build-system] | ||
requires = ["setuptools>=64", "setuptools_scm>=8"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
requires = ["setuptools", | ||
"setuptools_scm", | ||
"wheel"] | ||
[project] | ||
name = "goodman_focus" | ||
dynamic = ["version"] | ||
description = "Finds best focus for Goodman HTS based on a series of images obtained with different focus values" | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
license = {file = "LICENSE"} | ||
keywords = [ | ||
"soar", | ||
"pipelines", | ||
"astronomy", | ||
"images", | ||
"spectroscopy", | ||
"focus" | ||
] | ||
|
||
build-backend = 'setuptools.build_meta' | ||
authors = [ | ||
{name = "Simón Torres", email = "[email protected]"} | ||
] | ||
maintainers = [ | ||
{name = "Simón Torres", email = "[email protected]"} | ||
] | ||
|
||
classifiers = [ | ||
'Development Status :: 5 - Production/Stable', | ||
'Environment :: Console', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Education', | ||
'Intended Audience :: Science/Research', | ||
'License :: OSI Approved :: BSD License', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
'Programming Language :: Python :: 3.12', | ||
'Natural Language :: English', | ||
'Operating System :: POSIX :: Linux', | ||
'Operating System :: POSIX :: Other', | ||
'Operating System :: MacOS :: MacOS X', | ||
'Topic :: Scientific/Engineering :: Astronomy', | ||
'Topic :: Scientific/Engineering :: Information Analysis', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
] | ||
|
||
dependencies = [ | ||
"astropy", | ||
"ccdproc", | ||
"matplotlib", | ||
"numpy", | ||
"packaging", | ||
"pandas", | ||
"scipy", | ||
] | ||
|
||
[project.urls] | ||
"Homepage" = "https://soardocs.readthedocs.io/projects/goodmanfocus/en/latest/" | ||
"Bug Reports" = "https://github.com/soar-telescope/goodman_focus/issues" | ||
"Source" = "https://github.com/soar-telescope/goodman_focus" | ||
|
||
[project.scripts] | ||
goodman-focus = "goodman_focus:run_goodman_focus" | ||
|
||
[tool.setuptools] | ||
[tool.setuptools.packages.find] | ||
where = ["goodman_focus"] | ||
|
||
[tool.setuptools_scm] | ||
version_file = "goodman_focus/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 |
---|---|---|
|
@@ -11,25 +11,3 @@ build_dir = docs/_build | |
[upload_docs] | ||
upload_dir = docs/_build/html | ||
show_response = 1 | ||
|
||
[metadata] | ||
package_name = goodman_focus | ||
description = Finds best focus for Goodman HTS based on a series of images obtained with different focus values | ||
long_description = Standalone app to get the best focus. | ||
author = Simon Torres | ||
author_email = [email protected] | ||
license = BSD-3-Clause | ||
# url = | ||
edit_on_github = False | ||
github_project = soar-telescope/goodman_focus | ||
install_requires = | ||
astropy | ||
matplotlib | ||
numpy | ||
pandas | ||
scipy | ||
ccdproc | ||
sphinx | ||
|
||
# version should be PEP440 compatible (http://www.python.org/dev/peps/pep-0440) | ||
version = 2.0.3 |
Oops, something went wrong.