• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OCHA-DAP / hdx-python-api / 42757085733
97%

Build:
DEFAULT BRANCH: main
Ran 10 Nov 2026 04:39AM UTC
Jobs 1
Files 23
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Nov 2026 04:37AM UTC coverage: 97.405% (+0.005%) from 97.4%
42757085733

push

github

web-flow
HDXDSYS-3031 Replace list fields such as groups in package_revise instead of merging by position (#130)

* Replace list fields such as groups in package_revise instead of merging by position

package_revise merges an update list into the existing list by index. The
existing elements keep their ids and CKAN resolves groups by id before
name, so changed locations were not applied: new groups were only added
past the end of the old list and removals were only sent when the
removed element was last. Filter out non-resource list keys present in
the existing dataset so the update replaces them.

* update min versions

* Only replace list fields when changed and keep unsent element fields

- _revise_filter adds -<key> only when the merged list differs from HDX
- _merge_list merges update dicts over matching HDX dicts (by id/name, else position) so unsent fields are kept
- keep_crisis_tags only runs when the update has tags, so tags are not wiped when the caller sends none

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix list merging edge cases and split merging out of _revise_filter

- _merge_list matches by id first, then name, and no longer merges dicts
  without an id or name by position (fields leaked from removed entries)
- A null or non-list existing value is treated as an empty list instead
  of raising TypeError
- New _merge_list_fields does the in-place merge and returns the changed
  keys; _revise_filter only builds the filter
- Changed list keys already in keys_to_delete are not added to the filter
  twice
- Add return type and Returns: docstring section to _revise_filter

* Fix warnings

* Fix flaky CI: serialise push/PR runs and use local test fixtures

Add a concurrency group so push and pull_request runs for the same branch
don't run test_ckan against the shared hdx_python_api_test dataset at once.
Read resource generation fixtures from disk instead of raw.githubusercontent.com,
which intermittently returns 501 for empty.csv.

-... (continued)

34 of 36 new or added lines in 1 file covered. (94.44%)

3228 of 3314 relevant lines covered (97.4%)

0.97 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
97.96
0.01% src/hdx/data/dataset.py
Jobs
ID Job ID Ran Files Coverage
1 tests - 42757085733.1 10 Nov 2026 04:39AM UTC 23
97.4
GitHub Action Run
Source Files on build 42757085733
  • Tree
  • List 23
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #42757085733
  • e4bf5101 on github
  • Prev Build on main (#40637071618)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc