tomMoral / dicodile

Experiments for "Distributed Convolutional Dictionary Learning (DiCoDiLe): Pattern Discovery in Large Images and Signals"
https://tommoral.github.io/dicodile/
BSD 3-Clause "New" or "Revised" License
18 stars 9 forks source link

test releases on TestPyPI seem to be numbered incorrectly #50

Closed rprimet closed 2 years ago

rprimet commented 2 years ago

The CI is currently set up with a job that will

Release numbers are handled by setuptools_scm. Unfortunately, it seems that there is a hiccup in the numbering (configuration issue?).

dicodile 0.1 has been released, and the current TestPyPI versions should use the 0.2devN version number but use the 0.1devN version number instead.

For instance, the last push to main resulted in 0.1.dev77 being pushed to TestPyPI instead of 0.2.dev77

testpypi

(notice that 0.1.dev77 was published after 0.1)

agramfort commented 2 years ago

good catch

you plan to have a look @rprimet ?

Message ID: @.***>

rprimet commented 2 years ago

@agramfort yes I'll look into it.

rprimet commented 2 years ago

Can reproduce locally:

(base) (dicod)romain@plume:~/inria/csc/dicodile$ python
Python 3.9.4 | packaged by conda-forge | (default, May 10 2021, 22:13:33) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dicodile
>>> dicodile.__version__
'0.1.dev109'
>>> 
rprimet commented 2 years ago

It seems that setuptools_scm does not see (or consider) the existing 0.1 tag

(base) (dicod)romain@plume:~/inria/csc/dicodile$ SETUPTOOLS_SCM_DEBUG=1 python -m setuptools_scm
abs root {'root': '.', 'relative_to': None}
root '/home/romain/inria/csc/dicodile'
relative_to None
dist name: dicodile
version_from_ep setuptools_scm.parse_scm /home/romain/inria/csc/dicodile
looking for ep setuptools_scm.parse_scm /home/romain/inria/csc/dicodile
found ep EntryPoint(name='.git', value='setuptools_scm.git:parse', group='setuptools_scm.parse_scm') in /home/romain/inria/csc/dicodile
cmd 'git rev-parse --show-prefix'
 in /home/romain/inria/csc/dicodile
out b'\n'
real root /home/romain/inria/csc/dicodile
cmd ['git', 'describe', '--dirty', '--tags', '--long', '--match', '*[0-9]*']
 in /home/romain/inria/csc/dicodile
err b"fatal: No tags can describe '7c069c6b8b13556c3227d9e951f0bca6f90caf9c'.\nTry --always, or create some tags.\n"
ret 128
cmd 'git rev-parse --verify --quiet HEAD'
 in /home/romain/inria/csc/dicodile
out b'7c069c6b8b13556c3227d9e951f0bca6f90caf9c\n'
cmd 'git rev-list HEAD'
 in /home/romain/inria/csc/dicodile
out b'7c069c6b8b13556c3227d9e951f0bca6f90caf9c\nad1b33ea5c9ded19d83f9597b6b6b9704aa0bef3\nad30e87b7797fd0083d7cb4edc3fade9825c8339\n9b2f32665be6490c35a212e3b9020f512a7cad4d\n799f3fe244609d4699109a42956bf1ab97778e6c\n3aace8f30cbccbe284567c7b1c1d3cacf8644834\nbc6b7f4d826b32da314eb322fe7e5598daa6e555\n0cf752833325eed852dc5f6ea57afa4f44adb526\na28bbb8e064fdaeb00150141be25ba516c70185f\n2f7e85ac34278a0d5e2f64bc694ad33e35270269\nceb08b87952ae045eb311dd780112b652ab7e0ce\nd44272356e824d9dd86055ced5d1cc7ad42ffebb\n0aad2eabcb83fc4bd4e08cb949a980092964ef3b\n2fb65950dd9b571cfdb6b1a5fe297f55a6e86e46\n7f429c8a5d525587ba91e23facce35ed2a19e57b\n85a6310e46d72662a47c9947cd53be8e8a55d797\nf2a2ece2d14f0eea3ccfea81af3c2de06e775ecc\nd778df495918109b136cb057f81b941091e5fc00\n84d73f2b00b11ac21dd206d6105014633dab9eda\nfa0be0a3d21538131b0aabcdd5535fdb3e17dc04\nc446ce8eb171d2249e557835b48d6a7335639daf\nb5dab59c7a6f84082d5899370b964c1337a51011\n43b9deedaf8cf0fc60620f7383d67322286fd57c\n5e733628232aaad3a1d862005bf7c488da181f6d\na867b41de4d99281d5ed55f4a42f339aa26954aa\n1b54bacbc5c60389324608efe3462cd6e2514870\na4a6214bae0d5da20c066e09a9f8d10d09f9a0b8\nf58a8deb6491b105a0101c2976f045848b4b7f55\n87e9c070e0a229f921babc30fd18b38522c6a115\n5700e29e4608c50a0fb4e55ec0b072827353861c\n53b0520639b0185f29632c5abec5669fc2de4a4e\n01d29b9fec90bc5f5ae32d285c6db2cf1401276b\ne59369830312c9775fdd52a56b47a7d4419e2459\ne6d0638cf63c213d6d382b515e43cad49d5c4224\nb56224fed3374468416f201d0c9abf71ed1b8b52\nd20c65b948e45a558435102e21d8b62bf8e293c5\neef622ba0de56703cd957e0862d57941b35a2a18\n1a81eab270511e6dbf52f91f8a21ff938ea8bc49\n85063005b5e99352ca0cd6fa1df02668dca98b0c\n63ef39c29d57d0bacf40716ea2b45aa873b81df5\n6d61e0b24dd97f2b7b32767e10b6c9b93ffc5d40\ne961670c70cd30142fc972c149171d46474b31b0\n00d1881111b5ed8ca60b4cc7706bd362b9424d08\n2fe0de4695a41b57ea6d420916329c595a2939cf\n363818e3ba0721d0118ae2bf8c7a08ef12034b58\nae19a0466a54cfc8457a658d82ac50c54284e4ed\n39f522d472fbfd1d3fb38d89864206a379eff33b\nc61c55c15366a167b44b37108784045a8ae933ec\nd7075607c2f22157318af685d8b6b02252967b92\n3c67b3ad64916e40f439fac10fc535d16177d85c\nad0dee968bd5748ee0e33e9ede6fceb0ce0d10a3\n2f1fdba048c8ca1df2c04915e8f771498cb68a8c\n9dcf428b6bda056b08729d2960f2b77a733bacfa\n9832533223b6ba90c1fff6f9fb7f062e88a76cb5\n07af27cfa115754aeec7421cf96cb0aac8a24214\nbe47b41c9844cd4bbcd01e0d693a4f6e0b83e0a2\n363245737f468f829e05c183489f7088b37d12bb\n57bdef22a6dbfb358683288fd321e8f031b799db\n624cb68856a562a560b73b4e412ec759dd547b23\ne8059ce7b75f37ac4d0a1cb0d71827fe3e0c2ab9\n21ca05de57ea3e75ef0ea4ec4e0e2abd3d1a4b77\nb0b65d5d1ac848802949ec657b0c476898875403\n96d5c5225ccfce649558903b6dc90d6fd1373a99\n86622ccb30d962b8a9ddbfff471b21166333335b\n215376dd9d88cc5a311078f06ae6f6f7a93516f8\ndf24a2bed9ebac1dc8e392056e2a4dc3e1223e69\nd619d640cf3c5b7714a7d7474409e7a34e7b2efb\ndc5bcbf47e190c487944a126c34325602de77863\naee168a2083b212a575b0ba5ad276b340e052ce9\n2471d277fa8e1bfa7a4d768346af8a941aa34a4f\nbd803ec96cdf1149611ca4f7ca1116bfdbfaf874\n3c0cdcdec0d6cb34902f4fde43a4bf46d0e99db7\n8872651dfa21e02927f0249129498fc22e37dde2\nf7f42571b0e52eda601604816ffd155a9c474f45\nb50ac9fc412f2552b48b31ffe8b2577a31dc6be8\n9dda2cef0ac1a2250338009995f60e69b79483fd\n'
cmd 'git status --porcelain --untracked-files=no'
 in /home/romain/inria/csc/dicodile
out b' M pyproject.toml\n'
cmd 'git rev-parse --abbrev-ref HEAD'
 in /home/romain/inria/csc/dicodile
out b'fix_version_numbering\n'
cmd 'git log -n 1 HEAD --format=%cI'
 in /home/romain/inria/csc/dicodile
out b'2021-10-09T14:26:57+02:00\n'
tag 0.0
tag '0.0' parsed to {'version': '0.0', 'prefix': '', 'suffix': ''}
version pre parse 0.0
version <Version('0.0')>
version 0.0 -> 0.0
EntryPoint(name='.git', value='setuptools_scm.git:parse', group='setuptools_scm.parse_scm') <ScmVersion 0.0 d=76 n=g7c069c6 d=True b=fix_version_numbering>
scm version <ScmVersion 0.0 d=76 n=g7c069c6 d=True b=fix_version_numbering>
config {'version_scheme': 'guess-next-dev', 'local_scheme': 'no-local-version'}
ep found: guess-next-dev
version 0.1.dev76
ep found: no-local-version
local_version 
0.1.dev76
rprimet commented 2 years ago

More info:

(base) (dicod)romain@plume:~/inria/csc/dicodile$ git branch --contains tags/0.1
  fix_tag_pipeline_trigger
(base) (dicod)romain@plume:~/inria/csc/dicodile$ git merge-base --fork-point 0.1
error: Object 8ce5e26824a03d473009a56f6f4e565fba303668 not a commit
(base) (dicod)romain@plume:~/inria/csc/dicodile$ git rev-list -n 1 0.1
7e054d5912cdba996d3485956b26c121e8d0434a
(base) (dicod)romain@plume:~/inria/csc/dicodile$ git show 7e054d5912cdba996d3485956b26c121e8d0434a
commit 7e054d5912cdba996d3485956b26c121e8d0434a (tag: 0.1, origin/fix_tag_pipeline_trigger, fix_tag_pipeline_trigger)
Author: Romain PRIMET <romain.primet@inria.fr>
Date:   Mon Jul 5 11:07:42 2021 +0200

    run pipeline on tags as well

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b398ffa..e651932 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -3,6 +3,8 @@ on:
   pull_request:
   push:
     branches: main
+    tags:
+      - '*'

 jobs:
   # flake8 linting
rprimet commented 2 years ago

git merge-base --is-ancestor 7e054d5912cdba996d3485956b26c121e8d0434a HEAD is false...

rprimet commented 2 years ago

Somehow the 0.1 tag is not reacheable from the current main, not sure how that came to be and it's not ideal, but in any case, a 0.2 tag on the proper branch should fix the issue? WDYT @agramfort @hndgzkn @tomMoral ? (I tried a dummy, local 0.2 tag and a commit, and setuptools_scm correctly infers 0.3dev1)

agramfort commented 2 years ago

try

Message ID: @.***>

rprimet commented 2 years ago

@agramfort seems that it did the trick, closing this issue, we can revisit the release process later if we need an automated way of asserting that a tag is on main. Side-effect : dicodile 0.2 is released :-)

tomMoral commented 2 years ago

Ahaha nice! happy friday release!!!