Smithsonian / Smithsonian/caas-aspace-scripts
[FEATURE] Include Updating Resources and all their Associated Archival Objects in update_refids.py
@crugas is already working on this.
Since Apr 25, 2025.
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 1
Description
Is your feature request related to a problem? Please describe.
Update the existing update_refids.py script to include parameter to enter a Resource ID (or URI) to update all the archival objects' refids for that resource. This will need the following requirements:
- Reset the “caas_next_refid” field at the resource level to 1 so refids start with 1. See https://github.com/Smithsonian/caas-aspace-scripts/blob/322c1998f91cfc35c9a25cb75a0bceee9376815c/python_scripts/one_time_scripts/refid.py#L45C42-L45C44
- Run a query to get all archival objects in a resource using SQL: https://github.com/Smithsonian/caas-aspace-scripts/blob/322c1998f91cfc35c9a25cb75a0bceee9376815c/python_scripts/utilities.py#L198
Describe the solution you'd like
The script should be able to intake a series of archival objects to update or a singular resource (or multiple resources?) to update their URIs.
Describe alternatives you've considered
We could separate these into 2 different scripts. One for updating a resource and all its archival objects, another for just updating specific archival objects. Not sure which is better, though keeping it all in one script would make it easier to understand at a high level.
Additional context
#43
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.