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: make analysis buttons open workflow landing pages (#137) #138

Merged
merged 12 commits into from
Oct 30, 2024

Conversation

hunterckx
Copy link
Collaborator

@hunterckx hunterckx commented Oct 21, 2024

  • No error handling for the API request
  • Only regulation is set up

@NoopDog NoopDog requested a review from frano-m October 21, 2024 05:56
Copy link
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

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

Pretty cool thank you!

import ky from "ky";

interface WorkflowLandingsBody {
request_state: { reference_genome: string };
Copy link
Member

Choose a reason for hiding this comment

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

This is going to vary across workflows, I suppose

Suggested change
request_state: { reference_genome: string };
request_state: { [key: string]: string }:

would be the right interface ?

app/utils/galaxy-api.ts Show resolved Hide resolved
},
});
const id = (await res.json()).uuid;
return WORKFLOW_LANDING_URL_PREFIX + encodeURIComponent(id);
Copy link
Member

@mvdbeek mvdbeek Oct 22, 2024

Choose a reason for hiding this comment

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

Suggested change
return WORKFLOW_LANDING_URL_PREFIX + encodeURIComponent(id);
return `${WORKFLOW_LANDING_URL_PREFIX}${id}?public=true;

UUIDs shouldn't need uri encoding, so I dropped that here, but of course no harm doing it anyway.

@hunterckx
Copy link
Collaborator Author

@mvdbeek Thanks for the feedback! I've:

  • Updated the types to make more room for alternative keys (though in a different way than suggested -- I wanted to make it explicit what the keys can be)
  • Added public: true to the API request body
  • Added ?public=true to the constructed landing page URL (but left the URL encoding in -- although it's not necessary in theory, I'm inclined to be cautious and default to encoding things when constructing URLs)

@NoopDog
Copy link
Collaborator

NoopDog commented Oct 25, 2024

@hunterckx, can you rebase this, please? Thanks!

@hunterckx hunterckx force-pushed the hunter/137-workflow-landings-from-analysis-pages branch from 7e12980 to 67729d6 Compare October 25, 2024 21:11
Copy link
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

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

We're expecting the full TRS url here, which is the TRS id and the version.

app/apis/catalog/brc-analytics-catalog/common/entities.ts Outdated Show resolved Hide resolved
app/apis/catalog/brc-analytics-catalog/common/entities.ts Outdated Show resolved Hide resolved
Co-authored-by: Marius van den Beek <[email protected]>
@mvdbeek
Copy link
Member

mvdbeek commented Oct 29, 2024

For right now this is working well. I have a few things to build on here, could we get this merged ?

@dannon dannon merged commit 0948759 into main Oct 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants