qurator-spk / dinglehopper

An OCR evaluation tool
Apache License 2.0
58 stars 12 forks source link

add version to ocrd-tool.json (and setup.py) #73

Closed kba closed 1 year ago

kba commented 1 year ago

The package should have a version, I set it to 0.0.1 for now but how you version is up to you of course. Besides the obvious need for versioning when releasing to PyPI and/or GitHub, we add the processor call, version and parameters as a mets:agent to the mets.xml to help debug/reconstruct the processing. Currently this will show dinglehopper vNone.

The pattern we use for this is to only ever change the version number in ocrd-tool.json and read it from there in the setup.py. That way you only need to change it once when releasing.

mikegerber commented 1 year ago

"Obvious need" ;) Personally I don't think so, but to make my life easier I'll stick some kind of semver version on it.

mikegerber commented 1 year ago

I'll merge #72 after fixing the rest of it and then merge this and release 1.0.0. Probably this week

kba commented 1 year ago

obvious need

I just meant that you need to somehow distinguish two releases once you start doing them ;-)

mikegerber commented 1 year ago

obvious need I just meant that you need to somehow distinguish two releases once you start doing them ;-)

Not going to discuss it further, as it would be not productive :) I'll just stick to semver to meet the expectation.

Is there some kind of reusable CircleCI workflow/job to check the git version tag against the version in the JSON file? Otherwise I'll try to come up with one.

kba commented 1 year ago

Is there some kind of reusable CircleCI workflow/job to check the git version tag against the version in the JSON file? Otherwise I'll try to come up with one.

No, but that would be very useful indeed!

mikegerber commented 1 year ago

Is there some kind of reusable CircleCI workflow/job to check the git version tag against the version in the JSON file? Otherwise I'll try to come up with one.

No, but that would be very useful indeed!

Now that I was touching all this setuptools + GH Action stuff anyway, I came up with this:

It doesn't test yet and the workflow should be reusable (ideally). (Main motivation is that I do not like having to remember all these things correctly)

mikegerber commented 1 year ago

I'm closing this PR: I moved to pyproject.toml and setuptools-ocrd! dinglehopper now has a temporary version of 0.9.0 and will get a PyPI release soon!