Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compendium-v2
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
geant-swd
compendium-v2
Commits
6618120e
Commit
6618120e
authored
2 years ago
by
Bjarke Madsen
Browse files
Options
Downloads
Patches
Plain Diff
fix some comments
parent
8012b9f0
No related branches found
No related tags found
1 merge request
!6
Feature/comp 125 staffing graph
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
compendium_v2/routes/default.py
+2
-1
2 additions, 1 deletion
compendium_v2/routes/default.py
test/conftest.py
+3
-4
3 additions, 4 deletions
test/conftest.py
with
5 additions
and
5 deletions
compendium_v2/routes/default.py
+
2
−
1
View file @
6618120e
...
@@ -41,10 +41,11 @@ VERSION_SCHEMA = {
...
@@ -41,10 +41,11 @@ VERSION_SCHEMA = {
def
after_request
(
resp
):
def
after_request
(
resp
):
return
common
.
after_request
(
resp
)
return
common
.
after_request
(
resp
)
# https://flask.palletsprojects.com/en/2.0.x/patterns/singlepageapplications/
@routes.route
(
'
/
'
,
defaults
=
{
'
path
'
:
''
},
methods
=
[
'
GET
'
])
@routes.route
(
'
/
'
,
defaults
=
{
'
path
'
:
''
},
methods
=
[
'
GET
'
])
@routes.route
(
'
/<path:path>
'
,
methods
=
[
'
GET
'
])
@routes.route
(
'
/<path:path>
'
,
methods
=
[
'
GET
'
])
def
index
(
path
):
def
index
(
path
):
# https://flask.palletsprojects.com/en/2.0.x/patterns/singlepageapplications/
return
render_template
(
'
index.html
'
)
return
render_template
(
'
index.html
'
)
...
...
This diff is collapsed.
Click to expand it.
test/conftest.py
+
3
−
4
View file @
6618120e
...
@@ -150,11 +150,10 @@ def test_funding_source_data():
...
@@ -150,11 +150,10 @@ def test_funding_source_data():
@pytest.fixture
@pytest.fixture
def
test_staff_data
():
def
test_staff_data
():
# generate generator of random data that ensures a given nren only shows up once a year
# generator of random test data for 5 years and 100 nrens
def
_generate_rows
():
def
_generate_rows
():
for
nren
in
[
"
nren
"
+
str
(
i
)
for
i
in
range
(
1
,
100
)]:
# 100 nrens
for
nren
in
[
"
nren
"
+
str
(
i
)
for
i
in
range
(
1
,
100
)]:
for
year
in
range
(
2016
,
2021
):
# 5 years
for
year
in
range
(
2016
,
2021
):
yield
{
yield
{
"
nren
"
:
nren
,
"
nren
"
:
nren
,
"
year
"
:
year
,
"
year
"
:
year
,
...
...
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