-
Notifications
You must be signed in to change notification settings - Fork 0
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
Switch to doit #5
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== Do not change lines below === { "chain": [], "cmd": "python3 scripts/read_data_set.py --save_path temp_test --run_id 2024", "dsid": "934d913e-8268-4342-aa0c-3702ee516d10", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [ "downloaded_data/pre_post_agricultural_production/2024-11-14" ], "pwd": "." } ^^^ Do not change lines above ^^^
=== Do not change lines below === { "chain": [], "cmd": "python3 scripts/read_data_set.py --save_path extracted_data --run_id 2024", "dsid": "934d913e-8268-4342-aa0c-3702ee516d10", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [ "extracted_data" ], "pwd": "." } ^^^ Do not change lines above ^^^
crdanielbusch
commented
Dec 3, 2024
# ("land_use_fires", "2024-11-14"), | ||
# ("land_use_forests", "2024-11-14"), | ||
("pre_post_agricultural_production", "2024-11-14"), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the configuration for the data reading step. That way we can choose which domain and release to read.
=== Do not change lines below === { "chain": [], "cmd": "python3 scripts/download_all_domains.py", "dsid": "934d913e-8268-4342-aa0c-3702ee516d10", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [ "downloaded_data" ], "pwd": "." } ^^^ Do not change lines above ^^^
=== Do not change lines below === { "chain": [], "cmd": "python3 scripts/download_all_domains.py", "dsid": "934d913e-8268-4342-aa0c-3702ee516d10", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [ "downloaded_data" ], "pwd": "." } ^^^ Do not change lines above ^^^
=== Do not change lines below === { "chain": [], "cmd": "python3 scripts/download_all_domains.py", "dsid": "934d913e-8268-4342-aa0c-3702ee516d10", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [ "downloaded_data" ], "pwd": "." } ^^^ Do not change lines above ^^^
# Conflicts: # src/faostat_data_primap/download.py
crdanielbusch
commented
Dec 30, 2024
if not save_path.is_symlink(): | ||
print(f"Skipping download of {save_path} because it already exists.") | ||
return False | ||
os.remove(save_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to solve the problem.
- Check if the file to download already exists (will return
True
for symlinks as well) - Check if it's a symlink
- if no, we have the file on disc (no need to download again)
- if yes, it's not available on disc and datalad cannot unlock the file. In that case we need to delete the symlink before downloading
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Changes as discussed in #3
The set up now is pydoit -> datalad.api -> download / read script. The files are now unlocked before the command is executed.
I don't remember linking the two commands, but it doesn't matter anyway, because we are using pydoit instead of make now.
Re-reading should now be possible.
Should be possible now. The config what data to read is in
definitions.py
. Maybe it should live somwhere else?I think something went wrong with the Makefile and how the commands are linked.
Checklist
Please confirm that this pull request has done the following:
changelog/
Notes on implementation