Switch project to dynamic version based on Git commits
This commit is contained in:
parent
754fd46ee7
commit
e1cf1cb194
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
__pycache__/
|
||||
dist/
|
||||
src/pogo_scaled_estimators/_version.py
|
||||
*.sqlite
|
||||
|
@ -1,10 +1,10 @@
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
requires = ["hatchling", "hatch-vcs"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "pogo-scaled-estimators"
|
||||
version = "1.0a1"
|
||||
dynamic = ["version"]
|
||||
dependencies = [
|
||||
"requests",
|
||||
"requests-cache",
|
||||
@ -32,6 +32,12 @@ classifiers = [
|
||||
[project.scripts]
|
||||
ase-cli = "pogo_scaled_estimators:main_cli"
|
||||
|
||||
[tool.hatch.version]
|
||||
source = "vcs"
|
||||
|
||||
[tool.hatch.build.hooks.vcs]
|
||||
version-file = "src/pogo_scaled_estimators/_version.py"
|
||||
|
||||
[tool.hatch.envs.lint]
|
||||
detached = true
|
||||
dependencies = [
|
||||
@ -48,6 +54,9 @@ typing = ["pyright"]
|
||||
[tool.ruff]
|
||||
target-version = "py312"
|
||||
line-length = 120
|
||||
exclude = [
|
||||
"src/pogo_scaled_estimators/_version.py",
|
||||
]
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
|
@ -9,6 +9,7 @@ import operator
|
||||
import sys
|
||||
from functools import reduce
|
||||
|
||||
from pogo_scaled_estimators._version import version
|
||||
from pogo_scaled_estimators.calculator import Calculator, Filter
|
||||
|
||||
|
||||
@ -23,6 +24,7 @@ def main_cli():
|
||||
_ = parser.add_argument(
|
||||
"--no-legendary", dest="filters", action="append_const", const=Filter.DISALLOW_LEGENDARY_POKEMON
|
||||
)
|
||||
_ = parser.add_argument("--version", action="version", version=version)
|
||||
|
||||
args = parser.parse_args()
|
||||
filters = reduce(operator.or_, args.filters or [], Filter.NO_FILTER)
|
||||
|
Loading…
Reference in New Issue
Block a user