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 functionality to disable using git in chandra_models #47

Open
taldcroft opened this issue Aug 12, 2023 · 5 comments
Open

Add functionality to disable using git in chandra_models #47

taldcroft opened this issue Aug 12, 2023 · 5 comments

Comments

@taldcroft
Copy link
Member

taldcroft commented Aug 12, 2023

Since we still have residual issues with git in MATLAB tools, and sometimes all the git machinery is just getting in the way, we should add functionality to disable using git in chandra_models.

For instance:

  • If the CHANDRA_MODELS_USE_GIT environment variable is set to True or False then that explicitly enables/disables use of git.
  • If the THERMAL_MODELS_DIR_FOR_MATLAB_TOOLS_SW env var is set, then don't use git unless CHANDRA_MODELS_USE_GIT is True. For the current MATLAB tools this will disable use of git by default.

Other things when there is no git usage enabled:

  • The tools won't care about a dirty repo or do anything besides use the existing repo.
  • This will raise an exception if the repo is a URL.
  • The returned version in this scenario will be required to be None.
  • Providing a version that is not None will raise an exception.

@jeanconn @jskrist

@jeanconn
Copy link
Contributor

jeanconn commented Aug 12, 2023

I like the idea, but it is tricky. While git hasn't been working from get_xija_model_spec in the recent example from James, it has been working from ska_helpers.chandra_models.get_data, so would we really want to disable it / turn it off by default on the matlab side? Right now in 2023_030, I'm getting the version information about the acquisition model in the proseco pickle coming from the matlab tools, for example and that seems like a move forward.

@jeanconn
Copy link
Contributor

So I think that would put me somewhat in support of the idea, but maybe the "returned version" in this scenario could be something maybe with caveats.

@taldcroft
Copy link
Member Author

@jeanconn - this was predicated on your "impression ... that right now the windows environment had a broken git". If Windows has a working-enough git and ska_helpers is already working, then maybe we don't need this. Except of course for #44.

@jeanconn
Copy link
Contributor

Right My comment was based on sot/skare3#1082 and the comment from James that get_xija_model... seemed not to work but parts of gitpython still seemed to be working on windows enough that ska_helpers.chandra_models.get_data seemed to be working to not fail with the drift model or the acquisition model as used by the matlab tools.

@jeanconn
Copy link
Contributor

Yeah, I think we don't need this. For #44 I think your idea to skip the is_dirty check from matlab makes sense and we should get that in now to get tested -- I had also wondered about just coding around using gitpython is_dirty by explicitly checking some pieces with our own code and not messing with the locking and the index but that seems not necessary. I also think that we should work with James the beginning of this week to make sure that the testing environment has a functioning git (for future use), which might require some conda package uninstall/reinstall.

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

No branches or pull requests

2 participants