Skip to content

Commit

Permalink
Modernize pyproject.toml and remove versioneer (#45)
Browse files Browse the repository at this point in the history
Modernize pyproject.toml and remove versioneer
  • Loading branch information
eriknw authored Feb 20, 2023
1 parent 1180e1c commit 3e74938
Show file tree
Hide file tree
Showing 13 changed files with 220 additions and 2,997 deletions.
17 changes: 17 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[flake8]
max-line-length = 100
inline-quotes = "
exclude =
graphblas_algorithms/*/tests/,
graphblas_algorithms/*/*/tests/,
build/
extend-ignore =
E203,
SIM105,
SIM401,
# E203 whitespace before ':' (to be compatible with black)
per-file-ignores =
__init__.py:F401,F403, # allow unused and star imports
test_*.py:F401,F403,
graphblas_algorithms/nxapi/exception.py:F401,
graphblas_algorithms/**/__init__.py:F401,F403
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ repos:
rev: 23.1.0
hooks:
- id: black
args: [--target-version=py38]
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
Expand All @@ -68,6 +67,7 @@ repos:
hooks:
- id: codespell
types_or: [python, rst, markdown]
additional_dependencies: [tomli]
files: ^(graphblas_algorithms|docs)/
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand Down
4 changes: 0 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
recursive-include graphblas_algorithms *.py
include setup.py
include setup.cfg
include README.md
include LICENSE
include MANIFEST.in
include versioneer.py
include requirements.txt
include graphblas_algorithms/_version.py
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ dependencies:
- requests
# For debugging
- icecream
- ipykernel
- ipython
# For type annotations
- mypy
14 changes: 12 additions & 2 deletions graphblas_algorithms/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
from . import _version
import importlib.metadata

from .classes import *

from .algorithms import * # isort:skip

__version__ = _version.get_versions()["version"]
try:
__version__ = importlib.metadata.version("graphblas-algorithms")
except Exception as exc: # pragma: no cover (safety)
raise AttributeError(
"`graphblas_algorithms.__version__` not available. This may mean "
"graphblas-algorithms was incorrectly installed or not installed at all. "
"For local development, you may want to do an editable install via "
"`python -m pip install -e path/to/graphblas-algorithms`"
) from exc
del importlib
Loading

0 comments on commit 3e74938

Please sign in to comment.