-
Notifications
You must be signed in to change notification settings - Fork 0
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 #29 from nens/eli-remove-setuppy-setupcfg
remove setuppy setupcfg, clean up workflows
- Loading branch information
Showing
13 changed files
with
198 additions
and
135 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,24 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- fixes_* | ||
tags: | ||
- '*' | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Run black, flake8, isort | ||
uses: pre-commit/[email protected] |
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,61 @@ | ||
name: Build and publish | ||
|
||
# Run on PR requests. And on master itself. | ||
on: | ||
push: | ||
branches: | ||
- master # just build the sdist skip release | ||
tags: | ||
- "*" | ||
pull_request: # also build on PRs touching some files | ||
paths: | ||
- ".github/workflows/release.yml" | ||
- "MANIFEST.in" | ||
- "setup.cfg" | ||
- "pyproject.toml" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Build a source tarball | ||
run: | | ||
python -m pip install build | ||
python -m build | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./dist/* | ||
retention-days: 5 | ||
|
||
publish: | ||
name: Publish on GitHub and PyPI | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
# release on every tag | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- name: Upload Github release | ||
id: upload-release-asset | ||
uses: softprops/action-gh-release@v2 | ||
|
||
- name: Upload Release Assets to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_UPLOAD_TOKEN }} |
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,19 @@ | ||
default_language_version: | ||
python: python3 | ||
repos: | ||
- repo: https://github.com/pycqa/isort | ||
rev: '5.13.2' | ||
hooks: | ||
- id: isort | ||
exclude: 'settings' | ||
- repo: https://github.com/psf/black | ||
rev: '24.8.0' | ||
hooks: | ||
- id: black | ||
exclude: 'migrations*|urls*|settings*|setup.py' | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: '7.1.1' | ||
hooks: | ||
- id: flake8 | ||
# NB The "exclude" setting in setup.cfg is ignored by pre-commit | ||
exclude: 'migrations*|urls*|settings*' |
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
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 @@ | ||
__version__ = "0.2.dev0" |
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,43 @@ | ||
[project] | ||
name = "batch-calculator" | ||
dynamic = ["version"] | ||
description = "3Di batch calculations" | ||
readme = "README.rst" | ||
license = {text = "MIT"} | ||
authors = [ | ||
{ name = "Daan van Ingen", email = "[email protected]" }, | ||
] | ||
keywords = [] | ||
classifiers = [ | ||
"Framework :: Django", | ||
"Programming Language :: Python", | ||
"License :: OSI Approved :: MIT License", | ||
] | ||
dependencies = [ | ||
"click", | ||
"netCDF4", | ||
"pandas", | ||
"threedi-api-client>=4.0.0", | ||
"threedigrid>=1.0.16", | ||
] | ||
|
||
[project.scripts] | ||
process-rain-series-results = "batch_calculator.process_results:process_results" | ||
run-rain-series-simulations = "batch_calculator.rain_series_simulations:create_rain_series_simulations" | ||
|
||
[project.urls] | ||
Repository = "https://github.com/nens/threedi-urban-eia-nl" | ||
Changelog = "https://github.com/nens/threedi-urban-eia-nl/blob/master/CHANGES.rst" | ||
|
||
[tool.setuptools] | ||
packages = ["batch_calculator"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "batch_calculator.__version__"} | ||
|
||
[tool.zest-releaser] | ||
release = false | ||
|
||
[tool.isort] | ||
profile = "black" | ||
force_alphabetical_sort_within_sections = true |
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,9 +1,3 @@ | ||
[tool:pytest] | ||
addopts = --black --flakes --cov --cache-clear batch_calculator | ||
|
||
[zest.releaser] | ||
# Releasing to pypi is done automatically by travis-ci.com (once set up) | ||
release = no | ||
|
||
[flake8] | ||
max-line-length = 90 | ||
max-line-length = 88 | ||
extend-ignore = E203,E701 |
Oops, something went wrong.