Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
3771788f
Commit
3771788f
authored
Mar 21, 2019
by
Guilhem Saurel
Browse files
yapf
parent
8d6bcaa4
Pipeline
#3783
failed with stage
in 44 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
3771788f
...
...
@@ -8,8 +8,8 @@ variables:
format
:
image
:
eur0c.laas.fr:5000/gepetto/buildfarm/format
script
:
-
isort -c
-
flake8 .
-
yapf -dr .
build
:
image
:
docker
...
...
.yapfignore
0 → 100644
View file @
3771788f
*/migrations
dashboard/settings.py
View file @
3771788f
...
...
@@ -149,9 +149,7 @@ LOGGING = {
}
REST_FRAMEWORK
=
{
'DEFAULT_FILTER_BACKENDS'
:
(
'django_filters.rest_framework.DjangoFilterBackend'
,
),
'DEFAULT_FILTER_BACKENDS'
:
(
'django_filters.rest_framework.DjangoFilterBackend'
,
),
}
DJANGO_TABLES2_TEMPLATE
=
'rainboard/tables.html'
...
...
dashboard/urls.py
View file @
3771788f
...
...
@@ -7,4 +7,5 @@ urlpatterns = [
url
(
r
'^admin/'
,
admin
.
site
.
urls
),
url
(
r
'^accounts/'
,
include
(
'django.contrib.auth.urls'
)),
url
(
r
''
,
include
(
'rainboard.urls'
)),
]
+
static
(
settings
.
MEDIA_URL
,
document_root
=
settings
.
MEDIA_ROOT
)
]
+
static
(
settings
.
MEDIA_URL
,
document_root
=
settings
.
MEDIA_ROOT
)
manage.py
View file @
3771788f
...
...
@@ -10,9 +10,7 @@ if __name__ == "__main__":
try
:
from
django.core.management
import
execute_from_command_line
except
ImportError
as
exc
:
raise
ImportError
(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
)
from
exc
raise
ImportError
(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
)
from
exc
execute_from_command_line
(
sys
.
argv
)
rainboard/management/commands/populate.py
View file @
3771788f
import
logging
import
requests
from
django.core.management
import
call_command
from
django.core.management.base
import
BaseCommand
from
rainboard.models
import
Forge
,
License
,
Repo
LICENSES
=
'https://raw.githubusercontent.com/spdx/license-list-data/master/json/licenses.json'
...
...
@@ -16,8 +16,11 @@ class Command(BaseCommand):
def
handle
(
self
,
*
args
,
**
options
):
logger
.
info
(
f
'updating licenses'
)
for
data
in
requests
.
get
(
LICENSES
).
json
()[
'licenses'
]:
License
.
objects
.
get_or_create
(
spdx_id
=
data
[
'licenseId'
],
defaults
=
{
'name'
:
data
[
'name'
],
'url'
:
data
[
'detailsUrl'
]})
License
.
objects
.
get_or_create
(
spdx_id
=
data
[
'licenseId'
],
defaults
=
{
'name'
:
data
[
'name'
],
'url'
:
data
[
'detailsUrl'
]
})
logger
.
info
(
f
'updating forges'
)
for
forge
in
Forge
.
objects
.
order_by
(
'source'
):
...
...
rainboard/management/commands/update.py
View file @
3771788f
...
...
@@ -2,6 +2,7 @@ from django.conf import settings
from
django.core.management
import
call_command
from
django.core.management.base
import
BaseCommand
from
django.db.models
import
F
,
Q
from
rainboard.models
import
Branch
,
Forge
,
Project
,
Repo
,
Robotpkg
from
rainboard.utils
import
SOURCES
,
update_robotpkg
...
...
@@ -43,9 +44,9 @@ class Command(BaseCommand):
log
(
f
'
\n
Updating keep doc
\n
'
)
Branch
.
objects
.
filter
(
Q
(
name__endswith
=
'master'
)
|
Q
(
name__endswith
=
'devel'
),
repo__namespace
=
F
(
'project__main_namespace'
),
repo__forge__source
=
SOURCES
.
gitlab
).
update
(
keep_doc
=
True
)
Q
(
name__endswith
=
'master'
)
|
Q
(
name__endswith
=
'devel'
),
repo__namespace
=
F
(
'project__main_namespace'
),
repo__forge__source
=
SOURCES
.
gitlab
).
update
(
keep_doc
=
True
)
log
(
f
'
\n
Delet perso
\n
'
)
call_command
(
'delete_perso'
)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment