-
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
Conversation
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
doctrino
force-pushed
the
refactor-dump-method
branch
from
December 20, 2024 21:39
8e4a171
to
5695239
Compare
doctrino
force-pushed
the
refactor-dump-method
branch
from
December 21, 2024 14:33
e946591
to
c5d90f4
Compare
doctrino
force-pushed
the
refactor-dump-method
branch
from
December 21, 2024 14:44
bccb947
to
6274a74
Compare
doctrino
force-pushed
the
refactor-dump-method
branch
from
December 21, 2024 21:37
f5829dc
to
2cce96a
Compare
doctrino
commented
Dec 21, 2024
@@ -25,6 +25,7 @@ Changes are grouped as follows: | |||
### Fixed | |||
|
|||
- No more warning about missing `.env` file when running in `Google Cloud Build`. | |||
- When deploying a `Sequence` resource, Cognite Toolkit now replaces `dataSetExternalId` with `dataSetId`. |
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.
doctrino
commented
Dec 21, 2024
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Another bug introduced in last refactoring.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Changes the
ResourceLoaders
Removed the following method
Changed the signature of the following three methods
To this:
Notice that this signature has fewer arguments than the original. It simplifies the implementations, in addition, by returning the
list[dict[str, Any]]
in theload_resource_file
the methods are more flexible which means that they can be used in thecdf modules pull
command.Finally, realizes that loading from file, and figuring out what to create, update, and remain unchange, had to be done in one step, as now we dump the CDF resources into the same format as the local file.
Introduced a
ResourceWorker
to do this. note I am not happy with the name, I think it should ideally be changed toResourceLoader
and rename theResourceLoaders
to something likeStandardizedResource
as this does a lot more than just loading individual files, dumping, CRUD, iteration, authorization as well.Checklist
_version.py and
pyproject.toml per semantic versioning.