quantumjot / btrack

Bayesian multi-object tracking
https://btrack.readthedocs.io
MIT License
311 stars 50 forks source link

Remove `setup.cfg` in favour of `pyproject.toml` #212

Closed paddyroddy closed 1 year ago

quantumjot commented 1 year ago

can you preserve VERSION.txt somehow?

Altenatively update this: https://github.com/quantumjot/BayesianTracker/blob/696ee5b51164e12a77e4210f3ff1ad10f4c4f45a/Makefile#L26-L30

and this: https://github.com/quantumjot/BayesianTracker/blob/696ee5b51164e12a77e4210f3ff1ad10f4c4f45a/btrack/constants.py#L7-L10

paddyroddy commented 1 year ago

So for now I've done this https://github.com/quantumjot/BayesianTracker/blob/a2db530a55ec9700af5df6f70a5e9d750e4e297d/pyproject.toml#L115-L116 which means that the version number is automatically updated in that file. For now, I had put that in .gitignore as you would have to remember to build first and committing it (like you do now). Will see if there's a way to automate this.

paddyroddy commented 1 year ago

Found a way of keeping it by using something like this

[build-system]
requires = [
    "setuptools",
]
build-backend = "setuptools.build_meta"

[project]
dynamic = [
    "version",
]

[tool.setuptools]
dynamic.version.file = "btrack/VERSION.txt"

I'm going to raise an issue about this more generally though, as I suspect there will a better way.