Skip to content
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

Add ability to add batch of cells #797

Merged
merged 9 commits into from
Jul 30, 2024
Merged

Add ability to add batch of cells #797

merged 9 commits into from
Jul 30, 2024

Conversation

jdbocarsly
Copy link
Member

@jdbocarsly jdbocarsly commented Jul 11, 2024

Currently, the "batch add" feature only allows for adding samples. This PR adds the ability to also add cells, with a template option for positive electrode, electroylte, and negative electrode.

  • Functionality for adding a batch of cell and choosing electrodes
  • Figure out how to cleanly label positive electrode, electrolyte, and negative electrode fields
  • Rename "Add a batch of samples" -> "Add a batch of items"
  • Rename sample -> item in BatchCreateSampleModal.vue
  • Turn on taggable in the ItemSelect components in the batch sample modal
  • update e2e tests
  • add test(s)

Closes #396

@jdbocarsly jdbocarsly changed the title Add ability to batch cells Add ability to add batch of cells Jul 11, 2024
Copy link

codecov bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.25%. Comparing base (95d5998) to head (c6dd527).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #797      +/-   ##
==========================================
- Coverage   67.26%   67.25%   -0.01%     
==========================================
  Files          62       62              
  Lines        3858     3857       -1     
==========================================
- Hits         2595     2594       -1     
  Misses       1263     1263              
Files Coverage Δ
pydatalab/pydatalab/routes/v0_1/items.py 82.55% <100.00%> (-0.07%) ⬇️

@datalab-org datalab-org deleted a comment from cypress bot Jul 11, 2024
Copy link

cypress bot commented Jul 11, 2024



Test summary

1 0 0 0


Run details

Project datalab
Status Passed
Commit 3d86110 ℹ️
Started Jul 30, 2024 12:13 PM
Ended Jul 30, 2024 12:13 PM
Duration 00:04 💡
OS Linux Ubuntu -
Browser Chrome 126

View run in Cypress Cloud ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Cloud

@jdbocarsly jdbocarsly force-pushed the jdb/batch-cells branch 2 times, most recently from 49d0da0 to 1137cd8 Compare July 12, 2024 00:09
@jdbocarsly jdbocarsly marked this pull request as ready for review July 12, 2024 00:09
@jdbocarsly jdbocarsly requested a review from ml-evs as a code owner July 12, 2024 00:09
@jdbocarsly jdbocarsly added the webapp For issues/PRs pertaining to the web interface label Jul 12, 2024
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.

Perfect, everything works and looks nice. 👍
A small difference with "Add an item" is that Cell components are not written as optional in "Add batch of cells", If you want to add it.

@jdbocarsly
Copy link
Member Author

jdbocarsly commented Jul 14, 2024

A small difference with "Add an item" is that Cell components are not written as optional in "Add batch of cells", If you want to add it.

@BenjaminCharmes This is a good point, but I just tried adding in (optional) and it makes it a little bit messy, especially on small fields. I think that people will be able to figure it out pretty well, but if we get questions from users about this we can revisit in the future.

In general, I think this component probably needs to be redesigned to be more flexible/powerful at some point, and also mobile-friendly.

rename samples -> items in Samples.vue (code and gui)

add ability to add cell constituents in the batch modal

rename BatchCreateSampleModal.vue to BatchCreateItemModal.vue

rename various instances of sample->item in the source code for BatchCreateItemModal.vue

use placeholder to indicate poisitive electrode, negative electrode, and electrolyte fields when adding a batch of cells

fix typo in BatchCreateItemModal
…properly add in the additional electrode/electrolyte components unless the cell already had a component already
@ml-evs ml-evs added the enhancement New feature or request label Jul 30, 2024
ml-evs
ml-evs previously approved these changes Jul 30, 2024
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

Looks great, thanks @jdbocarsly! Will push an additional test to this PR for the Python change, but otherwise this is ready to go.

I'm going to test it on the demo server with some legacy data immediately after merging, and if all is good I'll make a release.

pydatalab/pydatalab/routes/v0_1/items.py Show resolved Hide resolved
@ml-evs ml-evs merged commit 204eec6 into main Jul 30, 2024
8 checks passed
@ml-evs ml-evs deleted the jdb/batch-cells branch July 30, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request webapp For issues/PRs pertaining to the web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion: Allow creation of cells through batch UI
3 participants