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

Remove reference to SKA_DATA, SKA_SHARE, etc from Ska packages #11

Open
taldcroft opened this issue Jul 2, 2018 · 6 comments
Open

Remove reference to SKA_DATA, SKA_SHARE, etc from Ska packages #11

taldcroft opened this issue Jul 2, 2018 · 6 comments

Comments

@taldcroft
Copy link
Member

Replace with os.path.join(SKA, 'data', ..) etc. Also use SKA = os.environ.get('SKA', '/proj/sot/ska') in general. The intent is to make it easier to have a standalone Ska environment without the production Ska infrastructure.

@taldcroft
Copy link
Member Author

I used a GitHub search of the SOT org for SKA_DATA and for user-facing packages there is only mica and starcheck that would benefit from this update. (And starcheck probably does not need to be run outside of production).

There are a whole bunch of task schedule config files and some cron jobs and random stuff, but all these run strictly in production.

@taldcroft
Copy link
Member Author

Searching like org:sot SKA_DATA language:python (with SHARE and perl options) reveals, actually, that there may be NO user facing changes required. The ones I originally saw for DATA appear to just be in process update modules.

@taldcroft
Copy link
Member Author

Maybe the proof in the pudding will be to pass ska_testr with only SKA set. Or maybe even without SKA set.

@jeanconn
Copy link
Contributor

jeanconn commented Jul 2, 2018

I think the mica build tests passed without SKA set. Not that it matters. But all data was available in default locations in /proj/sot/ska as I was running and testing from HEAD.

@jeanconn
Copy link
Contributor

jeanconn commented Jul 2, 2018

Though of the packages that are "fine" I think some are using ska_path and some are using custom code. Not sure if it is worth a ska_path push.

@taldcroft
Copy link
Member Author

I'm going to start an online argument with myself.

Also use SKA = os.environ.get('SKA', '/proj/sot/ska') in general.

I'm thinking that one explicit rule is the best: to use Ska3 you need to set the SKA env. var to the location where data directories live. End of story, no defaults. If it isn't there then you get exceptions. The benefit to ska_path might be to have a uniform way to catch the exception and print a nice message.

Speaking of ska_path, as I look back on that it seems like it just complicates things but allowing for 4 possibilities that the user can choose from instead of just 1 (put the data somewhere and define SKA on your cshrc or bashrc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants