-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CDF-23593] 😃 Refactor dump method #1313
Open
doctrino
wants to merge
43
commits into
refactor-tool-config
Choose a base branch
from
refactor-dump-method
base: refactor-tool-config
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
0423a5b
Ãrefactor: new signature
doctrino d5c349c
refactor: reorder and clean signature
doctrino d4fd4c0
refactor: new signature again
doctrino cd88c86
refactor: draft new deploy method
doctrino 1f774ec
refactor: draft of pull and clean
doctrino c42c7a5
refactor: introduced resource worker
doctrino 3ca09b6
refactor: cleanup
doctrino 98efae2
refactor: use worker in clean/deploy
doctrino ecae89f
refactor; updated load and dump for Resource Containers
doctrino 49e21e7
refactor; updating
doctrino 0fb18d6
refactor; two more
doctrino 025fc51
refactor: finished workflow loaders
doctrino 855c4a6
refactor: happier mypy
doctrino d22d04f
refactor: happier mypy
doctrino a8a5907
refactor: update signatures
doctrino b764b88
refactor: function and location filter
doctrino 7333be7
refactor: extraction pipelines
doctrino 965ab31
refactor; classic resources
doctrino f2c6a7a
refactor; finished transformation loaders
doctrino 987163d
refactor; only group loader left
doctrino a92f448
refactor: elegant solution to group
doctrino 44c0301
style: ruff happy
doctrino 9c3de17
style: happy mypy
doctrino 29fa12b
style: cleanup unsued ignore
doctrino 7e494b8
refactor: handle special gorup case
doctrino 30562c2
tests: update snapshot manually
doctrino 3de7daf
fix: bug in transformation load
doctrino fca8cdd
fix: introduced bug
doctrino 92210b3
tests: updated test data
doctrino b0252db
refactor: remove use of _is_equals
doctrino 678acb6
docs; one step closer
doctrino 07e43d5
refactor: simplify load resource
doctrino 50155bb
tests: updated loaders
doctrino 2873c44
tests: group and function loaders
doctrino 35f4d7d
tests: closer
doctrino be54c2c
refactor; base loaders left
doctrino 9590193
tests: updated base loaders
doctrino f92ad69
fix: tiny bug
doctrino 7106805
fix: import
doctrino f475670
tests: remove tests
doctrino 50df2bd
refactor: cleanup
doctrino ab071be
refactor: cleanup
doctrino 2cce96a
refactor: delete are equal
doctrino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,14 +16,15 @@ | |
from cognite.client.utils.useful_types import SequenceNotStr | ||
|
||
from cognite_toolkit._cdf_tk.client.api_client import ToolkitAPI | ||
from cognite_toolkit._cdf_tk.constants import DRY_RUN_ID | ||
from cognite_toolkit._cdf_tk.exceptions import ResourceRetrievalError | ||
|
||
if TYPE_CHECKING: | ||
from cognite_toolkit._cdf_tk.client._toolkit_client import ToolkitClient | ||
|
||
|
||
class LookUpAPI(ToolkitAPI, ABC): | ||
dry_run_id: int = -1 | ||
dry_run_id: int = DRY_RUN_ID | ||
|
||
def __init__(self, config: ClientConfig, api_version: str | None, cognite_client: "ToolkitClient") -> None: | ||
super().__init__(config, api_version, cognite_client) | ||
|
@@ -82,7 +83,7 @@ def external_id( | |
id: int | Sequence[int], | ||
) -> str | list[str]: | ||
ids = [id] if isinstance(id, int) else id | ||
missing = [id_ for id_ in ids if id not in self._reverse_cache] | ||
missing = [id_ for id_ in ids if id_ not in self._reverse_cache] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another bug introduced in last refactoring. |
||
if missing: | ||
try: | ||
lookup = self._external_id(missing) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found this bug in the refactoring.