Skip to content

docs: pass resource generation date arguments by keyword - #114

Open
qorud02 wants to merge 1 commit into
OCHA-DAP:mainfrom
qorud02:docs-resource-date-keywords
Open

qorud02 wants to merge 1 commit into
OCHA-DAP:mainfrom
qorud02:docs-resource-date-keywords

Conversation

@qorud02

@qorud02 qorud02 commented Oct 1, 2026

Copy link
Copy Markdown

The Resource Generation examples show the three date options as a single positional argument. In download_generate_resource, that position is actually columns, so adapting the example with a date column silently forwards it as the column selection while leaving datecol unset. The positional form in generate_resource also puts a year column or date callback in the datecol slot.

Use explicit datecol, yearcol, or date_function keywords in the examples, and explain that only one should be supplied. The two snippets now follow the current method signatures.

Validation:

  • Ran the current Dataset.download_generate_resource method with a local downloader and a capture dataset. The original positional "date" was forwarded as columns="date", datecol=None; the corrected keyword was forwarded as columns=None, datecol="date".
  • All 10 checks passed: four argument-forwarding checks and six signature-binding checks covering the three date keywords in both methods.
  • git diff --check passes. This is a documentation-only change; resource generation and live HDX integration were not exercised.

This branch has not been deployed

No deployments
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