Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
hive
hivemind
Commits
11fb0a60
Commit
11fb0a60
authored
4 years ago
by
Bartek Wrona
Browse files
Options
Downloads
Patches
Plain Diff
Fixed fatal bugs disallowing to load mock data from multiple files.
parent
46e91164
No related branches found
No related tags found
2 merge requests
!456
Release candidate v1 24
,
!380
Mock improvements
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hive/indexer/mock_block_provider.py
+0
-8
0 additions, 8 deletions
hive/indexer/mock_block_provider.py
hive/indexer/mock_data_provider.py
+2
-2
2 additions, 2 deletions
hive/indexer/mock_data_provider.py
hive/indexer/mock_vops_provider.py
+0
-9
0 additions, 9 deletions
hive/indexer/mock_vops_provider.py
with
2 additions
and
19 deletions
hive/indexer/mock_block_provider.py
+
0
−
8
View file @
11fb0a60
...
...
@@ -18,14 +18,6 @@ class MockBlockProvider(MockDataProvider):
cls
.
last_real_block_num
=
int
(
block_num
)
cls
.
last_real_block_time
=
dateutil
.
parser
.
isoparse
(
block_date
)
@classmethod
def
load_block_data
(
cls
,
data_path
):
cls
.
block_data
.
clear
()
cls
.
min_block
=
0
cls
.
max_block
=
0
super
().
load_block_data
(
data_path
)
@classmethod
def
add_block_data_from_file
(
cls
,
file_name
):
from
json
import
load
...
...
This diff is collapsed.
Click to expand it.
hive/indexer/mock_data_provider.py
+
2
−
2
View file @
11fb0a60
...
...
@@ -33,8 +33,8 @@ class MockDataProvider():
@classmethod
def
load_block_data
(
cls
,
data_path
):
if
os
.
path
.
isdir
(
data_path
):
log
.
warning
(
"
Loading mock
virtual
ops data from directory: {}
"
.
format
(
data_path
))
log
.
warning
(
"
Loading mock ops data from directory: {}
"
.
format
(
data_path
))
cls
.
add_block_data_from_directory
(
data_path
)
else
:
log
.
warning
(
"
Loading mock
virtual
ops data from file: {}
"
.
format
(
data_path
))
log
.
warning
(
"
Loading mock ops data from file: {}
"
.
format
(
data_path
))
cls
.
add_block_data_from_file
(
data_path
)
This diff is collapsed.
Click to expand it.
hive/indexer/mock_vops_provider.py
+
0
−
9
View file @
11fb0a60
...
...
@@ -8,15 +8,6 @@ class MockVopsProvider(MockDataProvider):
'
ops_by_block
'
:
{}
}
@classmethod
def
load_block_data
(
cls
,
data_path
):
#clear old data and prepare container
cls
.
block_data
.
clear
()
cls
.
block_data
[
'
ops
'
]
=
{}
cls
.
block_data
[
'
ops_by_block
'
]
=
{}
super
().
load_block_data
(
data_path
)
@classmethod
def
add_block_data_from_file
(
cls
,
file_name
):
from
json
import
load
...
...
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