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

Passing variables with query params #3

Open
nsheff opened this issue Nov 5, 2021 · 8 comments
Open

Passing variables with query params #3

nsheff opened this issue Nov 5, 2021 · 8 comments
Labels
enhancement New feature or request priority high
Milestone

Comments

@nsheff
Copy link
Contributor

nsheff commented Nov 5, 2021

Wouldn't it be cool if you could pass variables through query params to adjust attributes in the PEP?

For example, say a PEP has a derived column that uses an environment variable like $DATA, because the files are stored in $DATA/subfolder/{sample_name}.fq, or something.

If when you hit the endpoint to get some file attribute, you could pass /endpoint?DATA=/my/local/path, then the server could return a path that was useful for your local environment.

@nsheff nsheff added the enhancement New feature or request label May 3, 2022
@nsheff
Copy link
Contributor Author

nsheff commented May 3, 2022

This is (still) a good idea!

@nsheff
Copy link
Contributor Author

nsheff commented Jul 8, 2022

Hey @nleroy917 I think this is going to be an important thing to focus on now.

@nsheff
Copy link
Contributor Author

nsheff commented Jul 8, 2022

There are 3 types of path:

  • absolute: /path/to/data.xyz
  • relative: to/data.xyz
  • dynamic: $MYDATA/data.xyz

@nsheff
Copy link
Contributor Author

nsheff commented Jul 8, 2022

If derived attributes could access project attributes, and not just sample attributes as is currently the case... and if there was a way to modify project attributes on-the-fly....

then dynamic paths could provide a universal solution, I think.

@nsheff
Copy link
Contributor Author

nsheff commented Feb 16, 2023

@nleroy917 can you comment on the status of this issue?

@nleroy917
Copy link
Member

Nothing has been implemented... but this is just for fetching a project, correct? I.e. /projects/{namespace}/{project} it will "fill in" the env variables as the PEP is fetched?

@nsheff
Copy link
Contributor Author

nsheff commented Mar 2, 2023

Nothing has been implemented... but this is just for fetching a project, correct? I.e. /projects/{namespace}/{project} it will "fill in" the env variables as the PEP is fetched?

yes.

@nleroy917
Copy link
Member

nleroy917 commented Jun 13, 2023

A potential solution: https://stackoverflow.com/questions/2059482/temporarily-modify-the-current-processs-environment

It was discussed that we could only include this option for specific endpoints (like a POST to /api/v1/projects/{namespace}/{project} )

@nsheff nsheff modified the milestones: Version 0.6.x, v0.10.X Jul 18, 2023
@ayobi ayobi modified the milestones: v0.10.X, v0.11.x Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority high
Projects
None yet
Development

No branches or pull requests

4 participants