-
Notifications
You must be signed in to change notification settings - Fork 17
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
How to indicate to user that an update of the GSAS-II binaries is needed? #38
Comments
I don't think it is a good practice that a piece of software auto-updates itself. The python environment got much cleaner and deploying extensions is no more has hard as it used to be in the past. |
All GSAS-II updates of the Python code are done only at the request of the user; never automatically. Also, we have always offered the capability to users via the GUI to regress to older versions of the software, to confirm that results are unchanged by version. I'm proud of this. The focus of this issue has to do with the small amount of non-Python code that most people will install from binariy files that we supply (source code is always distributed of course). This code does not change very much, but the compiled images used to be part of the svn repo and thus were synced to the versioning. They are now placed in a release area on GitHub and for most users will be installed once only when GSAS-II is initially downloaded. There is no mechanism to trigger updating of these routines (or regression to older versions). The issue here is a desire to sync the binaries to the user-selected version of the Python and source code files. The intent here is that when we add a new capability (or bug fix) via a change in non-Python code, we want to get that out. An example would be that we recently added a capability for searching for magnetic k-vectors that can be greatly sped up via a Cython routine, but just doing a normal git update (from command line or GUI) will only get the source code for that. At present, for most users, to get the compiled version installed, one must do a fresh install. |
This needs to be considered as part of the binary build process, which addressed in PR #40, which is waiting for input from @tacaswell |
I agree with @kif that integrating self-updating into the main source code is a hugely complex problem that is already being solved by projects whos goal is to do package management. I propose thinking of this in three layers:
I think this will get both the workflow that gsas currently has but also slot well into the standard workflow for Python packages (a conda package that is a stub that bootstraps another installation into the conda environment it is in is clever and a nice bit of technical work but is very counter to expectations about how conda packages work, for example people expect to be able to ask conda what version of something is installed which gsas-ii would then be hidden from). Another big upside of getting gsas-ii packaged on conda-forge is that as new Python's come out (or the fortran complier is updated) things get mostly just taken care of! |
I agree that a more standard approach to packaging would make this issue moot. One would install GSAS-II's Python & binary files with appropriate versions of Python and the packages that need to be version-specific (mostly numpy, though occasionally MPL throws us a curve). The reason that we provide an alternate mechanism for installation is that:
As long as we are supporting a mode where people can use git to get the latest Python-code updates, how can the code determine that the binaries also need an update? I think the solution for this is that one of the Fortran routines (or perhaps the one C routine) should have an option to return the version number of the code at compilation time. Then it becomes relatively easy for the Python code to recognize that newer binaries are needed. Perhaps someday we can move to a normal development/release cycle and get away our git-based update process (except for developers who want the latest and buggiest), but even then our average user is still unlikely to have compilers installed, but it will be nice to have a streamlined installation/build process that can be automated. |
Hi Brian,
I agree with you with you about the decrease of average level in
computing knowledge of our users, but on the other hand the tools used
to distribute the code have made deployment so much simpler that it does
not matter anymore. Conda comes with compiler packaged. Just declare
C/C++/Fortran compiler as build-time dependencies and they will be
installed automatically, this regardless to the platform used by you
users.
As long as we are supporting a mode where people can use git to get the latest Python-code updates, how can the code determine that the binaries also need an update? I think the solution for this is that one of the Fortran routines (or perhaps the one C routine) should have an option to return the version number of the code at compilation time. Then it becomes relatively easy for the Python code to recognize that newer binaries are needed.
It is good practice to have a __date__ field or so in each of the
extension to be able to known when was the last modification done. This
mechanisme should be independant from git, or from the filesystem
file-access time, but your IDE should be able to update automatically
the field upon saving.
Perhaps someday we can move to a normal development/release cycle and get away our git-based update process (except for developers who want the latest and buggiest), but even then our average user is still unlikely to have compilers installed, but it will be nice to have a streamlined installation/build process that can be automated.
As Thomas mentionned, compiler are shipped as conda package on all
platforms (gcc at least). This is no more an issue for developpement or
advanced users. For distribution, it is still advised to use the
Apple's clang and MSVC for windows since the binaries will require less
gcc-linked libraries, but this is burden only for the packager, not for
the end-user.
Happy new year.
Jerome
|
The GSAS-II binaries are installed when GSAS-II is initially installed. If the binaries are updated, they will not be reinstalled. There needs to be some way to either automatically trigger or manually trigger an update of the binaries.
Seems that this would be best incorporated into the git update process, but how to know that the binary files have been updated?
The text was updated successfully, but these errors were encountered: