Open amhanson9 opened 2 months ago
@emkaser Heads up about this, in case you do development. I don't love having the same function copied, so we can try to figure out how solve the error if we're developing this much. In the meantime, the docstring includes which scripts have a copy of the function and which script has the unit tests for it.
The scripts collection_summary.py and format_list.py imports the functions most_recent_risk_csv from risk_update and check_argument from validate_fixity. The script risk_update.py imports the function accession_test from collection_summary. Unit tests for these have started failing with this error:
ImportError: cannot import name 'FUNCTION' from partially initialized module 'SCRIPT' (most likely due to a circular import)
The collection_summary.py and format_list.py tests have previously passed, so I'm not sure what caused this to start happening. The import in risk_update.py is new, to add new functionality. I didn't find an obvious solution online, so for now copy all the functions into the scripts that use them, with a note to help keep them in sync. But it would be easier to maintain if we can get this working again. Tests started passing with check_argument still imported, so left it there.