-
Notifications
You must be signed in to change notification settings - Fork 42
ST6RI-682 Implement loading of models from repository #616
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
- added command to list repository contents - added command to download and index repository project - refactored code
- Introduces a new SysMLv2 menu for all contributions - Renames repository upload feature - Command framework should check for the existence of repository descriptor for showing the command
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.
- Instead of
%publications
and%download
use%projects
and%load
. - The
%load
command (and utility) should have an option to use the project ID instead of the name.
- changed %publications to %projects - changed %download to %load - added optional arguments to %load --id=<ID> --name=<NAME> - changed SysMLRepositoryLoad util arguments -n, -name to reference project by name -id to reference project by id
@seidewitz as for the utility project name is now passed with |
- added ability to add any element as root element to the APIModel
The PR description contains the following:
I don't really understand this note. Could you please removed the crossed-out line and clarify the remaining note? |
When I try to pull a model from the API in Eclipse using the following settings:
I get the following exception:
|
Hi @seidewitz
I couldn't reproduce this issue. I do get some erros sometimes when the library is not properly built but this time around I cound't break it enough to get an error like this. Https doens't work right now but I can reach the repo through http. |
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.
- Also corrected the incrementing of "counter" in the %projects and %load commands.
- The "next" method should only be used to create a resource for a model entered in a Jupyter notebook cell.
Oops, I knew that the Intercax repo deployment didn't work with https. The pull from repository works when I change the URL to http. |
I also updated |
ST6RI-178 Implement versioned publishing
- org.omg.kerml.xmi -> org.omg.kerml.xtext.xmi - org.omg.sysml.xmi -> org.omg.sysml.xtext.xmi - org.omg.sysml.xtext.ui.utilities -> org.omg.sysml.xtext.ui.util
I've moved the .gitignores to the new packages (of course I mistyped the issue number...) and updated the package exports in the manifest |
It turns out that I actually had already added the new package exports to the manifests, but I had somehow forgotten to delete the old packages that were replaced. While I don't think having redundant exports causes any real problems, I just removed the redundancies for clarity. |
This PR adds basic model download capability using the standard API.
Overview
The model download functionality can be used
magic
commandsIn Jupyter, the downloaded models are stored in memory and can be used throughout the work session. The Eclipse and command-line versions serialize the model into separate XMI files (
.sysmlx
). In the Eclipse IDE.kermlx
and.sysmlx
files are now added to the Xtext index so their content can be referenced using the textual syntax.Common
.kermlx
parsing and indexing:org.omg.kerml.xtext.xmi
,org.omg.kerml.xtext.ui.xmi
.sysmlx
parsing and indexing:org.omg.sysml.xtext.xmi
,org.omg.sysml.xtext.ui.xmi
org.omg.sysml.util.repository.ProjectRepository
: repository access, downloadorg.omg.sysml.xtext.ui.util.RepositoryContentFetcher
: JSON to EMF transformation, XMI serialization (.sysmlx
)Jupyter
New magic commands:
Eclipse
SysMLv2
menu to the popup menu for projects, with the following options:Generate Library Index
: moved underSysMLv2
menu.Pull model from API
: download models from a repository and saves in.sysmlx
.settings/org.omg.sysml.remote.properties
exists with the following contents:remote.branchId
is optional; if not provided, the default branch is used)NOTE:
A specific tester was implemented to hide the "Pull model from API" action from projects that don't have the required properties file (
org.omg.sysml.remote.properties
). However, thesysml.ui plugin
must be activated for this tester to take effect. The plugin activation happens the first time the sysml editor is opened.Command Line Application
org.omg.sysml.xtext.util.SysMLRepositoryLoadUtil
-p, --project
: name of the project in the repository-l, --library
: location of the standard library-t, --target
: target location for saved resources-b, --base
(optional): base URL of the repository, default:http://localhost:9000