Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CaosDB Crawler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
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
Code review analytics
Issue 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
caosdb
Software
CaosDB Crawler
Commits
221345d0
Commit
221345d0
authored
2 years ago
by
florian
Browse files
Options
Downloads
Patches
Plain Diff
STY: autopep8'd
parent
4c901109
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!108
Release 0.5.0
,
!104
Create a new scanner module and move functions from crawl module there
Pipeline
#34909
failed
2 years ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caoscrawler/crawl.py
+8
-12
8 additions, 12 deletions
src/caoscrawler/crawl.py
with
8 additions
and
12 deletions
src/caoscrawler/crawl.py
+
8
−
12
View file @
221345d0
...
...
@@ -223,45 +223,42 @@ class Crawler(object):
if
generalStore
is
not
None
:
warnings
.
warn
(
DeprecationWarning
(
"
The generalStore argument of the Crawler class is deprecated and has no effect.
"
))
def
load_converters
(
self
,
definition
:
dict
):
warnings
.
warn
(
DeprecationWarning
(
"
The function load_converters in the crawl module is deprecated.
"
"
The function load_converters in the crawl module is deprecated.
"
"
Please use create_converter_registry from the scanner module.
"
))
return
create_converter_registry
(
definition
)
def
load_definition
(
self
,
crawler_definition_path
:
str
):
warnings
.
warn
(
DeprecationWarning
(
"
The function load_definition in the crawl module is deprecated.
"
"
The function load_definition in the crawl module is deprecated.
"
"
Please use load_definition from the scanner module.
"
))
return
load_definition
(
crawler_definition_path
)
def
initialize_converters
(
self
,
crawler_definition
:
dict
,
converter_registry
:
dict
):
warnings
.
warn
(
DeprecationWarning
(
"
The function initialize_converters in the crawl module is deprecated.
"
"
The function initialize_converters in the crawl module is deprecated.
"
"
Please use initialize_converters from the scanner module.
"
))
return
initialize_converters
(
crawler_definition
,
converter_registry
)
def
generate_run_id
(
self
):
self
.
run_id
=
uuid
.
uuid1
()
def
start_crawling
(
self
,
items
:
Union
[
list
[
StructureElement
],
StructureElement
],
crawler_definition
:
dict
,
converter_registry
:
dict
,
restricted_path
:
Optional
[
list
[
str
]]
=
None
):
warnings
.
warn
(
DeprecationWarning
(
"
The function start_crawling in the crawl module is deprecated.
"
"
Please use scan_structure_elements from the scanner module.
"
))
"
The function start_crawling in the crawl module is deprecated.
"
"
Please use scan_structure_elements from the scanner module.
"
))
self
.
generate_run_id
()
return
scan_structure_elements
(
items
,
crawler_definition
,
converter_registry
,
restrict_path
)
def
crawl_directory
(
self
,
crawled_directory
:
str
,
crawler_definition_path
:
str
,
...
...
@@ -923,7 +920,6 @@ ____________________\n""".format(i + 1, len(pending_changes)) + str(el[3]))
Save the information contained in a debug_tree to a file named filename.
"""
paths
:
dict
[
str
,
Union
[
dict
,
list
]]
=
dict
()
def
flatten_debug_info
(
key
):
...
...
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