openvax / pyensembl

Python interface to access reference genome features (such as genes, transcripts, and exons) from Ensembl
Apache License 2.0
365 stars 68 forks source link

Update tags #288

Open linqigang888 opened 11 months ago

linqigang888 commented 11 months ago

I am working with pyensembl in Debian and would prefer to pull source code from Github instead of PyPi. The releases are up to date in PyPi but not in Github. Can you please update the tags for the current version 2.2.8 and future versions?

tillea commented 10 months ago

I confirm keeping tags in sync with your released versions would be helpful for Debian and probably others as well.

emollier commented 4 months ago

Greetings,

I concur getting the tags in sync with the pypi releases would be helpful. The release is currently tracked on pypi, but it lacks test data present in the git tree. This prevents independent runs of the test suite without some more manual work involved to identify the right version associated to the release in the git tree.

Thanks for considering, Étienne.

iskandr commented 4 months ago

Seems like a popular request! Is there an easy way to script tagging the HEAD with the current version in the deploy script?

On Sat, Feb 24, 2024, 8:10 AM Étienne Mollier @.***> wrote:

Greetings,

I concur getting the tags in sync with the pypi releases would be helpful. The release is currently tracked on pypi, but it lacks test data present in the git tree. This prevents independent runs of the test suite without some more manual work involved to identify the right version associated to the release in the git tree.

Thanks for considering, Étienne.

— Reply to this email directly, view it on GitHub https://github.com/openvax/pyensembl/issues/288#issuecomment-1962360679, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAL2OMHLBBQHFG7LC2JSZTYVHRFXAVCNFSM6AAAAAA3RJT5QGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSGM3DANRXHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

emollier commented 4 months ago

Hi Alex,

Thanks for your interest in the issue, if I were to automate the tagging along delivery, my change would look something like that:

diff --git a/deploy.sh b/deploy.sh
index c1896d9..5f15b69 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -4,4 +4,6 @@ python3 -m pip install --upgrade build && \
 python3 -m pip install --upgrade twine && \
 rm -rf dist && \
 python3 -m build && \
-python3 -m twine upload dist/*
+python3 -m twine upload dist/* && \
+git tag "$(python3 pyensembl/version.py)" && \
+git push --tags
diff --git a/pyensembl/version.py b/pyensembl/version.py
index 04510af..852f460 100644
--- a/pyensembl/version.py
+++ b/pyensembl/version.py
@@ -1 +1,4 @@
 __version__ = "2.3.9"
+
+if __name__ == "__main__":
+    print(__version__)

This is not tested though (I wouldn't run a push to pypi without your supervision:), and maybe you would prefer another ordering of the commands e.g. if one step fails but not another, but you get the idea.

In hope this helps, Étienne.

iskandr commented 4 months ago

Is the new version doing the desired thing with tags?

(sorry I'm so ignorant about git tags, I never use them)

iskandr commented 4 months ago

Looks like it's working?

https://github.com/openvax/pyensembl/tags

emollier commented 4 months ago

Hi Alex,

Yes, I confirm that it works great. Thank you for having streamlined git tagging, this is very useful to easily refer to important milestones in your source tree. I think the present issue is resolved now.

Have a nice day, :) Étienne.