-
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
GH11 Add an "update_resource" command #12
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
…ses to put it in first position!
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.
Purpose
Version for this PR: 2024.3.1
The aim of this PR is to add a command "update_resource" which updates a resource given a dataset_name, resource_name and a file path. If the resource specified does not exist then it is added at position 0 with description provided by the --description flag.
Incidentally error reporting is improved for "update" so that if there is an authentication error this is reported explicitly.
Major file changes
The main action happens in
hdx_utilities.py
. There is a new test filetest_integration.py
which runs against HDX stage. If a new resource is added then it is put in first position, this is done by first adding the resource then reordering in an explicit separate step. This works but it is not how thehdx-python-api
library is expected to work. An issue is raised to investigate this further #17Minor file changes
Minor documentation changes
Versioning
hdx-cli-toolkit
uses the CalVer versioning scheme with format YYYY.MM.Micro i.e. 2022.12.1 which is updated manually inpyproject.toml
. The "Micro" component is simply an integer increased by 1 at each version, starting from 0.pyproject.toml
and PR description