-
Notifications
You must be signed in to change notification settings - Fork 34
ST6RI-178 Implement versioned publishing #633
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
@seidewitz Is lexicographic ordering good enough (Project11 coming before Project2) or should I use alphanumeric ordering? I couldn't find a good lib for alphanumeric sorting so probably I'd have to implement one. |
Lexicographic ordering is fine. |
The command
results in an exception:
This is true whether or not |
If a name and ID are both given in a
For consistency, this message should begin with " |
Currenlty the load command is set up in a way that referencing a project by UUID also requires the branch to be referenced by UUID. The question is do we want to refeference branches by UUID? If the answer is yes, we probably should add |
I don't think this is intuitive. It certainly wasn't what I expected as a user. And it is not documented in the help
I hadn't really considered using UUIDs to identify branches. But I supposed it is consistent to have that option, too. It does need to be a separate option, though. Note that this will also require an update to the help text. But perhaps we should wait and to that on ST6RI-823 (PR #649), so we don't impact the work of @ujhelyiz on that. |
@seidewitz
By not having it as a separate option you mean testing for UUID and going with name if it's not a valid UUID?
I agree. We should revisit the help text after @ujhelyiz's update is in. |
Previously loading required using UUID or name to reference projects and their branches but there were no interface that allowed mixing the two e.g reference the project by UUID and the branch by name. This rework makes load parameterization more flexible to allow more cases to be covered.
@seidewitz Allowing UUID for branches by either method can be easly done on top of this. |
I've addressed this too. |
What I meant previously was that Also, the use of name/ID for branch should be independent of the choice of name/ID for project. |
- Also corrected the incrementing of "counter" in the %projects and %load commands.
I updated |
When a project is loaded, the If this is run in the Eclipse environment, there is a more useful exception trace:
|
- The "next" method should only be used to create a resource for a model entered in a Jupyter notebook cell.
The use of
The To fix this, I have replaced the lines
with
|
The command
|
@seidewitz
The problem here is that when you publish a namespace from Jupyter the root These lines of code, that you've since adjusted, meant to account for this:
This should wrap non-namepsace roots in a This is only done in the Jupyter %load command. However Eclipse and the CLI utility should also wrap project roots under a rootnamespace. Alternatively, we could modify the %publish command, so that it uploads the whole ownership hierarchy leading to the selected |
@TheKorpos |
Yes. I made the |
This PR adds basic versioned publishing capabilities to Jupyter using the standard API.
Summary
Previously, the
%publish
command in Jupyter always created a new project on the API server, posting all elements of a model in the one and only commit on the "main" branch. The changes in this PR allow users to post incremental changes based to a specified project based on the delta between the remotely stored models and their local models. While currently this usually means that the new commit completely replaces the content of the model – since re-parsing a model in Jupyter creates entirely new element UUIDs – it is at least possible to publish multiple versions of a model in multiple commits to a single project in the repository.Core Changes
org.omg.sysml.util.repository
org.omg.sysml.util.repository
)ProjectRepository
: represents a standard API serverRemoteProject
: represents a project that exists on the standard API serverRemoteBranch
: represents a branch that exists in a projectRevision
: represents a commit on a specific branch; can be local only (e.g., future initial commit)APIModel
: REST API-compatible representation of the modelAPIModelDelta
: differences between twoAPIModels
EMFModelRefresher
: creates anEMFModelDelta
from an EMF model and from an APIModelEMFModelDelta
: can be used to refresh the EMF model.org.omg.sysml.util.traversal.facade.impl
APIModels
from EMF modelsJsonElementProcessingFacade
: updated so it can be configured to produce either anAPIModel
or anAPIModelDelta
(all additions)ApiElementProcessingFacade
: updated to use new Java APIsJupyter
Updated magic command: