Skip to content

Assorted fixes for starting materials in collections #1167

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

Merged
merged 6 commits into from
May 14, 2025
Merged

Conversation

ml-evs
Copy link
Member

@ml-evs ml-evs commented May 2, 2025

Some fixes to allow starting materials to appear in collections in the UI, plus some assorted fixes to the item graph to better show starting materials.

  • Refactor summary endpoint so that starting materials can be requested when called from collection table
  • Add a default search index of date for all items and use it by default when returning inventory (rather than implicitly using ctime
  • Update the item graph endpoint so ignore collections by default, which are a frequent cause of errors
  • Some tweaks for logging and cleaning up MongoDB connections

Copy link

cypress bot commented May 2, 2025

datalab    Run #3286

Run Properties:  status check passed Passed #3286  •  git commit b28a3510be ℹ️: Merge 1fe19fb9e5160db15ad9b6d110185f73c64614ed into 1964ba51ce18b92264f91798d5fe...
Project datalab
Branch Review ml-evs/item-summary
Run status status check passed Passed #3286
Run duration 07m 53s
Commit git commit b28a3510be ℹ️: Merge 1fe19fb9e5160db15ad9b6d110185f73c64614ed into 1964ba51ce18b92264f91798d5fe...
Committer Matthew Evans
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 504
View all changes introduced in this branch ↗︎

@ml-evs ml-evs force-pushed the ml-evs/item-summary branch 3 times, most recently from 55fa8f6 to 34b0ca3 Compare May 4, 2025 14:45
@ml-evs ml-evs added refactoring For issues/PRs that refactor existing code/features Python labels May 14, 2025
@ml-evs ml-evs force-pushed the ml-evs/item-summary branch from a95ec89 to 2157df8 Compare May 14, 2025 12:08
@ml-evs ml-evs changed the title Fixes for starting materials in collections Assorted fixes for starting materials in collections May 14, 2025
ml-evs added 4 commits May 14, 2025 13:28
…n nodes by default

Update graph test case to remove collections

- Revert to previous behaviour where starting materials are hidden unless connected or requested

- Add simple separate test module for item graph
@ml-evs ml-evs force-pushed the ml-evs/item-summary branch from 2157df8 to 1fe19fb Compare May 14, 2025 12:28
@ml-evs ml-evs marked this pull request as ready for review May 14, 2025 12:37
Copy link
Contributor

@BenjaminCharmes BenjaminCharmes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works very well !

@ml-evs ml-evs merged commit 61b917c into main May 14, 2025
23 of 29 checks passed
@ml-evs ml-evs deleted the ml-evs/item-summary branch May 14, 2025 13:26
Copy link

codecov bot commented May 14, 2025

Codecov Report

❌ Patch coverage is 75.60976% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.94%. Comparing base (1964ba5) to head (1fe19fb).
⚠️ Report is 98 commits behind head on main.

Files with missing lines Patch % Lines
pydatalab/src/pydatalab/routes/v0_1/graphs.py 55.55% 4 Missing ⚠️
pydatalab/src/pydatalab/logger.py 76.92% 3 Missing ⚠️
pydatalab/src/pydatalab/routes/v0_1/items.py 83.33% 2 Missing ⚠️
pydatalab/src/pydatalab/mongo.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1167      +/-   ##
==========================================
- Coverage   71.22%   70.94%   -0.29%     
==========================================
  Files          64       64              
  Lines        4240     4271      +31     
==========================================
+ Hits         3020     3030      +10     
- Misses       1220     1241      +21     
Files with missing lines Coverage Δ
pydatalab/src/pydatalab/routes/v0_1/collections.py 70.45% <100.00%> (ø)
pydatalab/src/pydatalab/mongo.py 81.08% <83.33%> (+1.08%) ⬆️
pydatalab/src/pydatalab/routes/v0_1/items.py 82.63% <83.33%> (-0.96%) ⬇️
pydatalab/src/pydatalab/logger.py 84.84% <76.92%> (-1.95%) ⬇️
pydatalab/src/pydatalab/routes/v0_1/graphs.py 77.27% <55.55%> (-19.56%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python refactoring For issues/PRs that refactor existing code/features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants