|
| 1 | +[build-system] |
| 2 | +requires = ["hatchling"] |
| 3 | +build-backend = "hatchling.build" |
| 4 | + |
| 5 | +[project] |
| 6 | +name = "trueentropy" |
| 7 | +version = "0.1.0" |
| 8 | +description = "True randomness from real-world entropy sources - harness chaos from network latency, system jitter, seismic activity, and financial markets" |
| 9 | +readme = "README.md" |
| 10 | +license = "MIT" |
| 11 | +requires-python = ">=3.9" |
| 12 | +authors = [ |
| 13 | + { name = "TrueEntropy Contributors" } |
| 14 | +] |
| 15 | +keywords = [ |
| 16 | + "random", |
| 17 | + "entropy", |
| 18 | + "cryptography", |
| 19 | + "security", |
| 20 | + "chaos", |
| 21 | + "true-random", |
| 22 | + "rng", |
| 23 | + "hardware-random" |
| 24 | +] |
| 25 | +classifiers = [ |
| 26 | + "Development Status :: 4 - Beta", |
| 27 | + "Intended Audience :: Developers", |
| 28 | + "Intended Audience :: Science/Research", |
| 29 | + "License :: OSI Approved :: MIT License", |
| 30 | + "Operating System :: OS Independent", |
| 31 | + "Programming Language :: Python :: 3", |
| 32 | + "Programming Language :: Python :: 3.9", |
| 33 | + "Programming Language :: Python :: 3.10", |
| 34 | + "Programming Language :: Python :: 3.11", |
| 35 | + "Programming Language :: Python :: 3.12", |
| 36 | + "Programming Language :: Python :: 3.13", |
| 37 | + "Topic :: Security :: Cryptography", |
| 38 | + "Topic :: Scientific/Engineering", |
| 39 | + "Topic :: Software Development :: Libraries :: Python Modules", |
| 40 | + "Typing :: Typed", |
| 41 | +] |
| 42 | +dependencies = [ |
| 43 | + "requests>=2.25.0", |
| 44 | + "psutil>=5.8.0", |
| 45 | +] |
| 46 | + |
| 47 | +[project.optional-dependencies] |
| 48 | +dev = [ |
| 49 | + "pytest>=7.0", |
| 50 | + "pytest-cov>=4.0", |
| 51 | + "pytest-asyncio>=0.21", |
| 52 | + "ruff>=0.1.0", |
| 53 | + "black>=23.0", |
| 54 | + "mypy>=1.0", |
| 55 | + "types-requests", |
| 56 | + "types-psutil", |
| 57 | +] |
| 58 | +docs = [ |
| 59 | + "mkdocs>=1.5", |
| 60 | + "mkdocs-material>=9.0", |
| 61 | + "mkdocstrings[python]>=0.24", |
| 62 | +] |
| 63 | +all = [ |
| 64 | + "trueentropy[dev,docs]", |
| 65 | +] |
| 66 | + |
| 67 | +[project.urls] |
| 68 | +Homepage = "https://github.com/trueentropy/trueentropy" |
| 69 | +Documentation = "https://trueentropy.github.io/trueentropy" |
| 70 | +Repository = "https://github.com/trueentropy/trueentropy" |
| 71 | +Issues = "https://github.com/trueentropy/trueentropy/issues" |
| 72 | +Changelog = "https://github.com/trueentropy/trueentropy/blob/main/CHANGELOG.md" |
| 73 | + |
| 74 | +[tool.hatch.build.targets.wheel] |
| 75 | +packages = ["src/trueentropy"] |
| 76 | + |
| 77 | +[tool.hatch.build.targets.sdist] |
| 78 | +include = [ |
| 79 | + "/src", |
| 80 | + "/tests", |
| 81 | + "/README.md", |
| 82 | + "/LICENSE", |
| 83 | +] |
| 84 | + |
| 85 | +# ============================================================================= |
| 86 | +# Ruff - Fast Python Linter |
| 87 | +# ============================================================================= |
| 88 | +[tool.ruff] |
| 89 | +line-length = 100 |
| 90 | +target-version = "py39" |
| 91 | +src = ["src", "tests"] |
| 92 | + |
| 93 | +[tool.ruff.lint] |
| 94 | +select = [ |
| 95 | + "E", # pycodestyle errors |
| 96 | + "W", # pycodestyle warnings |
| 97 | + "F", # Pyflakes |
| 98 | + "I", # isort |
| 99 | + "B", # flake8-bugbear |
| 100 | + "C4", # flake8-comprehensions |
| 101 | + "UP", # pyupgrade |
| 102 | + "ARG", # flake8-unused-arguments |
| 103 | + "SIM", # flake8-simplify |
| 104 | +] |
| 105 | +ignore = [ |
| 106 | + "E501", # line too long (handled by black) |
| 107 | + "B008", # do not perform function calls in argument defaults |
| 108 | +] |
| 109 | + |
| 110 | +[tool.ruff.lint.isort] |
| 111 | +known-first-party = ["trueentropy"] |
| 112 | + |
| 113 | +# ============================================================================= |
| 114 | +# Black - Code Formatter |
| 115 | +# ============================================================================= |
| 116 | +[tool.black] |
| 117 | +line-length = 100 |
| 118 | +target-version = ["py39", "py310", "py311", "py312"] |
| 119 | + |
| 120 | +# ============================================================================= |
| 121 | +# MyPy - Static Type Checker |
| 122 | +# ============================================================================= |
| 123 | +[tool.mypy] |
| 124 | +python_version = "3.9" |
| 125 | +strict = true |
| 126 | +warn_return_any = true |
| 127 | +warn_unused_configs = true |
| 128 | +disallow_untyped_defs = true |
| 129 | +disallow_incomplete_defs = true |
| 130 | +check_untyped_defs = true |
| 131 | +no_implicit_optional = true |
| 132 | +warn_redundant_casts = true |
| 133 | +warn_unused_ignores = true |
| 134 | + |
| 135 | +[[tool.mypy.overrides]] |
| 136 | +module = ["psutil.*"] |
| 137 | +ignore_missing_imports = true |
| 138 | + |
| 139 | +# ============================================================================= |
| 140 | +# Pytest - Testing Framework |
| 141 | +# ============================================================================= |
| 142 | +[tool.pytest.ini_options] |
| 143 | +testpaths = ["tests"] |
| 144 | +python_files = ["test_*.py"] |
| 145 | +python_functions = ["test_*"] |
| 146 | +addopts = [ |
| 147 | + "-v", |
| 148 | + "--tb=short", |
| 149 | + "--strict-markers", |
| 150 | +] |
| 151 | +markers = [ |
| 152 | + "slow: marks tests as slow (deselect with '-m \"not slow\"')", |
| 153 | + "network: marks tests that require network access", |
| 154 | +] |
| 155 | + |
| 156 | +# ============================================================================= |
| 157 | +# Coverage - Code Coverage |
| 158 | +# ============================================================================= |
| 159 | +[tool.coverage.run] |
| 160 | +source = ["src/trueentropy"] |
| 161 | +branch = true |
| 162 | +omit = ["*/tests/*"] |
| 163 | + |
| 164 | +[tool.coverage.report] |
| 165 | +exclude_lines = [ |
| 166 | + "pragma: no cover", |
| 167 | + "def __repr__", |
| 168 | + "raise NotImplementedError", |
| 169 | + "if TYPE_CHECKING:", |
| 170 | + "if __name__ == .__main__.:", |
| 171 | +] |
0 commit comments