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
d1456413
Commit
d1456413
authored
1 year ago
by
Florian Spreckelsen
Browse files
Options
Downloads
Plain Diff
Merge branch 'f-id-path' into f-refactor-merge
parents
13114a96
b65db7cc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
4 merge requests
!160
STY: styling
,
!153
MAINT: refactor merge into new function
,
!152
MAINT: move checks that are not related to identifiables
,
!151
New class to track treated Records during sync
Pipeline
#47437
passed
1 year ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+14
-5
14 additions, 5 deletions
CHANGELOG.md
src/caoscrawler/crawl.py
+1
-1
1 addition, 1 deletion
src/caoscrawler/crawl.py
unittests/test_crawler.py
+0
-4
0 additions, 4 deletions
unittests/test_crawler.py
with
15 additions
and
10 deletions
CHANGELOG.md
+
14
−
5
View file @
d1456413
...
...
@@ -8,26 +8,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ##
### Added ###
*
'transform' sections can be added to a CFood to apply functions to values stored in variables.
*
`transform`
sections can be added to a CFood to apply functions to values stored in variables.
*
default transform functions: submatch, split and replace.
*
`*`
can now be used as a wildcard in the identifiables parameter file to denote
that any Record may reference the identified one.
*
`crawl.TreatedRecordLookUp`
class replacing the old (and slow)
`identified_cache`
module. The new class now handles all records identified by
id, path, or identifiable simultaneously. See API docs for more info on how to
add to and get from the new lookup class.
### Changed ###
-
If the
`parents`
key is used in a cfood at a lower level for a Record that
*
If the
`parents`
key is used in a cfood at a lower level for a Record that
already has a Parent (because it was explicitly given or the default Parent),
the old Parent(s) are now overwritten with the value belonging to the
`parents`
key.
-
If a registered identifiable states, that a reference by a Record with parent
*
If a registered identifiable states, that a reference by a Record with parent
RT1 is needed, then now also references from Records that have a child of RT1
as parent are accepted.
-
More aggressive caching.
*
More aggressive caching.
### Deprecated ###
-
`IdentifiableAdapter.get_file`
*
`IdentifiableAdapter.get_file`
### Removed ###
*
`identified_cache`
module which was replaced by the
`crawl.TreatedRecordLookUp`
class.
### Fixed ###
*
Empty Records can now be created (https://gitlab.com/caosdb/caosdb-crawler/-/issues/27)
...
...
This diff is collapsed.
Click to expand it.
src/caoscrawler/crawl.py
+
1
−
1
View file @
d1456413
...
...
@@ -243,7 +243,7 @@ class TreatedRecordLookUp():
In the case that the Record is not yet in the remote server, there cannot be a Python object
with an ID. Thus we might have one with a path and one with an identifiable. If that Record
does not yet exist, it is necessary that both Python objects have at least either the path or
the identifiable in common.
Currently, this has to be assured by the user.
the identifiable in common.
"""
def
__init__
(
self
):
...
...
This diff is collapsed.
Click to expand it.
unittests/test_crawler.py
+
0
−
4
View file @
d1456413
...
...
@@ -978,8 +978,6 @@ def test_treated_record_lookup():
assert
trlu
.
_id_look_up
[
exist
.
id
]
is
exist
# can be accessed via get_existing
assert
trlu
.
get_existing
(
db
.
Record
(
id
=
1
))
is
exist
# assert trlu.is_existing(db.Record(id=1)) # TODO remove?
# assert not trlu.is_missing(db.Record(id=1)) # TODO remove?
miss
=
db
.
Record
()
# exception when identifiable is missing
...
...
@@ -993,8 +991,6 @@ def test_treated_record_lookup():
assert
trlu
.
_identifiable_look_up
[
ident
.
get_representation
()]
is
miss
# can be accessed via get_missing
assert
trlu
.
get_missing
(
db
.
Record
(),
Identifiable
(
name
=
'
a
'
))
is
miss
# assert not trlu.is_existing(db.Record()) # TODO remove?
# assert trlu.is_missing(db.Record()) # TODO remove?
fi
=
db
.
File
(
path
=
'
a
'
,
id
=
2
)
trlu
.
add
(
fi
)
...
...
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