-
Notifications
You must be signed in to change notification settings - Fork 4
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
Ensure that SKA env var has a consistent meaning and usage #22
Comments
Mostly with you, I just don't understand the text "in a standalone Ska3 that is not the root env". |
I struck out the "that is not the root env". That thought was not fully formed. |
I edited the main description with (hopefully) resolution and actions. |
Ah, didn't realize these were all actions for me. |
Regarding the update to flt_envs, presently it overrides SKA
I can't tell if you want it to continue this behavior or preserve SKA if already defined. |
[EDIT] On reflection, I disagree with this approach and would prefer saying with
So I edited the main description, but after looking at it this time around it seems there is actually no need for
So in the canonical example of acis_taco, https://github.com/sot/acis_taco/blob/master/task_schedule.cfg#L23 could just be:
The original Does this make sense? I've gone around in a few circles on this and not sure if it is all consistent. |
An important point is that |
OK, so are we adding |
Not bothering. I just wanted to run this by you before editing the manifesto above. |
Yes, I think I'm fine with it, I just got confused by your followup "An important point..." as if we're not making a SKA_ROOT there isn't much that is important about it 😄 |
In Skare (classic),
SKA
always means the root of a Ska runtime environment under which one can finddata
,share
,bin
,lib
etc.In Skare3,
SKA
is actually used mostly to locatedata
. The runtime environment code (includingshare
) generally live somewhere entirely different. Standalone users are free to setSKA
to wherever the data live.There is a conflict with
flt_envs
, which will overrideSKA
and set it to the code root. This is not a huge problem because in a standalone Ska3 one would not normally sourceflt_envs
nor use the launchers. In addition there is always the option to make a soft link for$SKA/data
to the actual data location.In production,
$SKA/data
should definitely exist and link to (or contain) the required data.In Skare3, the
share
directory is required to live within the code root as "configured / installed" files, so if a user has a different SKA (to point at their data), there will be an issue.Here are specific recommendations:
SKA
environment variable is (unambiguously) defined as the directory where adata
directory with package non-static data can be found.SKA_ARCH_OS
env var is used in a production setting (e.g.task_schedule.cfg
) to point at the environment root where one findsbin
,lib
, andshare
directories. A bash launcher can use code like the starcheck_sandbox. Python code can usesys.prefix
.flt_envs
/ska_envs
will always setSKA
to the conda root.flt_envs
/ska_envs
, thenSKA/data
needs to exist (can be a soft link).SKA
environment variable be set to the directory withdata
underneath. In Ska2 some packages default to/proj/sot/ska
ifSKA
isn't defined, but for Ska3 don't do that, raise an exception otherwise. We don't need to immediately scrub for this, but fix along the way when package updates occur.SKA_DATA
or any otherSKA_*
env vars.Encourage use ofska_path
again as a more concise Ska-wide way of getting to the data directory.ska_path
is discouraged.${SKA}/data
orPath(os.environ['SKA'], 'data')
etc is more explicit and will always work. The trickery of the originalska_path
is no longer needed.Actions:
Updateska_path
to requireSKA
.and special-case. Also, I think thatshare
to be w/respect toSKA_ROOT
require_match
should be the default. Done in Simplify ska_path considerably for Ska3 ska_path#4, this just needs to be merged.The text was updated successfully, but these errors were encountered: