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
8ce6b1ea
Commit
8ce6b1ea
authored
2 years ago
by
Alexander Schlemmer
Browse files
Options
Downloads
Patches
Plain Diff
REVIEW: Added deprecated function initialize_converters
parent
ecbc8995
No related branches found
No related tags found
2 merge requests
!108
Release 0.5.0
,
!104
Create a new scanner module and move functions from crawl module there
Pipeline
#34883
passed with warnings
2 years ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+2
-2
2 additions, 2 deletions
CHANGELOG.md
src/caoscrawler/crawl.py
+10
-2
10 additions, 2 deletions
src/caoscrawler/crawl.py
with
12 additions
and
4 deletions
CHANGELOG.md
+
2
−
2
View file @
8ce6b1ea
...
...
@@ -33,8 +33,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-
The
``prefix``
argument of
`crawler_main`
is deprecated. Use the new argument
``remove_prefix``
instead.
-
The functions
``load_definition``
and
``load_converters``
are deprecated. Please use
the functions
``load_definition``
and
``create_converter_registry``
from the scanner module
-
The functions
``load_definition``
,
``initialize_converters``
and
``load_converters``
are deprecated. Please use
the functions
``load_definition``
,
``initialize_converters``
and
``create_converter_registry``
from the scanner module
instead.
### Removed ###
...
...
This diff is collapsed.
Click to expand it.
src/caoscrawler/crawl.py
+
10
−
2
View file @
8ce6b1ea
...
...
@@ -67,7 +67,10 @@ from .stores import GeneralStore, RecordStore
from
.structure_elements
import
StructureElement
,
Directory
,
NoneElement
from
.version
import
check_cfood_version
from
.scanner
import
scan_directory
,
load_definition
,
create_converter_registry
from
.scanner
import
(
scan_directory
,
load_definition
,
create_converter_registry
,
initialize_converters
)
from
.debug_tree
import
DebugTree
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -229,9 +232,14 @@ class Crawler(object):
def
load_definition
(
self
,
crawler_definition_path
:
str
):
warnings
.
warn
(
DeprecationWarning
(
"
The function load_definition in the crawl module is deprecated.
"
"
Please use
the
load_definition from the scanner module.
"
))
"
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.
"
"
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
()
...
...
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