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__/
|
__pycache__/
|
||||||
dist/
|
dist/
|
||||||
|
src/pogo_scaled_estimators/_version.py
|
||||||
*.sqlite
|
*.sqlite
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
[build-system]
|
[build-system]
|
||||||
requires = ["hatchling"]
|
requires = ["hatchling", "hatch-vcs"]
|
||||||
build-backend = "hatchling.build"
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "pogo-scaled-estimators"
|
name = "pogo-scaled-estimators"
|
||||||
version = "1.0a1"
|
dynamic = ["version"]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"requests",
|
"requests",
|
||||||
"requests-cache",
|
"requests-cache",
|
||||||
@ -32,6 +32,12 @@ classifiers = [
|
|||||||
[project.scripts]
|
[project.scripts]
|
||||||
ase-cli = "pogo_scaled_estimators:main_cli"
|
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]
|
[tool.hatch.envs.lint]
|
||||||
detached = true
|
detached = true
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
@ -9,6 +9,7 @@ import operator
|
|||||||
import sys
|
import sys
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
|
|
||||||
|
from pogo_scaled_estimators._version import version
|
||||||
from pogo_scaled_estimators.calculator import Calculator, Filter
|
from pogo_scaled_estimators.calculator import Calculator, Filter
|
||||||
|
|
||||||
|
|
||||||
@ -23,6 +24,7 @@ def main_cli():
|
|||||||
_ = parser.add_argument(
|
_ = parser.add_argument(
|
||||||
"--no-legendary", dest="filters", action="append_const", const=Filter.DISALLOW_LEGENDARY_POKEMON
|
"--no-legendary", dest="filters", action="append_const", const=Filter.DISALLOW_LEGENDARY_POKEMON
|
||||||
)
|
)
|
||||||
|
_ = parser.add_argument("--version", action="version", version=version)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
filters = reduce(operator.or_, args.filters or [], Filter.NO_FILTER)
|
filters = reduce(operator.or_, args.filters or [], Filter.NO_FILTER)
|
||||||
|
Loading…
Reference in New Issue
Block a user