Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3e74938

Browse files
authored
Modernize pyproject.toml and remove versioneer (#45)
Modernize pyproject.toml and remove versioneer
1 parent 1180e1c commit 3e74938

File tree

13 files changed

+220
-2997
lines changed

13 files changed

+220
-2997
lines changed

‎.flake8

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[flake8]
2+
max-line-length = 100
3+
inline-quotes = "
4+
exclude =
5+
graphblas_algorithms/*/tests/,
6+
graphblas_algorithms/*/*/tests/,
7+
build/
8+
extend-ignore =
9+
E203,
10+
SIM105,
11+
SIM401,
12+
# E203 whitespace before ':' (to be compatible with black)
13+
per-file-ignores =
14+
__init__.py:F401,F403, # allow unused and star imports
15+
test_*.py:F401,F403,
16+
graphblas_algorithms/nxapi/exception.py:F401,
17+
graphblas_algorithms/**/__init__.py:F401,F403

‎.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ repos:
4747
rev: 23.1.0
4848
hooks:
4949
- id: black
50-
args: [--target-version=py38]
5150
- repo: https://github.com/PyCQA/flake8
5251
rev: 6.0.0
5352
hooks:
@@ -68,6 +67,7 @@ repos:
6867
hooks:
6968
- id: codespell
7069
types_or: [python, rst, markdown]
70+
additional_dependencies: [tomli]
7171
files: ^(graphblas_algorithms|docs)/
7272
- repo: https://github.com/pre-commit/pre-commit-hooks
7373
rev: v4.4.0

‎MANIFEST.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
recursive-include graphblas_algorithms *.py
22
include setup.py
3-
include setup.cfg
43
include README.md
54
include LICENSE
65
include MANIFEST.in
7-
include versioneer.py
8-
include requirements.txt
9-
include graphblas_algorithms/_version.py

‎environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ dependencies:
5050
- requests
5151
# For debugging
5252
- icecream
53+
- ipykernel
5354
- ipython
5455
# For type annotations
5556
- mypy

‎graphblas_algorithms/__init__.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
from . import _version
1+
import importlib.metadata
2+
23
from .classes import *
34

45
from .algorithms import * # isort:skip
56

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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /