-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust source fields: holding_institution, name, production_method, source_completeness #1645
Conversation
0fcaaa2
to
d520337
Compare
The failing test will be fixed with the merge of #1643 -- once that is reviewed and merged I'll fix this. |
Updates source create, source edit, and source detail pages. Adds command to populate the `source_completeness` field based on the current contents of the `full_source` field (which can be deleted after this field is populated).
Removes the need to duplicate process of using default SelectWidget on ChoiceFields and then manually changing attributes.
This commit removes the requirement for a source to have a holding_institution. Tests and forms are updated to account for this. The `migrate_records` command is updated so that sources with un-parseable sigla that are not otherwise accounted for (by virtue of being private collections or prints) do not have institution records made. Note: For the purposes of data migration, no constraint is added to sources to designate when no holding institution is necessary. After migration, these should be modified. Refs: DDMAL#1631
d520337
to
065ef07
Compare
Tests are now passing. Have not heard back confirmation on some of the remaining formatting questions, so holding for the moment. |
Ok, after discussing the remaining questions with Anna, Debra, and Jennifer:
|
@lucasmarchd01 this is ready for you now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
NOTE: This PR removes some previously-committed migrations. You will need to re-create your local/staging database to do development after this PR is merged. I decided to do this because it will make the update of production go smoother (ie. not have to run to a certain migration, then run the migrate_records command, then apply the rest of the migrations), which ultimately felt preferable to prioritizing people's individual current development database status.
Makes significant changes to the
Source
model:Source
to have aholding_institution
. Remove requirement for sources to have a holding institution if source is a reconstruction #1631 requests that holding_institution-less sources be possible only for reconstruction sources. This will be added oncesource_completeness
field is available to mark reconstructions as such (see To-do's below).[No Shelfmark]
toSource.shelfmark
field.source_completeness
choice field to replace thefull_source
boolean field and add the "Reconstruction" option. A command,populate_source_completeness
, will populate the initial values of this field. Note that after this new field is populated, thefull_source
field will be redundant and can be removed (see To-do's below).production_method
choice field to note (currently) whether a source is a manuscript or printed source.These changes are reflected in source create, edit, detail, and list pages. Relevant tests are also updated.
Makes cosmetic changes to the
Institution
model by changing various field defaults from latin abbreviations to english words.Adds the source's
name
field to source create, edit, and detail views and to the source heading.Performs some minor cosmetic changes: refactors
forms.py
a bit with a newStyledChoiceField
class so that repeated changes to widget style attributes are no longer necessary and changes the ordering of the options in the "Holding Institution" input field on the Source admin page.To-Do's
populate_source_completeness
command on serversCloses #1628.
Most display changes occur on the source list and source detail pages. In screenshots below, disregard repetitions of "(fragment)" on new version...these will be fixed in underlying data.