-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
32 update repos to current standards (#61)
* from setup.py to pyproject.toml * fixed installation and updated github links to deltares * Bump version: 0.2.0 → 0.2.1 * enable github testbank * added readme badges * added pypi upload workflow
- Loading branch information
1 parent
80fc95b
commit d20d6b7
Showing
14 changed files
with
198 additions
and
123 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 @@ | ||
[bumpversion] | ||
current_version = 0.2.1 | ||
commit = True | ||
tag = True | ||
|
||
[bumpversion:file:pyproject.toml] | ||
search = version = "{current_version}" | ||
replace = version = "{new_version}" | ||
|
||
[bumpversion:file:ddlpy/__init__.py] | ||
search = __version__ = '{current_version}' | ||
replace = __version__ = '{new_version}' |
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,27 @@ | ||
name: pypi-upload | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -e .[dev] | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python -m build | ||
twine check dist/* | ||
twine upload dist/* |
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,44 @@ | ||
name: pytest | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# we assume it also works for inbetween versions | ||
python-version: ["3.8", "3.11", "3.12"] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -e .[dev] | ||
- name: list env contents | ||
run: | | ||
pip list | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
pytest -m "not requireslocaldata" --cov=ddlpy --cov-report xml --cov-report term | ||
- uses: codecov/codecov-action@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 |
---|---|---|
|
@@ -25,5 +25,5 @@ deploy: | |
secure: PLEASE_REPLACE_ME | ||
on: | ||
tags: true | ||
repo: SiggyF/ddlpy | ||
repo: Deltares/ddlpy | ||
python: 3.6 |
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
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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
[build-system] | ||
requires = ["setuptools>=64.0.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "ddlpy" | ||
version = "0.2.1" | ||
maintainers = [ | ||
{ name = "Fedor Baart", email = "fedor.baart@deltares.nl"}, | ||
{ name = "Jelmer Veenstra", email = "jelmer.veenstra@deltares.nl"}, | ||
] | ||
description = "Service from Rijkswaterstaat for distributing water quantity data." | ||
readme = "README.md" | ||
keywords = ["ddlpy"] | ||
license = { text = "GPLv3" } | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
#numpy 1.21 is EOL since june 2023 | ||
"numpy>=1.22", | ||
"pandas", | ||
"python-dateutil>=2.8", | ||
"tqdm", | ||
"click", | ||
] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Operating System :: OS Independent", | ||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
"Natural Language :: English", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", # TODO: update this | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
|
||
[project.urls] | ||
Home = "https://github.com/deltares/ddlpy" | ||
Code = "https://github.com/deltares/ddlpy" | ||
Issues = "https://github.com/deltares/ddlpy/issues" | ||
|
||
[project.optional-dependencies] | ||
dev = [ #TODO: maybe remove some of these | ||
"bump2version>=0.5.11", | ||
"flake8", | ||
"pytest>=3.8.2", | ||
"pytest-cov", | ||
"twine", | ||
"build", | ||
"watchdog>=0.9.0", | ||
"flake8>=3.5.0", | ||
"tox>=3.5.2", | ||
"coverage>=4.5.1", | ||
"Sphinx>=1.8.1", | ||
"twine>=1.12.1", | ||
"pytest-runner>=4.2", | ||
] | ||
examples = [ | ||
"jupyter", | ||
"notebook", | ||
] | ||
|
||
[project.scripts] | ||
ddlpy = "ddlpy.cli:cli" | ||
|
||
[tool.setuptools] | ||
packages = ["ddlpy"] | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["tests"] | ||
addopts = "--durations=0" | ||
|
||
[tool.flake8] | ||
exclude = "docs" |
Oops, something went wrong.