Replace filters/infer-site.py #42

Open
opened 2026-08-10 14:02:32 +00:00 by msz · 0 comments
Contributor

To provide a best-effort match between a contributor's delegated_by property and a TRR "site" (website taxonomy), a custom infer-site.py script is used:

- name: Process contributors
run: |
cd ${{ steps.codecheckout.outputs.path }}
dtc read-pages ${POOLAPI}/public/records/p/TRR379Person \
| qrg inline-records --api-url ${POOLAPI}/ -c public -p delegated_by \
| uv run filters/join-association.py --inline --pop --field-name x_associated_projects - .cache/projects.jsonl associated_with - \
| uv run filters/infer-site.py - ${{ steps.datacheckout.outputs.path }}/v2.2-2026-01-29-ror-data.parquet - \
| uv run person.py - ${{ steps.websitecheckout.outputs.path }}/content/contributors

The custom script also relies on the ROR data dump (mirrored in q02/ror-data-copy in parquet format for faster access). The data dump is used because it provides an ability to walk "parent" and "related" organizations (this information is not available in the Pool).

It is not clear how we can proceed. Maybe we could extract a smaller mapping to not re-discover it on build. Maybe we need to represent the "site" directly in the metadata system. Maybe we need to give up on the concept of "site".

To provide a best-effort match between a contributor's `delegated_by` property and a TRR "site" (website taxonomy), a custom [infer-site.py](https://hub.trr379.de/q02/pool-publication-page/src/branch/main/filters/infer-site.py) script is used: https://hub.trr379.de/q04/www.trr379.de/src/commit/b019a6cc662e64b1c11f617ecb983a56c209015d/.forgejo/workflows/contributors-projects.yml#L70-L77 The custom script also relies on the ROR data dump (mirrored in [q02/ror-data-copy](https://hub.trr379.de/q02/ror-data-copy) in parquet format for faster access). The data dump is used because it provides an ability to walk "parent" and "related" organizations (this information is not available in the Pool). It is not clear how we can proceed. Maybe we could extract a smaller mapping to not re-discover it on build. Maybe we need to represent the "site" directly in the metadata system. Maybe we need to give up on the concept of "site".
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
q04/www.trr379.de#42
No description provided.