Skip to content

Conversation

@dchiller
Copy link
Collaborator

@dchiller dchiller commented Dec 17, 2024

Closes #900.

The most significant change in this PR to expandr.py is the use of the /genres endpoint on CantusDB to get genre code -> description mappings, rather than parsing CantusDB's html.

Removes test_import_all_data, which previously called the manuscript import command but then did not do any testing with the results (in other words, it tested that the command ran without any python error). Since we are in the midst of a larger refactor of data import, I think we can safely get rid of this test for the time being.

Add types and basic refactoring of `helpers/expandr.py`.

Reformat position mappings from csv to json for easier reading at import time.

Use CantusDB `genres` endpoint (rather than html parsing) to import genre information.
`test_import_all_data` imports all manuscripts in the test database and then does nothing with them. This takes a long time when running tests and is not very helpful. Since a refactoring of the entire import/indexing process is incoming, this test can be temporarily removed.
@dchiller dchiller merged commit cd2464a into DDMAL:main Jan 9, 2025
2 checks passed
@dchiller dchiller deleted the i900-refactor-expandr branch January 9, 2025 21:37
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.

Type and refactor the expandr.py helper

2 participants