-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uv, ruff, just et al.
- Loading branch information
Showing
21 changed files
with
893 additions
and
227 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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
############################################################ | ||
# All commands are to be run inside a virtual environment. # | ||
# E.g., # | ||
# uv run just lint # | ||
############################################################ | ||
|
||
|
||
# check formatting via ruff | ||
formatcheck: | ||
ruff format --check . | ||
|
||
# check docstring formatting via pydocstyle | ||
docstylecheck: | ||
pydocstyle . | ||
|
||
# check type hints via mypy | ||
typecheck: | ||
mypy --strict . | ||
|
||
# run linter via ruff | ||
lint: | ||
ruff check . | ||
|
||
# run tests via pytest and coverage | ||
test: | ||
pytest --cov=. --cov-fail-under=100 -svv | ||
|
||
# build docs via sphinx | ||
docs: | ||
make -C docs html | ||
|
||
# run all checks | ||
checkall: | ||
just formatcheck | ||
just docstylecheck | ||
just typecheck | ||
just lint | ||
just test | ||
just docs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
[tool.poetry] | ||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "Parsenvy" | ||
version = "3.0.2" | ||
dependencies = [] | ||
requires-python = ">=3.9" | ||
authors = [ | ||
{name = "Nik Kantar", email = "[email protected]" }, | ||
] | ||
description = "Enviously elegant environment variable parsing" | ||
license = "BSD-3-Clause" | ||
authors = ["Nik Kantar <[email protected]>"] | ||
readme = "README.rst" | ||
homepage = "https://pypi.org/project/Parsenvy" | ||
repository = "https://github.com/nkantar/Parsenvy" | ||
documentation = "https://parsenvy.readthedocs.io" | ||
|
||
keywords = ["environment", "variables"] | ||
license = {file = "LICENSE"} | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
|
@@ -24,68 +26,26 @@ classifiers = [ | |
"Typing :: Typed", | ||
] | ||
|
||
include = [ | ||
"CHANGELOG.md", | ||
"CODE_OF_CONDUCT.rst", | ||
"CONTRIBUTING.rst", | ||
"LICENSE", | ||
"Makefile", | ||
"README.rst", | ||
"bin/*.sh", | ||
"docs/Makefile", | ||
"docs/make.bat", | ||
"docs/source/*.rst", | ||
"docs/source/conf.py", | ||
"parsenvy/*.py", | ||
"poetry.lock", | ||
"pyproject.toml", | ||
"tests/test_*.py", | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" # TODO not ideal, supporting 3.8 would be good | ||
|
||
# Docs | ||
sphinx = {version = "^7.2.6", optional = true} | ||
sphinx-rtd-theme = {version = "^2.0.0", optional = true} | ||
sphinx-mdinclude = {version = "^0.5.3", optional = true} | ||
|
||
[tool.poetry.dev-dependencies] | ||
mypy = "^1.8.0" | ||
black = "^23.12.1" | ||
flake8 = "^6.1.0" | ||
pydocstyle = "^6.3.0" | ||
pytest = "^7.4.4" | ||
pytest-watch = "^4.2.0" | ||
coverage = "^7.4.0" | ||
pytest-cov = "^4.1.0" | ||
pdbpp = "^0.10.3" | ||
sphinx-mdinclude = "^0.5.3" | ||
|
||
# Docs | ||
# NOTE: Please also add to: | ||
# - [tool.poetry.dependencies] above as optional | ||
# - [tool.poetry.extras] below | ||
sphinx = "^7.2.6" | ||
sphinx-rtd-theme = "^2.0.0" | ||
|
||
[tool.poetry.extras] | ||
docs = [ | ||
"sphinx", | ||
"sphinx-rtd-theme", | ||
"sphinx-mdinclude", | ||
[tool.uv] | ||
dev-dependencies = [ | ||
"ruff>=0.6.2", | ||
"pytest>=8.3.2", | ||
"pydocstyle>=6.3.0", | ||
"mypy>=1.11.2", | ||
"pdbpp>=0.10.3", | ||
"coverage>=7.6.1", | ||
"sphinx>=7.4.7", | ||
"sphinx-rtd-theme>=2.0.0", | ||
"sphinx-mdinclude>=0.6.2", | ||
"pytest-cov>=5.0.0", | ||
] | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.pytest] | ||
python_paths = "parsenvy" | ||
python_paths = "src/parsenvy" | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
source = ["parsenvy"] | ||
source = ["src"] | ||
|
||
[tool.coverage.report] | ||
show_missing = true |
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,5 @@ | ||
"""Main Parsenvy module.""" | ||
|
||
from parsenvy.parsenvy import bool, float, int, list, set, str, tuple | ||
|
||
__all__ = ["bool", "float", "int", "list", "set", "str", "tuple"] |
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 |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
user is meant to utilize. | ||
""" | ||
|
||
|
||
import builtins | ||
from functools import wraps | ||
import os | ||
|
Empty file.
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 @@ | ||
"""Tests for all of Parsenvy.""" |
Oops, something went wrong.