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

MITLibraries / timdex-dataset-api / 12284138621
99%
main: 93%

Build:
Build:
LAST BUILD BRANCH: USE-306-handle-missing-metadata-or-embeddings
DEFAULT BRANCH: main
Ran 11 Dec 2024 08:14PM UTC
Jobs 1
Files 5
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

11 Dec 2024 08:04PM UTC coverage: 98.592% (+0.6%) from 98.013%
12284138621

push

github

jonavellecuerdo
Refactor DatasetRecord to use attrs

Why these changes are being introduced:
* Reworking the dataset partitions to use the [year, month, day]
of the 'run_date' means that parquet files for different 'source' runs
on the same 'run_date' get written to the same partition directory.
Therefore, it is crucial that the timdex_dataset_api.write method
retrieves the correct partition columns from the (batches) of DatasetRecord
objects. The DatasetRecord class has been refactored to adhere
to the following criteria:

1. When writing to the dataset, and therefore serializing DatasetRecord objects,
   year, month, day should be derived from the run_date and should not be modifiable
2. If possible, avoid parsing a datetime string 3 times for each partition column

How this addresses that need:
* Refactor DatasetRecord to use attrs
* Define custom strict_date_parse converter method for 'run_date' field
* Simplify serialization method to rely on converter for 'run_date'
  error handling
* Remove DatasetRecord.validate
* Include attrs as a dependency

Side effects of this change:
* None

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/TIMX-432

23 of 23 new or added lines in 1 file covered. (100.0%)

140 of 142 relevant lines covered (98.59%)

0.99 hits per line

Jobs
ID Job ID Ran Files Coverage
1 12284138621.1 11 Dec 2024 08:14PM UTC 5
98.59
GitHub Action Run
Source Files on build 12284138621
  • Tree
  • List 5
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #12284138621
  • 5e532d36 on github
  • Prev Build on TIMX-432-rework-dataset-partitions (#12282750069)
  • Next Build on TIMX-432-rework-dataset-partitions (#12284149454)
  • 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