Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
swf2userSessions
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
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
sepia-pub
mael
swf2userSessions
Commits
c105de73
Commit
c105de73
authored
2 years ago
by
Maël Madon
Browse files
Options
Downloads
Patches
Plain Diff
dev: change output name to 'userN.SABjson' instead of 'N.SABjson'
parent
0b7bf3c9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
swf2userSessions.py
+1
-1
1 addition, 1 deletion
swf2userSessions.py
test/test_expected_outputs.py
+1
-1
1 addition, 1 deletion
test/test_expected_outputs.py
with
2 additions
and
2 deletions
swf2userSessions.py
+
1
−
1
View file @
c105de73
...
@@ -52,7 +52,7 @@ def swf2sessions(input_swf, output_dir, delim_approach, delim_threshold,
...
@@ -52,7 +52,7 @@ def swf2sessions(input_swf, output_dir, delim_approach, delim_threshold,
# SWF finished, output for each user
# SWF finished, output for each user
for
user_id
,
user
in
users
.
items
():
for
user_id
,
user
in
users
.
items
():
with
open
(
f
"
{
output_dir
}
/
{
user_id
}
.SABjson
"
,
"
w
"
)
as
file
:
with
open
(
f
"
{
output_dir
}
/
user
{
user_id
}
.SABjson
"
,
"
w
"
)
as
file
:
json
.
dump
(
user
.
to_dict
(),
file
)
json
.
dump
(
user
.
to_dict
(),
file
)
if
build_graph_rep
:
if
build_graph_rep
:
...
...
This diff is collapsed.
Click to expand it.
test/test_expected_outputs.py
+
1
−
1
View file @
c105de73
...
@@ -9,7 +9,7 @@ def load_expected_output(file_name):
...
@@ -9,7 +9,7 @@ def load_expected_output(file_name):
return
json
.
load
(
fd
)
return
json
.
load
(
fd
)
def
load_output
(
file_name
):
def
load_output
(
file_name
):
with
open
(
os
.
path
.
abspath
(
f
"
test-out/
{
file_name
}
/1.SABjson
"
),
"
r
"
)
as
fd
:
with
open
(
os
.
path
.
abspath
(
f
"
test-out/
{
file_name
}
/
user
1.SABjson
"
),
"
r
"
)
as
fd
:
return
json
.
load
(
fd
)
return
json
.
load
(
fd
)
def
compare_with_expected_output
(
test_name
):
def
compare_with_expected_output
(
test_name
):
...
...
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