Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osc-plugins
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
Releases
Container registry
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpcdf
obs
osc-plugins
Commits
5f1bda7a
Commit
5f1bda7a
authored
7 years ago
by
Lorenz Huedepohl
Browse files
Options
Downloads
Patches
Plain Diff
Rename mpcdf_setup_repos to mpcdf_setup_repositories
An alias is in place to also provide the old name
parent
6584c0eb
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
mpcdf_common.py
+4
-7
4 additions, 7 deletions
mpcdf_common.py
mpcdf_setup_repositories.py
+4
-3
4 additions, 3 deletions
mpcdf_setup_repositories.py
with
8 additions
and
10 deletions
mpcdf_common.py
+
4
−
7
View file @
5f1bda7a
from
__future__
import
print_function
__all__
=
[
"
valid_mpi
"
,
"
valid_cuda
"
,
"
project_meta
"
,
"
get_attribute
"
,
"
get_attribute_values
"
,
"
set_attribute
"
,
"
mpcdf_enable_repositories
"
,
"
mpcdf_setup_repos
"
]
__all__
=
[
"
valid_mpi
"
,
"
valid_cuda
"
,
"
project_meta
"
,
"
get_attribute
"
,
"
get_attribute_values
"
,
"
set_attribute
"
,
"
mpcdf_enable_repositories
"
,
"
mpcdf_setup_repos
itories
"
]
import
osc
import
osc.conf
...
...
@@ -147,14 +147,11 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False):
return
True
def
mpcdf_setup_repos
(
api_url
,
project
,
distribution
=
None
,
parent
=
None
,
packages
=
None
,
dry_run
=
False
):
def
mpcdf_setup_repos
itories
(
api_url
,
project
,
distribution
=
None
,
parent
=
None
,
packages
=
None
,
dry_run
=
False
):
if
parent
:
for
attribute
in
[
"
MPCDF:compiler_modules
"
,
"
MPCDF:mpi_modules
"
,
"
MPCDF:cuda_modules
"
]:
try
:
get_attribute_values
(
api_url
,
project
,
None
,
attribute
)
except
Exception
:
print
(
"
Copying attribute
'
{0}
'
from parent project
"
.
format
(
attribute
))
set_attribute
(
api_url
,
(
project
,),
get_attribute
(
api_url
,
parent
,
None
,
attribute
))
print
(
"
Copying attribute
'
{0}
'
from parent project
"
.
format
(
attribute
))
set_attribute
(
api_url
,
(
project
,),
get_attribute
(
api_url
,
parent
,
None
,
attribute
))
compilers
=
list
(
get_attribute_values
(
api_url
,
project
,
None
,
"
MPCDF:compiler_modules
"
))
mpis
=
list
(
get_attribute_values
(
api_url
,
project
,
None
,
"
MPCDF:mpi_modules
"
))
...
...
This diff is collapsed.
Click to expand it.
mpcdf_setup_repos.py
→
mpcdf_setup_repos
itories
.py
+
4
−
3
View file @
5f1bda7a
#!/usr/bin/python2
from
__future__
import
print_function
from
mpcdf_common
import
mpcdf_setup_repos
from
mpcdf_common
import
mpcdf_setup_repos
itories
import
os
import
osc
...
...
@@ -16,7 +16,8 @@ import osc.cmdln
help
=
"
Setup the repositories to be based on the upstream project PARENT (e.g. for home: projects)
"
)
@osc.cmdln.option
(
'
--distribution
'
,
help
=
"
Base distribution, necessary argument unless set previously for this project
"
)
def
do_mpcdf_setup_repos
(
self
,
subcmd
,
opts
,
*
args
):
@osc.cmdln.alias
(
"
mpcdf_setup_repos
"
)
def
do_mpcdf_setup_repositories
(
self
,
subcmd
,
opts
,
*
args
):
"""
${cmd_name}: Create all repository combinations for an MPCDF project
Given a list of compilers, MPI libraries, and possibly CUDA versions, this command
...
...
@@ -40,4 +41,4 @@ def do_mpcdf_setup_repos(self, subcmd, opts, *args):
else
:
raise
osc
.
oscerr
.
WrongArgs
(
"
Too many arguments
"
)
mpcdf_setup_repos
(
self
.
get_api_url
(),
project
,
opts
.
distribution
,
parent
=
opts
.
parent
,
dry_run
=
opts
.
dry_run
)
mpcdf_setup_repos
itories
(
self
.
get_api_url
(),
project
,
opts
.
distribution
,
parent
=
opts
.
parent
,
dry_run
=
opts
.
dry_run
)
This diff is collapsed.
Click to expand it.
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