Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
ng6
Commits
a9ccaa62
Commit
a9ccaa62
authored
Apr 30, 2019
by
Celine Noirot
Committed by
Romain Therville
Jul 26, 2019
Browse files
add control of space name.
parent
e57a3ef7
Changes
2
Hide whitespace changes
Inline
Side-by-side
workflows/addproject/__init__.py
View file @
a9ccaa62
...
...
@@ -30,7 +30,7 @@ class AddProject (Workflow):
self
.
add_parameter
(
"admin_login"
,
"The login of a ng6 administrator"
,
required
=
True
,
type
=
ng6adminlogin
)
self
.
add_parameter
(
"project_name"
,
"Give a name to your project (has to be unique)"
,
flag
=
"--name"
,
required
=
True
,
type
=
uniqproject
)
self
.
add_parameter
(
"project_description"
,
"Give a description to your project"
,
flag
=
"--description"
,
required
=
True
)
self
.
add_parameter
(
"space"
,
"Where to store data"
,
flag
=
"--space"
,
default
=
"default"
)
self
.
add_parameter
(
"space"
,
"Where to store data"
,
flag
=
"--space"
,
default
=
"default"
,
type
=
"ng6space"
)
def
process
(
self
):
project
=
Project
(
self
.
project_name
,
self
.
project_description
,
self
.
admin_login
,
None
,
self
.
space
)
...
...
workflows/types.py
View file @
a9ccaa62
...
...
@@ -91,6 +91,13 @@ def existingprojectid(id):
except
:
raise
argparse
.
ArgumentTypeError
(
"The project id '%s' does not exists"
%
id
)
def
ng6space
(
val
):
try
:
ng6conf
=
NG6ConfigReader
()
ng6conf
.
get_space_directory
(
val
)
except
:
raise
argparse
.
ArgumentTypeError
(
"The space name '%s' is not define in application.properties"
%
val
)
def
existingrun
(
id
):
try
:
t3mysql
=
t3MySQLdb
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment