cancerDHC / ccdhmodel

CRDC-H model in LinkML, developed by the Center for Cancer Data Harmonization (CCDH)
https://cancerdhc.github.io/ccdhmodel/
BSD 3-Clause "New" or "Revised" License
16 stars 8 forks source link

make pypi only seems to use 0.0.0 tag #82

Closed turbomam closed 3 years ago

turbomam commented 3 years ago

After substituting "ccdh" with "crdch" in several config files (and disabling pbr?) make pypi will only publish the model as 0.0.0. So that worked once, but now it is complaining

HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/ File already exists. See https://pypi.org/help/#file-name-reuse for more information.

Even if I do git tag 0.2.9 first

turbomam commented 3 years ago

PS I'm talking about branch issue-69-pypi

turbomam commented 3 years ago

Here's the recipe:

ENV = export PIPENV_VENV_IN_PROJECT=true && export PIPENV_PIPFILE=make-venv/Pipfile && export PIPENV_IGNORE_VIRTUALENVS=1
RUN = $(ENV) && pipenv run

###

pypi:
        rm -f dist/*
        $(RUN) python setup.py sdist bdist_wheel
        $(RUN) twine upload dist/*
        git commit -am 'post twine push'
        git push --tags
turbomam commented 3 years ago

Here's documentation about the relationship between the linkml-model-template and publishing to PyPI. This is from one of my clones of the template. I couldn't find in in template-configurator or linkml-model-template last time I looked.

turbomam commented 3 years ago

I re-enabled pbr and now git tags are once again used to version PyPI publications.

@gaurav I don't know how to add this functionality outside of pbr. I would be glad to research and experiment if you think that's best, or we can use a more manual approach for versioning the PyPI artifacts. Or stick with pbr.

I tried to tag Sujay, but I can't remember his GitHub tag and it doesn't seem to autocomplete for him yet. Is he a member of this repo?

turbomam commented 3 years ago

Hi, @sujaypatil96

Do you have a best practice for auto-incrementing PyPI publications? Or is there some reason why auto-incrementing should be avoided? I think my comment immediately above this and the initial comment explain the relevance,

gaurav commented 3 years ago

Have you tried putting a version = entry in the setup.cfg file?

I don't think an autoincremental PyPI version would work for us, especially since the model could change dramatically without a huge change in this repository. I like the idea of managing the CHANGELOG and version numbers manually. But let me know if there's a reason for doing that that I'm missing!

turbomam commented 3 years ago

pbr off, version = entry in setup.cfg file is fine with me. I'll do that now.