Switch project to dynamic version based on Git commits
This commit is contained in:
parent
754fd46ee7
commit
46fe8f0cc9
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 = [
|
||||
|
@ -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
|
||||
|
||||
|
||||
@ -22,7 +23,8 @@ def main_cli():
|
||||
_ = parser.add_argument("--no-shadow", dest="filters", action="append_const", const=Filter.DISALLOW_SHADOW_POKEMON)
|
||||
_ = 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