• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MITLibraries / dspace-submission-composer / 16680805114

01 Aug 2025 05:01PM UTC coverage: 96.447% (-0.4%) from 96.872%
16680805114

Pull #190

github

jonavellecuerdo
Rework ItemSubmission to better encapsulate data persistence layer

Why these changes are being introduced:
* Initial work to update the 'reconcile' and 'submit' commands to use the refactored
ItemSubmission class underscored the need for additional updates to improve the
ergonomics of the class and emphasize the encapsulation of data persistance
as part of the domain model. While most of the code was already in place,
these updates focus on some renaming and slight reorganization of methods related
to database operations. The renames were intended to reflect that pulling data
from the DynamoDB table is an inherent part of creating an ItemSubmission.

How this addresses that need:
* Move logic for loading data into ItemSubmission into a private method ('_from_db')
* Rename 'update_db' -> 'upsert_db' to clarify insertion of new records
* Rework existing methods to get, get_batch, and create methods
* Update Workflow.reconcile_items to use get and create methods
* Update Workflow.submit_items to use get_batch to iterate over ItemSubmission
instances for a given batch

Side effects of this change:
* None

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/IN-1355
Pull Request #190: In 1355 refactor reconcile for itemsubmission

42 of 44 new or added lines in 4 files covered. (95.45%)

4 existing lines in 2 files now uncovered.

950 of 985 relevant lines covered (96.45%)

0.96 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

98.48
/dsc/workflows/base/simple_csv.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc