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
Version management update #1696
Conversation
Downstream Build Status ReportBuild
|
Pull Request Test Coverage Report for Build 8380326460Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
I don't think these version strings all mean the same thing... we probably need to discuss |
I'll have to look into it, but there is a release version that is set in a file and there is the version number we provide at build time. |
I think (??) the version at build time specifies which version of the data model to build whereas the one in the |
Are you referring to the data model in |
Found this PR, trying to get a handle on the process EDIT: Also this Release Procedure and this Release repo |
This is my understanding of
If these notes are correct (and align with your memory @gonuke), I think the changes in this PR are still appropriate improvements to automate the version propagation throughout the code at build-time. However... if these notes are correct then it appears that when cyclus P.S. What will the next release be - |
I can't contest your interpretation, although I can't recall if there was an expectation of appending/extending One thing that still concerns me about this is that the source code will no longer document the release number upon release. It will be embedded in the docker image that |
Maybe things changed since this comment (and I don't see anything in the
Fair point. One clarifying question: if a user downloads source code and installs using the hardcoded version number, don't they need to pass the correct build arg for |
Summary of the different versions and their locations in Cyclus:
Some general impressions I have:
We can talk about this in-person tomorrow but I wanted to get these notes down somewhere. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of final clarifying comments
cmake/SetupPyInstall.cmake.in
Outdated
@@ -2,8 +2,8 @@ | |||
# Runs setup.py install | |||
# | |||
set(PYTHON_EXECUTABLE @Python3_EXECUTABLE@) | |||
set(core_version @core_version@) | |||
set(ENV{CYCLUS_CORE_VERSION} "${core_version}") | |||
set(CYCLUS_CORE_VERSION @CMAKE_PROJECT_VERSION@) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a user specifies core_version
during setup, shouldn't we use that still?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and don't we now set CYCLUS_CORE_VERSION
reliably at the top level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored build to differentiate between CMAKE_PROJECT_VERSION
(CYCLUS_PROJECT_VERSION
in setup.py
) and DATA_MODEL_VERSION
I had to update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two more naming cleanup suggestions
cyclus/CMakeLists.txt
Outdated
@@ -10,7 +10,7 @@ INCLUDE_DIRECTORIES(${CYCLUS_CORE_INCLUDE_DIRS}) | |||
message(STATUS "Generating Type System API for Python") | |||
EXECUTE_PROCESS(COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/gentypesystem.py | |||
"--src-dir=${CMAKE_CURRENT_SOURCE_DIR}" | |||
"--cyclus-version=${core_version}" | |||
"--cyclus-version=${DATA_MODEL_VERSION}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to change this argparse variable for gentypesystem.py
?
"--cyclus-version=${DATA_MODEL_VERSION}" | |
"--data-model-version=${DATA_MODEL_VERSION}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed this. At some point (maybe not right now) should we rename version::core()
or keep it as is? As is, version::core()
is the "source code version" and version::describe()
is the "data model version"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's hold off on this for now
Co-authored-by: Paul Wilson <paul.wilson@wisc.edu> Signed-off-by: bennibbelink <79653949+bennibbelink@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - will merge following successful tests
After merge are we ready to make a release candidate branch? http://fuelcycle.org/cep/cep3.html#release-candidates-tags-branches Related: CEP 3 dictates we make release candidates for all 3 projects, I will implement a similar versioning strategy in cycamore so it is ready for release as well. Should be much more straightforward than cyclus |
This PR automates the process of setting the version number throughout the code.
src/version.h
is now generated so that CMake can set the version numbers during the buildsetup.py
fixed the regex so it replaces the version string in__init__.py
. (also maybe we want to modify the hardcoded string in__init__.py
so that it doesn't always say 1.5.5)core_version
as a build arg in the Dockerfilespublish_release.yml
to pass in thecore_version
build arg so that when we publish packages they use the correct version