Skip to content
Open
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ venv.bak/

# mypy
.mypy_cache/

# uv
uv.lock
25 changes: 12 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
REPO_OWNER=nats-io
PROJECT_NAME=nkeys.py
SOURCE_CODE=nkeys
SOURCE_CODE=src/nkeys


help:
Expand All @@ -16,26 +16,25 @@ clean:


deps:
pip install pipenv --upgrade
pipenv install --dev
uv sync --extra dev


format:
yapf -i --recursive $(SOURCE_CODE)
yapf -i --recursive tests
uv run yapf -i --recursive $(SOURCE_CODE)
uv run yapf -i --recursive tests


test:
yapf --recursive --diff $(SOURCE_CODE)
yapf --recursive --diff tests
mypy
flake8 ./$(SOURCE_CODE)/
pytest
uv run yapf --recursive --diff $(SOURCE_CODE)
uv run yapf --recursive --diff tests
uv run mypy
uv run flake8 ./$(SOURCE_CODE)/
uv run pytest


ci: deps
pipenv run flake8 --ignore=W391 ./$(SOURCE_CODE)/
pipenv run pytest -x -vv -s --continue-on-collection-errors
uv run flake8 --ignore=W391 ./$(SOURCE_CODE)/
uv run pytest -x -vv -s --continue-on-collection-errors

watch:
while true; do pipenv run pytest -v -s -x; sleep 10; done
while true; do uv run pytest -v -s -x; sleep 10; done
16 changes: 0 additions & 16 deletions Pipfile

This file was deleted.

349 changes: 0 additions & 349 deletions Pipfile.lock

This file was deleted.

35 changes: 27 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ description = "A public-key signature system based on Ed25519 for the NATS ecosy
dynamic = ["version"]
readme = "README.md"
license = { text = "Apache 2 License" }
requires-python = ">=3.6"
requires-python = ">=3.7"
classifiers = [
'License :: OSI Approved :: Apache Software License',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
Expand All @@ -28,6 +27,17 @@ classifiers = [
]
dependencies = ["pynacl"]

[project.optional-dependencies]
dev = [
"flake8",
"mypy",
"pytest",
"pytest-cov",
"yapf",
"toml",
"exceptiongroup",
]

[project.urls]
"Homepage" = "https://github.com/nats-io/nkeys.py"
"Bug Tracker" = "https://github.com/nats-io/nkeys.py/issues"
Expand All @@ -39,17 +49,26 @@ zip-safe = true
version = {attr = "nkeys.__version__"}

[tool.setuptools.packages.find]
where = ["src"]
include = ["nkeys"] # package names should match these glob patterns (["*"] by default)
exclude = ["tests"] # exclude packages matching these glob patterns (empty by default)
namespaces = false # to disable scanning PEP 420 namespaces (true by default)

[tool.mypy]
files = ["nkeys"]
python_version = "3.7"
ignore_missing_imports = true
follow_imports = "silent"
files = ["src/nkeys"]
python_version = "3.8"
strict = true
show_error_codes = true
check_untyped_defs = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_return_any = true
disallow_any_unimported = false
no_implicit_reexport = true

# Third-party libraries without type stubs
[[tool.mypy.overrides]]
module = "nacl.*"
ignore_missing_imports = true

[tool.yapf]
split_before_first_argument = true
Expand All @@ -63,4 +82,4 @@ split_before_expression_after_opening_paren = true
combine_as_imports = true
multi_line_output = 3
include_trailing_comma = true
src_paths = ["nkeys", "tests"]
src_paths = ["src/nkeys", "tests"]
12 changes: 0 additions & 12 deletions setup.py

This file was deleted.

File renamed without changes.