Skip to content

Modernize pyproject.toml and remove versioneer #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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