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

feat(opentrons-ai-client, opentrons-ai-server): add folders for opentrons-ai #14788

Merged
merged 12 commits into from
Apr 10, 2024

Conversation

koji
Copy link
Contributor

@koji koji commented Apr 3, 2024

Overview

opentrons-ai-client: frontend
opentrons-ai-server: backend (content will be added later)

js set up commnad works without any errors and when you run make -C opentrons-ai-client dev, the dev server works without any errors and you can access localhost:5173.

close AUTH-202, AUTH-203

Test Plan

  1. run make teardown-js && make setup-js
  2. run make -C opentrons-ai-client dev
  3. react application shows up

Changelog

  • add opentrons-ai-client and opentrons-ai-server

Review requests

Risk assessment

low

…rons ai

opentrons-ai-client: frontend opentrons-ai-server: backend

close AUTH-202, AUTH-203
@koji koji requested review from a team, sanni-t, Elyorcv and jbleon95 and removed request for a team, sanni-t, Elyorcv and jbleon95 April 3, 2024 14:52
@koji koji added the authorship label Apr 4, 2024
@koji koji requested review from y3rsh, ncdiehl11 and jerader April 8, 2024 21:56
@koji koji marked this pull request as ready for review April 8, 2024 21:59
@koji koji requested review from a team as code owners April 8, 2024 21:59
@koji koji removed request for a team April 8, 2024 21:59
@koji koji marked this pull request as draft April 8, 2024 22:13
@koji
Copy link
Contributor Author

koji commented Apr 8, 2024

  • add eslint config

Comment on lines 1 to 2
#root {
max-width: 1280px;
Copy link
Member

Choose a reason for hiding this comment

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

we should consider using styled-components like we do in the app for consistency. we can create global styles like this: https://github.com/Opentrons/opentrons/blob/edge/app/src/atoms/GlobalStyle/index.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

all css files are deleted.

@koji koji requested a review from shlokamin April 9, 2024 19:42
@koji koji marked this pull request as ready for review April 9, 2024 19:42
@koji koji requested a review from Elyorcv April 9, 2024 20:42
"@fontsource/dejavu-sans": "5.0.3",
"@fontsource/public-sans": "5.0.3",
"@opentrons/components": "link:../components",
"i18next": "^19.8.3",
Copy link
Collaborator

Choose a reason for hiding this comment

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

good idea to add i18next right off the bat instead of what we did with PD haha

@@ -0,0 +1,2 @@
# opentrons ai server makefile
# TBD
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this makefile needed?

Copy link
Collaborator

Choose a reason for hiding this comment

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

i guess it is but looks to be causing a lint error right now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Really?
Did you run make lint?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran the command and I didn't see any errors.
Could you share the error you saw?

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh my bad, i thought this red icon thing meant there was a lint error 😅

Screenshot 2024-04-09 at 17 35 23

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you for sharing.
fortunately, that isn't a lint error.

# prerequisite: install dependencies as specified in project setup
make setup
# launch the dev server
make -C opentrons-ai-server dev
Copy link
Collaborator

Choose a reason for hiding this comment

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

just double checking that this make -C opentrons-ai-server dev does not work yet right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not yet.
server will be added, and we will use python for the backend.

Copy link
Collaborator

@jerader jerader left a comment

Choose a reason for hiding this comment

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

nice! I followed the instructions and opened up the opentrons ai react app 🎉 . Great work so far, everything is very organized in my opinion. Just left some comments and questions but nothing too major.

Comment on lines +28 to +30
- [React][]
- [Babel][]
- [Vite][]
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we add a single sentence for each line to know why they are there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, the reason is monorepo


Some important directories:

- `opentrons-ai-server` — Opentrons AI application's server
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: Could we provide hyperlink here so that when we click it we go directly there.


## Copy management

We use [i18next](https://www.i18next.com) for copy management and internationalization.
Copy link
Contributor

Choose a reason for hiding this comment

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

What does internationalisation mean here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can be translated into other languages and that is the reason why we use i18next.

Copy link
Contributor

Choose a reason for hiding this comment

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

you mean English to Japan for example?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah that is one example.
I think we can gat help from Ed to make readme better before the externa beta testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i18next will work like this when we add simple ui for language change and json files for languages.

Copy link
Contributor

@Elyorcv Elyorcv left a comment

Choose a reason for hiding this comment

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

LGTM. Could you provide a diagram showing how all the tools and libraries are connected? I want to see how each one is used. If that's not possible, no worries.

"tipracks_and_labware": "Tip racks and labware: Use names from the Opentrons Labware Library.",
"type_your_prompt": "Type your prompt...",
"well_allocations": "Well allocations: Describe where liquids should go in labware.",
"what_if_you": "What if you don’t provide all of those pieces of information?",
Copy link
Contributor

Choose a reason for hiding this comment

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

Since OpenAI cannot follow instruction consistently, this may not happen all the time. So I am happy to remove this line.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why everything line by line, why dont we do something like triplet quote in python?
''' '''

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is json file and we use eslint.

@koji
Copy link
Contributor Author

koji commented Apr 10, 2024

LGTM. Could you provide a diagram showing how all the tools and libraries are connected? I want to see how each one is used. If that's not possible, no worries.

Yup, I will create a doc for this for engineers.

@koji koji merged commit e423319 into edge Apr 10, 2024
13 checks passed
@koji koji deleted the feat_add-opentrons-ai branch April 10, 2024 16:43
Carlos-fernandez pushed a commit that referenced this pull request May 20, 2024
…rons-ai (#14788)

* feat(opentrons-ai-client, opentrons-ai-server): add folders for opentrons-ai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants