-
Notifications
You must be signed in to change notification settings - Fork 42
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
Conversation
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.
%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
Hi @seidewitz, 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. |
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 |
I see. I changed it to the one you wrote. |
|
This probably has more to do with ST6RI-682 than ST6RI-836, but I didn't notice it until I changed repositories. After doing Other projects seem to load OK. The name of this particular project is not consistent with the old format for publishing from Jupyter, so I suspect it was added by someone using the API directly and may be ill-formed in some way. However, if that is the case, it would be better if we generated some sort of error message, rather than an exception, if possible |
- when trying to query a project by id instead of throwing an exception getProjectById return null. This matches with the logic used in by getProjectByName
When a branch has no head commit the logic creates and returns a local (no remote state) revision. The future head commit of the branch. Once this commit is published (delta between empty remote state and local state) it becomes 'remote'. In this case a project is empty (no commits) but I added a check to prevent this from happening and show the following error for empty branches: I've made another cosmetic change. When Additionally, it might be a good idea to move the printing of repository URL to an earlier stage in |
- Also added %repo to SysMLInteractive main program, and properly updated counter.
Done. |
|
Note: PR description has been updated per help text changes made in PR #649. |
Previously, the REST API base path could be set in the Jupyter kernel only as part of the deployment process: either during the kernel installation by using
--api-base-pathor by using an environmental variable.This PR adds a new
%repocommand that allows users to change the API base path in the running kernel. The usage of this command is: