-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bump deps, switch to pyproject.toml
- Loading branch information
Showing
10 changed files
with
162 additions
and
202 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,29 @@ | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Build | ||
run: | | ||
pip install build | ||
python -m build | ||
- name: Publish | ||
# mimics: twine upload dist/* --skip-existing | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
skip_existing: true |
This file was deleted.
Oops, something went wrong.
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
Large diffs are not rendered by default.
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,15 +1,17 @@ | ||
""" | ||
gridfinder package contains the following modules: | ||
- _util.py : helper functions used internally | ||
- gridfinder.py : main implementation of Dijkstra's algorithm | ||
- prepare.py : transforming input data into the cost and targets arrays | ||
- post.py : postprocess the algorithm output and check accuracy | ||
- _util.py : helper functions used internally | ||
- prepare.py : transforming input data into the cost and targets arrays | ||
""" | ||
|
||
__version__ = "1.1.1" | ||
from importlib.metadata import version | ||
|
||
from ._util import * # NoQA | ||
from .gridfinder import * # NoQA | ||
from .post import * # NoQA | ||
from .prepare import * # NoQA | ||
|
||
from .prepare import * | ||
from .gridfinder import * | ||
from .post import * | ||
from ._util import * | ||
__version__ = version("gridfinder") |
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,99 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=65", | ||
"wheel>=0.37.1", | ||
"setuptools-scm[toml]>=7.0.5", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "gridfinder" | ||
description = "Algorithm for guessing MV grid network based on night time lights" | ||
readme = "README.md" | ||
license = {text = "MIT License"} | ||
requires-python = ">=3.8" | ||
keywords = ["ntl", "electricity", "grid"] | ||
|
||
authors = [ | ||
{name = "Chris Arderne", email="[email protected]"}, | ||
] | ||
|
||
dynamic = ["version"] | ||
|
||
classifiers = [ | ||
"Environment :: Console", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
] | ||
|
||
dependencies = [ | ||
"affine ~= 2.4", | ||
"click ~= 8.0", | ||
"fiona ~= 1.9", | ||
"geopandas ~= 0.14", | ||
"numpy ~= 1.26", | ||
"pandas ~= 2.2", | ||
"pillow ~= 10.2", | ||
"pyproj ~= 3.6", | ||
"rasterio ~= 1.3", | ||
"Rtree ~= 1.2", | ||
"scikit-image ~= 0.22", | ||
"scipy ~= 1.12", | ||
"Shapely ~= 2.0", | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"branca ~= 0.7", | ||
"descartes ~= 1.1.0", | ||
"folium ~= 0.15", | ||
"matplotlib ~= 3.8", | ||
"seaborn ~= 0.13", | ||
] | ||
|
||
[project.urls] | ||
homepage = "https://gridfinder.rdrn.me" | ||
repository = "https://github.com/carderne/gridfinder" | ||
|
||
[tool.setuptools] | ||
packages = ["gridfinder"] | ||
|
||
[tool.setuptools_scm] | ||
|
||
[tool.black] | ||
line-length = 88 | ||
|
||
[tool.ruff] | ||
target-version = "py38" | ||
exclude = [] | ||
|
||
[tool.ruff.lint] | ||
select = [ | ||
"F", | ||
"E", | ||
"I", | ||
"U", | ||
"N", | ||
"E", | ||
"S", | ||
"T100", | ||
"A", | ||
"Q", | ||
"ANN", | ||
] | ||
|
||
[tool.ruff.lint.isort] | ||
known-first-party = ["gridfinder"] | ||
|
||
[tool.mypy] | ||
show_error_codes = true | ||
show_error_context = true | ||
show_traceback = true | ||
disallow_untyped_defs = true | ||
disallow_any_unimported = true | ||
no_implicit_optional = true | ||
check_untyped_defs = true | ||
warn_return_any = true | ||
warn_unused_ignores = true | ||
warn_unreachable = true |
This file was deleted.
Oops, something went wrong.