Skip to content

Conversation

@ml-evs
Copy link
Member

@ml-evs ml-evs commented Aug 4, 2024

By default, delete will now simply set a flag _deleted on the database entry, so that it can be restored in future. This is important for e.g., labelled samples and maintaining old relationships to samples.

@cypress
Copy link

cypress bot commented Aug 4, 2024

datalab    Run #2853

Run Properties:  status check failed Failed #2853  •  git commit a024a3c012 ℹ️: Merge 8a9caa20a2dd871bc458207f239fa3bddefe5bdc into f5bc9dddcb761c5b2c61704d1a1c...
Project datalab
Branch Review ml-evs/delete-sample-rework
Run status status check failed Failed #2853
Run duration 08m 08s
Commit git commit a024a3c012 ℹ️: Merge 8a9caa20a2dd871bc458207f239fa3bddefe5bdc into f5bc9dddcb761c5b2c61704d1a1c...
Committer Matthew Evans
View all properties for this run ↗︎

Test results
Tests that failed  Failures 69
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 78
View all changes introduced in this branch ↗︎

Tests for review

Failed  batchSampleFeature.cy.js • 7 failed tests • End-to-end tests (firefox)

View Output

Test Artifacts
Batch sample creation > modifies some data in the first sample Screenshots
Batch sample creation > modifies some data in the second sample Screenshots
Batch sample creation > checks the copied samples Screenshots
Batch sample creation > checks the created samples Screenshots
Batch sample creation > uses the template id, name, date, copyFrom, and components Screenshots
Batch sample creation > plays with the number of rows Screenshots
Batch cell creation > creates a batch of cells using the template id, name, date, copyFrom, and components Screenshots
Failed  editPage.cy.js • 8 failed tests • End-to-end tests (firefox)

View Output

Test Artifacts
Edit Page > Checks editing the sample edit page Screenshots
Edit Page > adds a chemical formula to component1 Screenshots
Edit Page > adds some synthesis information Screenshots
Edit Page > deletes synthesis components and re-adds them Screenshots
Edit Page > tries to add a non-numeric value into quantity Screenshots
Edit Page > Add some blocks to the sample and checks unsaved warning behavior Screenshots
Edit Page > Uploads an XRD file, makes an XRD block and checks that the plot works Screenshots
Edit Page > Uploads a fake PNG image, make a Media block and checks that the image is shown Screenshots
Failed  equipment.cy.js • 3 failed tests • End-to-end tests (firefox)

View Output

Test Artifacts
Equipment table page > Checks if one of the equipment items is in the database Screenshots
Equipment table page > Deletes an item Screenshots
Equipment edit page > modifies some data in a sample Screenshots
Failed  sampleTablePage.cy.js • 5 failed tests • End-to-end tests (firefox)

View Output

Test Artifacts
Advanced sample creation features > deletes the first sample and makes sure the copy is still there Screenshots
Advanced sample creation features > modifies some data in the second sample Screenshots
Advanced sample creation features > checks the edit page of the copied sample Screenshots
Advanced sample creation features > copies the copied sample, this time with additional components Screenshots
Advanced sample creation features > checks the edit page of the copied sample with components Screenshots
Failed  batchSampleFeature.cy.js • 7 failed tests • End-to-end tests (chrome)

View Output

Test Artifacts
Batch sample creation > modifies some data in the first sample Test Replay Screenshots
Batch sample creation > modifies some data in the second sample Test Replay Screenshots
Batch sample creation > checks the copied samples Test Replay Screenshots
Batch sample creation > checks the created samples Test Replay Screenshots
Batch sample creation > uses the template id, name, date, copyFrom, and components Test Replay Screenshots
Batch sample creation > plays with the number of rows Test Replay Screenshots
Batch cell creation > creates a batch of cells using the template id, name, date, copyFrom, and components Test Replay Screenshots

The first 5 failed specs are shown, see all 12 specs in Cypress Cloud.

@ml-evs ml-evs changed the title Rework the /delete-sample route and enable soft deletion of items Enable soft deletion of items Aug 4, 2024
@ml-evs ml-evs force-pushed the ml-evs/delete-sample-rework branch 4 times, most recently from 3c7d215 to aac2082 Compare August 5, 2024 21:02
@codecov
Copy link

codecov bot commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 81.66667% with 11 lines in your changes missing coverage. Please review.

Project coverage is 68.35%. Comparing base (39be3fb) to head (bcd033f).

Files with missing lines Patch % Lines
pydatalab/pydatalab/mongo.py 60.00% 4 Missing ⚠️
pydatalab/pydatalab/permissions.py 72.72% 3 Missing ⚠️
pydatalab/pydatalab/routes/v0_1/graphs.py 81.81% 2 Missing ⚠️
pydatalab/pydatalab/routes/v0_1/items.py 90.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #831      +/-   ##
==========================================
+ Coverage   68.22%   68.35%   +0.12%     
==========================================
  Files          62       62              
  Lines        3909     3953      +44     
==========================================
+ Hits         2667     2702      +35     
- Misses       1242     1251       +9     
Files with missing lines Coverage Δ
pydatalab/pydatalab/models/items.py 96.77% <100.00%> (ø)
pydatalab/pydatalab/models/traits.py 97.87% <100.00%> (+0.37%) ⬆️
pydatalab/pydatalab/routes/v0_1/graphs.py 94.59% <81.81%> (-2.24%) ⬇️
pydatalab/pydatalab/routes/v0_1/items.py 82.80% <90.00%> (+0.15%) ⬆️
pydatalab/pydatalab/permissions.py 84.31% <72.72%> (-0.14%) ⬇️
pydatalab/pydatalab/mongo.py 76.62% <60.00%> (-3.66%) ⬇️

@ml-evs ml-evs force-pushed the ml-evs/delete-sample-rework branch from aac2082 to 25da407 Compare August 31, 2024 11:37
@ml-evs ml-evs force-pushed the ml-evs/delete-sample-rework branch from 25da407 to bcd033f Compare October 3, 2024 12:14
@ml-evs ml-evs added this to the v0.5.x milestone Oct 8, 2024
@ml-evs ml-evs force-pushed the ml-evs/delete-sample-rework branch from bcd033f to 52d9160 Compare December 1, 2024 19:15
@ml-evs ml-evs modified the milestones: v0.5.x, v0.6.x Dec 1, 2024
@ml-evs
Copy link
Member Author

ml-evs commented Dec 1, 2024

Have tried to rebase this too, but needs more time in the oven. Will revisit for the next release cycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants