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

Save data to standard directory #53

Merged
merged 5 commits into from
Aug 19, 2024
Merged

Save data to standard directory #53

merged 5 commits into from
Aug 19, 2024

Conversation

stefsmeets
Copy link
Contributor

@stefsmeets stefsmeets commented Aug 12, 2024

This PR adds a standard data directory for JANUS. You can still set FWL_DATA, but instead of crashing, JANUS will use a default directory instead.

I single-sourced the FWL data directory to janus.utils.data.FWL_DATA_DIR, so you can do from janus.utils.data import FWL_DATA_DIR. This avoids checking the env var in multiple places.

I also added a small CLI command to check the current data locations:

$ janus env
RAD_DIR location: /home/stef/.local/share/socrates/SOCRATES
FWL_DATA location: /home/stef/.local/share/fwl_data
$ FWL_DATA=~/some/other/path/fwl_data janus env
RAD_DIR location: /home/stef/.local/share/socrates/SOCRATES
FWL_DATA location: /home/stef/some/other/path/fwl_data

Closes #36

@stefsmeets stefsmeets requested a review from nichollsh August 12, 2024 12:21
@stefsmeets
Copy link
Contributor Author

Hi @nichollsh Could you have a look at this PR and let me know what you think?

@timlichtenberg
Copy link
Member

FYI, Harrison is on vacation this week.

@stefsmeets
Copy link
Contributor Author

Ah, good to know, seems like Laurent as well. I was wondering why it was so quiet on all my PRs 😅

@timlichtenberg
Copy link
Member

I can see that I can get some reviewed during the week, but I will probably not be able to do all of them.

@stefsmeets
Copy link
Contributor Author

No worries, there is no rush!

@lsoucasse lsoucasse self-requested a review August 19, 2024 13:52
Copy link
Member

@lsoucasse lsoucasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same changes as approved in Mors. Good.

@stefsmeets stefsmeets merged commit d289631 into master Aug 19, 2024
3 checks passed
@stefsmeets stefsmeets deleted the data-directory branch August 19, 2024 14:32
lsoucasse pushed a commit that referenced this pull request Sep 24, 2024
* Set standard directory for data

* Add CLI command, `janus env` to show env variables/data locations

* Update documentation

* Print destination

* Uppercase variable
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

Successfully merging this pull request may close these issues.

Use standard directory for data
3 participants