Skip to content

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

Merged
mcarans merged 1 commit into
OCHA-DAP:mainfrom
qorud02:docs-resource-date-keywords
Oct 13, 2026
Merged

mcarans merged 1 commit into
OCHA-DAP:mainfrom
qorud02:docs-resource-date-keywords

Conversation

@qorud02

@qorud02 qorud02 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

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.

@mcarans

mcarans commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR. Looks fine to me. Test failure is not related to this change.

@mcarans
mcarans merged commit 9751479 into OCHA-DAP:main Oct 13, 2026
0 of 2 checks passed
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.

2 participants