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

GH11 Add an "update_resource" command #12

Merged
merged 20 commits into from
Mar 18, 2024
Merged

Conversation

IanHopkinson
Copy link
Collaborator

@IanHopkinson IanHopkinson commented Mar 10, 2024

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 file test_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 the hdx-python-api library is expected to work. An issue is raised to investigate this further #17

Minor 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 in pyproject.toml. The "Micro" component is simply an integer increased by 1 at each version, starting from 0.

  • Version updated in pyproject.toml and PR description

@IanHopkinson IanHopkinson merged commit 5302a4e into main Mar 18, 2024
1 check passed
@IanHopkinson IanHopkinson deleted the gh11_update_resource branch March 18, 2024 06:45
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.

1 participant