Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor 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
calibration
pycalibration
Commits
b8650a75
Commit
b8650a75
authored
2 years ago
by
Cyril Danilevski
Committed by
Karim Ahmed
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix fstring formatting
parent
4df50b51
No related branches found
No related tags found
1 merge request
!725
[webservice] Select partition based on beamtime dates
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test_webservice.py
+2
-2
2 additions, 2 deletions
tests/test_webservice.py
webservice/webservice.py
+3
-2
3 additions, 2 deletions
webservice/webservice.py
with
5 additions
and
4 deletions
tests/test_webservice.py
+
2
−
2
View file @
b8650a75
...
...
@@ -268,8 +268,8 @@ async def test_run_action(mode, cmd, retcode, expected, monkeypatch):
(
42
,
'
correct
'
,
'
A
'
,
[
INVALID_BEAMTIME
],
'
exfel
'
),
# active but not in beamtime
(
42
,
'
correct
'
,
'
A
'
,
[
VALID_BEAMTIME
],
'
upex-middle
'
),
# active
(
'
42
'
,
'
dark
'
,
'
R
'
,
[
VALID_BEAMTIME
,
{}],
'
upex-high
'
),
# active
(
42
,
'
correct
'
,
'
A
'
,
[],
'
exfel
'
),
# active, no beatime?
(
42
,
'
correct
'
,
'
A
'
,
None
,
'
exfel
'
),
# active, no beatime?
(
42
,
'
correct
'
,
'
A
'
,
[],
'
exfel
'
),
# active, no bea
m
time?
(
42
,
'
correct
'
,
'
A
'
,
None
,
'
exfel
'
),
# active, no bea
m
time?
],
)
async
def
test_get_slurm_partition
(
...
...
This diff is collapsed.
Click to expand it.
webservice/webservice.py
+
3
−
2
View file @
b8650a75
...
...
@@ -606,11 +606,12 @@ async def get_slurm_partition(
partition
=
'
exfel
'
logging
.
debug
(
f
"
{
run_age
.
days
}
>
{
max_age_days
}
, set partition
"
"
to {partition}
"
f
"
to
{
partition
}
"
)
logging
.
debug
(
f
"
Using
{
partition
}
for
{
proposal_number
}
because
{
status_beamtime
}
and active now:
{
active_now
}
"
f
"
Using
{
partition
}
for
{
proposal_number
}
because
{
status_beamtime
}
"
f
"
and active now:
{
active_now
}
"
)
return
partition
...
...
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