Skip to content

Commit

Permalink
Merge branch 'release/3.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadain committed Jul 3, 2024
2 parents f3a08e4 + 6d73191 commit d5fe59d
Show file tree
Hide file tree
Showing 13 changed files with 601 additions and 276 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install pipenv, build dependencies
run: |
python -m pip install pipenv
pipenv install --dev
- name: Build source package
run: |
pipenv run python -m build --sdist
- name: Build wheels
run: |
pipenv run python -m cibuildwheel --output-dir dist
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This workflow will install Python dependencies, run tests and lint for Python 3.9
# This workflow will install Python dependencies, run tests and lint for Python 3.10
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test
Expand All @@ -16,12 +16,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
python-version: ["3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 3.2.0

- Add support for Python 3.9, 3.10
- Add wheels for Linux for Python 3.8, 3.9, 3.10
- Add instructions for installing in other platforms
- Automated publishing to PyPI via GitHub Actions
- Allow installing any modern `certifi`

## 3.1.0

- Fix SummaryLoad outputs to include "Low-Density Open Space", and exclude
Expand Down
1 change: 0 additions & 1 deletion DESCRIPTION.rst

This file was deleted.

1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include DESCRIPTION.rst
include *.md
include *.py
include LICENSE
Expand Down
13 changes: 7 additions & 6 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ verify_ssl = true
name = "pypi"

[packages]
certifi = "==2021.5.30"
certifi = ">=2021"
funcsigs = "==1.0.2"
llvmlite = "==0.37.0"
nose = "==1.3.7"
numpy = "==1.20.3"
numba = "==0.54.0"
llvmlite = "==0.38.*"
pynose = "==1.5.*"
numpy = "==1.21.*"
numba = "==0.55.*"

[dev-packages]
build = "*"
cibuildwheel = "*"
twine = "*"

[requires]
python_version = "3.9"
python_version = "3.10"
697 changes: 517 additions & 180 deletions Pipfile.lock

Large diffs are not rendered by default.

56 changes: 12 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# gwlf-e
Port of Generalized Watersheds Loading Functions - Enhanced (MapShed)

[![Build Status](https://travis-ci.org/WikiWatershed/gwlf-e.svg?branch=develop)](https://travis-ci.org/WikiWatershed/gwlf-e)

## Installation

Install using `pip`:
Expand All @@ -11,9 +9,18 @@ Install using `pip`:
$ pip install gwlf-e
```

For Linux x64 on Python 3.8, 3.9, and 3.10 the above will pull a published wheel.
For other platforms, a wheel would have to be built.
In that case, you may also need to install `setuptools`, `wheel`, and `build` to compile it locally:

```bash
$ pip install wheel build
$ pip install --no-build-isolation gwlf-e
```

## Development

Ensure you have Python 3.9 and [pipenv](https://pipenv.pypa.io/en/latest/) available. Then run:
Ensure you have Python 3.10 and [pipenv](https://pipenv.pypa.io/en/latest/) available. Then run:

```bash
$ pipenv sync
Expand Down Expand Up @@ -41,50 +48,11 @@ $ vim CHANGELOG.md
$ vim setup.py
$ git add CHANGELOG.md setup.py
$ git commit -m "3.0.0"
$ git flow release publish 3.0.0
```

Then create a wheel to publish to PyPI using [build](https://github.com/pypa/build):

```console
$ pipenv run python -m build
```

This should create two files under `dist/`:

```console
$ ls -1 dist/
gwlf-e-3.0.0.tar.gz
gwlf_e-3.0.0-cp39-cp39-macosx_11_0_x86_64.whl
```

Then publish the wheel to PyPI using [twine](https://github.com/pypa/twine/) and credentials from LastPass:

```console
$ python -m twine check dist/*
Checking dist/gwlf_e-3.0.0-cp39-cp39-macosx_11_0_x86_64.whl: PASSED
Checking dist/gwlf-e-3.0.0.tar.gz: PASSED
```
```console
$ python -m twine upload dist/*
Uploading distributions to https://upload.pypi.org/legacy/
Enter your username: azavea
Enter your password:
Uploading gwlf_e-3.0.0-cp39-cp39-macosx_11_0_x86_64.whl
100%|
Uploading gwlf-e-3.0.0.tar.gz
100%|

View at:
https://pypi.org/project/gwlf-e/3.0.0/
```

Finally, finish the release:

```console
$ git flow release finish -p 3.0.0
```

When the tag is pushed up, [GitHub Actions](./.github/workflows/release.yml) will publish a release to PyPI.

## License

This project is licensed under the terms of the Apache 2.0 license.
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
requires = [
"setuptools>=42",
"wheel>=0.31",
"cibuildwheel>=2.13",
"twine>=1.11",
'numba==0.54.0',
'numba==0.55.*',
]

[tool.cibuildwheel]
build = "cp38-manylinux_* cp39-manylinux_* cp310-manylinux_*"
archs = "x86_64"
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
certifi==2021.5.30
certifi>=2021
funcsigs==1.0.2
llvmlite==0.37.0
nose==1.3.7
numpy==1.20.3
numba==0.54.0
llvmlite==0.38.*
pynose==1.5.*
numpy==1.21.*
numba==0.55.*
20 changes: 10 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@
from gwlfe.MultiUse_Fxns.Runoff.WashImperv_inner import cc as wipcc
from gwlfe.MultiUse_Fxns.Runoff.WashPerv_inner import cc as wpcc

# Get the long description from DESCRIPTION.rst
# Get the long description from README.md
with open(path.join(path.abspath(path.dirname(__file__)),
'DESCRIPTION.rst'), encoding='utf-8') as f:
'README.md'), encoding='utf-8') as f:
long_description = f.read()

tests_require = [
'nose == 1.3.7',
'pynose == 1.5.*',
'coverage == 4.0.3'
]

setup(
name='gwlf-e',
version='3.1.0',
version='3.2.0',
description='A Python port of Generalized Watersheds Loading Functions - Enhanced (MapShed)',
long_description=long_description,
long_description_content_type='text/x-rst',
long_description_content_type='text/markdown',
url='https://github.com/WikiWatershed/gwlf-e',
author='Azavea Inc.',
author_email='[email protected]',
Expand All @@ -52,12 +52,12 @@
packages=find_packages(exclude=['test']),
python_requires=">=3.7",
install_requires=[
'certifi==2021.5.30',
'certifi>=2021',
'funcsigs==1.0.2',
'llvmlite==0.37.0',
'nose==1.3.7',
'numpy==1.20.3',
'numba==0.54.0',
'llvmlite==0.38.*',
'pynose==1.5.*',
'numpy==1.21.*',
'numba==0.55.*',
],
extras_require={
'dev': [],
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tox]
envlist = py39
envlist = py310

[testenv]
basepython =
py39: python3.9
py310: python3.10
deps =
check-manifest
readme_renderer
Expand Down

0 comments on commit d5fe59d

Please sign in to comment.