Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version string #860

Merged
merged 10 commits into from
May 25, 2021
Merged

Conversation

paskino
Copy link
Contributor

@paskino paskino commented May 21, 2021

adds the version string accessible from python as

import cil
from cil import version

print (cil.version.version)

>>> 'v21.1.0-15-g449cdaa'

Version is determined by git describe both by CMake and conda.

@paskino paskino requested a review from gfardell May 21, 2021 13:45
Copy link
Member

@gfardell gfardell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it :)

@gfardell
Copy link
Member

I guess Jenkins versions are redundant once this is merged? and we should do the same for CIL-astra

@paskino
Copy link
Contributor Author

paskino commented May 21, 2021

I just tried on my machine and conda fails miserably

conda build recipe/ --python=3.7 --numpy=1.18 -c conda-forge -c astra/label/dev/ -c ccpi
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Adding in variants from /mnt/data/CCPi/code/CIL/recipe/conda_build_config.yaml
INFO:conda_build.variants:Adding in variants from /mnt/data/CCPi/code/CIL/recipe/conda_build_config.yaml
Adding in variants from config.variant
INFO:conda_build.variants:Adding in variants from config.variant
No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.11
WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.11
Attempting to finalize metadata for cil
INFO:conda_build.metadata:Attempting to finalize metadata for cil
Error: Failed to render jinja template in /mnt/data/CCPi/code/CIL/recipe/meta.yaml:
'GIT_DESCRIBE_TAG' is undefined

@paskino
Copy link
Contributor Author

paskino commented May 21, 2021

From: https://docs.conda.io/projects/conda-build/en/stable/user-guide/environment-variables.html#git-environment-variables

The environment variables listed in the following table are defined when the source is a git repository, specifying the source either with git_url or path.

So the recipe needs to have path defined.

Also look here

@paskino
Copy link
Contributor Author

paskino commented May 22, 2021

Jenkins fails at test phase trying to install cuda 11.2:

TEST START: /home/jenkins/conda-bld/linux-64/cil-v21.1.0-np115py36_0.tar.bz2
Adding in variants from /tmp/tmp0gv6j2wh/info/recipe/conda_build_config.yaml
INFO:conda_build.variants:Adding in variants from /tmp/tmp0gv6j2wh/info/recipe/conda_build_config.yaml
INFO conda_build.variants:_combine_spec_dictionaries(188): Adding in variants from /tmp/tmp0gv6j2wh/info/recipe/conda_build_config.yaml
Renaming work directory,  /home/jenkins/conda-bld/cil_1621633695969/work  to  /home/jenkins/conda-bld/cil_1621633695969/work_moved_cil-v21.1.0-np115py36_0_linux-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... WARNING:conda.models.version:Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.*, but conda is ignoring the .* and treating it as 1

[ ... ] strip similar WARNINGS

Examining conflict for matplotlib scikit-image numba: : 42it [05:05,  2.23s/it]
Examining conflict for __glibc cil-astra: : 42it [05:13,  2.23s/it]            
Examining conflict for __glibc cil-astra: : 43it [05:13,  3.87s/it]
Examining conflict for __cuda: : 43it [05:13,  3.87s/it]           
Examining conflict for __cuda: : 44it [05:13,  2.77s/it]
                                                        
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

failed to get install actions, retrying.  
exception was: Unsatisfiable dependencies for platform linux-64: {'feature:|@/linux-64::__cuda==11.2=0', 'feature:/linux-64::__cuda==11.2=0'}

WARNING:conda_build.build:failed to get install actions, retrying.  
exception was: Unsatisfiable dependencies for platform linux-64: {'feature:|@/linux-64::__cuda==11.2=0', 'feature:/linux-64::__cuda==11.2=0'}

WARNING conda_build.build:test(2144): failed to get install actions, retrying.  
exception was: Unsatisfiable dependencies for platform linux-64: {'feature:|@/linux-64::__cuda==11.2=0', 'feature:/linux-64::__cuda==11.2=0'}

Tests failed for cil-v21.1.0-np115py36_0.tar.bz2 - moving package to /home/jenkins/conda-bld/broken

WARNING:conda_build.build:Tests failed for cil-v21.1.0-np115py36_0.tar.bz2 - moving package to /home/jenkins/conda-bld/broken

WARNING conda_build.build:tests_failed(2231): Tests failed for cil-v21.1.0-np115py36_0.tar.bz2 - moving package to /home/jenkins/conda-bld/broken
TESTS FAILED: cil-v21.1.0-np115py36_0.tar.bz2

A previous Jenkins build (2011) selected 9.2 rather than 11.2.

@paskino paskino requested a review from gfardell May 22, 2021 07:44
@paskino paskino merged commit 4c09937 into TomographicImaging:master May 25, 2021
@paskino paskino mentioned this pull request May 25, 2021
@paskino paskino deleted the add_version_string branch March 8, 2022 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants