-
Notifications
You must be signed in to change notification settings - Fork 0
Upload transformation API Endpoint #26
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
Conversation
|
@codex can you review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| plasmid_uris = request.form.get("plasmid_uris") | ||
| chassis_uri = request.form.get("chassis_uri") | ||
| machine_name = request.form.get("machine") | ||
| protocol = request.form.get("protocol") | ||
| parameters = request.form.get("params") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Treat plasmid_uris as a list before transformation
Here plasmid_uris is pulled from request.form.get as a single string (line 208) and then passed to generate_transformation_metadata (line 218), which iterates for uri in plasmid_uris (utils.py line 63) expecting a list. With a normal form post such as plasmid_uris=https://example.com/plasmid1, the function will iterate over each character (h, t, …) and call sbh.pull with those, resulting in immediate pull failures and a 500 response for any valid request. Parse the field to a list (e.g., getlist/JSON) before invoking the helper so the endpoint can handle real plasmid URIs.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct the fact that it gets a string does not means that what it gets is a list. It actually gets a list which is stored in "plasmid_uris". So the function is Ok.
Gonza10V
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please test this on postman as well
| plasmid_uris = request.form.get("plasmid_uris") | ||
| chassis_uri = request.form.get("chassis_uri") | ||
| machine_name = request.form.get("machine") | ||
| protocol = request.form.get("protocol") | ||
| parameters = request.form.get("params") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct the fact that it gets a string does not means that what it gets is a list. It actually gets a list which is stored in "plasmid_uris". So the function is Ok.
No description provided.