-
Notifications
You must be signed in to change notification settings - Fork 40
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 #74 from blaylockbk/72-review-required-package-ver…
…sions-in-build-process Modernize install using only pyproject.toml and add some GitHub Actions
- Loading branch information
Showing
10 changed files
with
233 additions
and
101 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,33 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- "20*" | ||
|
||
jobs: | ||
pypi-release: | ||
name: Publish release on PyPI | ||
runs-on: ubuntu-latest | ||
environment: release | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Build source and wheel distributions | ||
run: | | ||
python -m pip install --upgrade build twine | ||
python -m build | ||
twine check --strict dist/* | ||
- name: Publish distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
# Remember to manually create release on GitHub using the same tag. |
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,66 @@ | ||
name: Tests (Python) | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
# Allow job to be triggered manually. | ||
workflow_dispatch: | ||
|
||
# Cancel in-progress jobs when pushing to the same branch. | ||
concurrency: | ||
cancel-in-progress: true | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
tests: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ["3.9", "3.10", "3.11"] | ||
# In order to save resources, only run particular | ||
# matrix slots on other OS than Linux. | ||
include: | ||
- os: "macos-latest" | ||
python-version: "3.11" | ||
- os: "windows-latest" | ||
python-version: "3.11" | ||
|
||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: ${{ matrix.python-version }} | ||
|
||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
|
||
name: Python ${{ matrix.python-version }} on OS ${{ matrix.os }} | ||
steps: | ||
|
||
- name: Acquire sources | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
cache: 'pip' | ||
cache-dependency-path: 'setup.cfg' | ||
|
||
- name: Install project | ||
run: | | ||
pip3 install --requirement=requirements-test.txt | ||
pip3 install --editable=. | ||
- name: Run tests | ||
env: | ||
TMPDIR: ${{ runner.temp }} | ||
run: | | ||
pytest |
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,11 +1,93 @@ | ||
[project] | ||
name = "goes2go" | ||
description = "Retrieve GOES-16/17 data from AWS. Also proves some RGB recipes." | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
license = { file = "LICENSE" } | ||
authors = [{ name = "Brian K. Blaylock", email = "[email protected]" }] | ||
maintainers = [{ name = "Brian K. Blaylock", email = "[email protected]" }] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Operating System :: MacOS", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: POSIX :: Linux", | ||
"License :: OSI Approved :: MIT License", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering :: Atmospheric Science", | ||
|
||
] | ||
keywords = [ | ||
"weather", | ||
"meteorology", | ||
"satellite", | ||
"atmosphere", | ||
"GOES", | ||
"xarray", | ||
"AWS", | ||
"NOAA", | ||
] | ||
dependencies = [ | ||
"cartopy>=0.22.0", | ||
"h5netcdf", | ||
"matplotlib", | ||
"metpy", | ||
"numpy", | ||
"pandas", | ||
"s3fs>=2023.6.0", | ||
"toml", | ||
"xarray", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/blaylockbk/goes2go" | ||
"Documentation" = "https://goes2go.readthedocs.io/" | ||
"Repository" = "https://github.com/blaylockbk/goes2go" | ||
"Changelog" = "https://github.com/blaylockbk/goes2go/releases" | ||
"Bug Tracker" = "https://github.com/blaylockbk/goes2go/issues" | ||
|
||
[project.optional-dependencies] | ||
docs = [ | ||
"autodocsumm", | ||
"linkify-it-py", | ||
"myst-parser", | ||
"nbconvert", | ||
"nbsphinx", | ||
"pydata-sphinx-theme", | ||
"recommonmark", | ||
"sphinx", | ||
"sphinx-autosummary-accessors", | ||
"sphinx-design", | ||
"sphinx-markdown-tables", | ||
"sphinxcontrib-mermaid", | ||
] | ||
|
||
test = ["pytest", "black", "isort"] | ||
|
||
[build-system] | ||
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools] | ||
packages = ["goes2go"] | ||
|
||
[tool.setuptools_scm] | ||
version_scheme = "post-release" | ||
local_scheme = "no-local-version" | ||
write_to = "goes2go/_version.py" | ||
|
||
[tool.isort] | ||
profile = "black" | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "2.0" | ||
addopts = "-rsfEX -p pytester --strict-markers --verbosity=3" | ||
log_level = "DEBUG" | ||
testpaths = ["tests"] | ||
xfail_strict = true | ||
markers = [] |
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 @@ | ||
pytest<8 |
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,8 +1,10 @@ | ||
cartopy>=0.22.0 | ||
h5netcdf | ||
matplotlib | ||
metpy | ||
numpy | ||
pandas | ||
xarray | ||
metpy | ||
s3fs>=2023.6.0 | ||
toml | ||
cartopy | ||
matplotlib | ||
xarray | ||
git+https://github.com/blaylockbk/Carpenter_Workshop.git |
Oops, something went wrong.