Read Work identifiers from file
Closes https://github.com/internetarchive/openlibrary/issues/9234
feature/fix/refactor
Technical
This is taking the same steps applied to editions[1] and authors[2] and applying it to works. get_work_config() is currently not used for anything, probably because we’re still waiting for an actual interface to edit the Work identifiers, so this is more of a preliminary step to ensure that Works will be handled in the same way that Editions and Authors are. (And to allow for PRs to add Work identifiers while waiting for that UI, rather than limiting that to OL admins.)
[1] https://github.com/internetarchive/openlibrary/issues/9234 https://github.com/internetarchive/openlibrary/pull/9483 [2] https://github.com/internetarchive/openlibrary/issues/9666 https://github.com/internetarchive/openlibrary/pull/9769
(I asked 3 weeks ago whether a PR for this would be welcome or not, and never got a response, so now I just made the PR.)
Testing
Only the pre-commit hooks were done. The mypy hook failed, but Idk if it’s a local issue that /infogami isn’t found or not.
mypy.....................................................................Failed
- hook id: mypy
- duration: 0.37s
- exit code: 2
mypy: can't read file '[…]/openlibrary/infogami': No such file or directory
Stakeholders
@jimchamp