Skip to content

ST6RI-836 Add option that allows changing the API basePath in a running Jupyter kernel #644

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

TheKorpos
Copy link
Contributor

In the current implentation of the Jupyter kernel the REST API base path is specified as part of the deployment process: either during the kernel installation by using --api-base-path or by using an environmental variable.

This PR adds the %api-base-path [<BASE PATH>] magic command that allows users to change the API base path in the running kernel.

@TheKorpos TheKorpos requested a review from seidewitz April 30, 2025 16:39
@seidewitz seidewitz changed the title ST6RI-836 Added option that allows changing the API basePath in a running Jupyter kernel ST6RI-836 Add option that allows changing the API basePath in a running Jupyter kernel Apr 30, 2025
@seidewitz seidewitz self-assigned this Apr 30, 2025
@seidewitz seidewitz added this to the 2025-04 milestone Apr 30, 2025
Copy link
Member

@seidewitz seidewitz left a comment

Choose a reason for hiding this comment

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

%api-base-path is an awkward name for a command. How about something like %repo instead. The help text should then say:

Usage: %repo [<BASE PATH>]

If <BASE PATH> is not given, print the current repository base path.
If <BASE PATH> is given, set the repository base path.

<BASE PATH> is a URL giving the API base path for the repository access by the %projects, %publish and %load commands. 
For example: https://my.domain.com/sysml_repo

- updated help string
- fixed '-h' flag
@TheKorpos
Copy link
Contributor Author

%api-base-path is an awkward name for a command. How about something like %repo instead. The help text should then say:

Usage: %repo [<BASE PATH>]

If <BASE PATH> is not given, print the current repository base path.
If <BASE PATH> is given, set the repository base path.

<BASE PATH> is a URL giving the API base path for the repository access by the %projects, %publish and %load commands. 
For example: https://my.domain.com/sysml_repo

Hi @seidewitz,
I've udpated the magic command name and help strings.

For the example URL I used the default value (http://sysml2-dev.intercax.com:9000), it's more consistent with the new help strings, and default values we used in ST6RI-178.

Also, I removed the part 'The api base path is:' from the output of this command so now it simply prints the current base path.

@seidewitz
Copy link
Member

For the example URL I used the default value (http://sysml2-dev.intercax.com:9000), it's more consistent with the new help strings, and default values we used in ST6RI-178.

I specifically do not want to put a real domain in the help text. The Intercax deployment will not be the default forever, and may even change in the near future. And the default should particularly not be the sysml2-dev server. This is for internal development use, and the URL is not supposed to be public.

@TheKorpos
Copy link
Contributor Author

I specifically do not want to put a real domain in the help text. The Intercax deployment will not be the default forever, and may even change in the near future. And the default should particularly not be the sysml2-dev server. This is for internal development use, and the URL is not supposed to be public.

I see. I changed it to the one you wrote.

@TheKorpos TheKorpos requested a review from seidewitz May 6, 2025 13:51
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.

2 participants