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

MITLibraries / timdex-pipeline-lambdas / 20248401219
96%
main: 96%

Build:
Build:
LAST BUILD BRANCH: v2.8
DEFAULT BRANCH: main
Ran 15 Dec 2025 09:43PM UTC
Jobs 1
Files 6
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Dec 2025 09:41PM UTC coverage: 96.045% (+0.7%) from 95.298%
20248401219

Pull #331

github

ghukill
Refactor handling of input payload and output response

Why these changes are being introduced:

Each time a change is required in this lambda, one can feel some of
brittleness that has collected around input handling, argument passing,
and logic branching for extract, transform, and load command generation.

The change that prompted this refactor was related to how and when
we set `success` or `failure` nodes in the response object, where it
was fairly difficult in the code to see how and when they are set.

Ignoring whether or not we ultimately rework how `success` and `failure`
are set as possible nodes in the output property, centralizing the form
of the input and output responses could assist in that work.

How this addresses that need:

The refactor work here is to create two new dataclass objects:
- InputPayload
- ResultPayload

By having typed properties, at a glance we can determine what kind
of properties we can expect on the input payload and what we plan
to return in our response.

Furthermore, by having objects to pass around, this simplifies the
signatures of a lot of helpers that were passing around source, run_date,
run_type, etc., in numerous places.  Now we generally pass around an
`input_payload` object and a `result` object, with functions modifying
those.

Very little changes beyond this.

Side effects of this change:
* No side effects in behavior.

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/USE-279
  * while not directly related, it's the ticket that prompted this work
Pull Request #331: USE 279 - Refactor handling of input payload and output response

145 of 149 new or added lines in 4 files covered. (97.32%)

1 existing line in 1 file now uncovered.

340 of 354 relevant lines covered (96.05%)

0.96 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
95.83
-1.39% lambdas/commands.py
2
98.2
3.97% lambdas/format_input.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
95.83
-1.39% lambdas/commands.py
Jobs
ID Job ID Ran Files Coverage
1 20248401219.1 15 Dec 2025 09:43PM UTC 6
96.05
GitHub Action Run
Source Files on build 20248401219
  • Tree
  • List 6
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20248401219
  • Pull Request #331
  • PR Base - main (#20140365958)
  • Delete
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

© 2026 Coveralls, Inc