Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CADET-RDM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IBG-1
ModSim
CADET
CADET-RDM
Commits
6038cf81
Commit
6038cf81
authored
1 year ago
by
Ronald Jäpel
Browse files
Options
Downloads
Patches
Plain Diff
fix incorrect repo types in cli_integration.py
parent
7857538e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+3
-3
3 additions, 3 deletions
README.md
cadetrdm/cli_integration.py
+7
-4
7 additions, 4 deletions
cadetrdm/cli_integration.py
with
10 additions
and
7 deletions
README.md
+
3
−
3
View file @
6038cf81
...
...
@@ -67,8 +67,8 @@ _results_ repo.
Once created, the remotes need to be added to the local repositories.
```
bash
cadet-rdm add-remote-to-repo
<path_to_repo>
git@<my_git_server.foo>:<project>
.git
cadet-rdm
add-remote-to-repo
<
path_to_repo
/
output
_folder>
git@<my_git_server.foo>:<project>
_output.git
cadet-rdm add-remote-to-repo git@
<my_git_server.foo>
:
<project>
.git
cadet-rdm
--
path_to_repo
output
add-remote-to-repo
git@
<my_git_server.foo>
:
<project>
_output.git
```
or in Python:
...
...
@@ -125,7 +125,7 @@ cadet-rdm run-command "python example_file.py" "commit message for the results"
```
###
#
Using results from another repository
### Using results from another repository
You can load in results from another repository to use in your project using the CLI:
...
...
This diff is collapsed.
Click to expand it.
cadetrdm/cli_integration.py
+
7
−
4
View file @
6038cf81
...
...
@@ -3,7 +3,7 @@ import subprocess
import
click
from
.repositories
import
ProjectRepo
from
.repositories
import
ProjectRepo
,
BaseRepo
from
.initialize_repo
import
initialize_repo
as
initialize_git_repo_implementation
,
init_lfs
from
.initialize_repo
import
initialize_from_remote
as
initialize_from_remote_implementation
from
.conda_env_utils
import
prepare_conda_env
as
prepare_conda_env_implementation
...
...
@@ -89,9 +89,11 @@ def initialize_repo(path_to_repo: str, output_repo_name: (str | bool) = "output"
@cli.command
()
@click.option
(
"
-p
"
,
'
--path_to_repo
'
,
default
=
"
.
"
,
help
=
'
Path to repository to which the remote is added. Default is cwd.
'
)
@click.argument
(
'
remote_url
'
)
def
add_remote_to_repo
(
remote_url
:
str
,
):
repo
=
ProjectRepo
(
"
.
"
)
def
add_remote_to_repo
(
remote_url
:
str
,
path_to_repo
=
"
.
"
):
repo
=
BaseRepo
(
path_to_repo
)
repo
.
add_remote
(
remote_url
)
print
(
"
Done.
"
)
...
...
@@ -100,7 +102,7 @@ def add_remote_to_repo(remote_url: str, ):
@click.argument
(
'
file_type
'
)
def
add_file_type_to_lfs
(
file_type
:
str
,
):
init_lfs
(
lfs_filetypes
=
[
file_type
],
path
=
"
.
"
)
repo
=
Project
Repo
(
"
.
"
)
repo
=
Base
Repo
(
"
.
"
)
repo
.
add_all_files
()
repo
.
commit
(
f
"
Add
{
file_type
}
to lfs
"
)
...
...
@@ -114,5 +116,6 @@ def prepare_conda_env(url):
@cli.command
()
def
print_output_log
():
# ToDo: test if Project or Output repo
repo
=
ProjectRepo
(
"
.
"
)
repo
.
print_output_log
()
This diff is collapsed.
Click to expand it.
Johannes Schmölder
@j.schmoelder
mentioned in issue
#16 (closed)
·
1 year ago
mentioned in issue
#16 (closed)
mentioned in issue #16
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment