-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description Please describe the change you have made. ## Checklist - [ ] Tests added/updated. - [ ] Run Demo Job Locally. - [ ] Documentation updated. - [ ] Changelogs updated in [CHANGELOG.cdf-tk.md](https://github.com/cognitedata/cdf-project-templates/blob/main/CHANGELOG.cdf-tk.md). - [ ] Template changelogs updated in [CHANGELOG.templates.md](https://github.com/cognitedata/cdf-project-templates/blob/main/CHANGELOG.templates.md). - [ ] Version bumped. [_version.py](https://github.com/cognitedata/cdf-project-templates/blob/main/cognite/cognite_toolkit/_version.py) and [pyproject.toml](https://github.com/cognitedata/cdf-project-templates/blob/main/pyproject.toml) per [semantic versioning](https://semver.org/).
- Loading branch information
Showing
108 changed files
with
1,476 additions
and
507 deletions.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,12 @@ | |
from pathlib import Path | ||
from typing import Annotated, Optional, Union, cast | ||
|
||
import sentry_sdk | ||
import typer | ||
from cognite.client.data_classes.data_modeling import DataModelId, NodeId | ||
from dotenv import load_dotenv | ||
from rich import print | ||
from rich.panel import Panel | ||
|
||
from cognite_toolkit import _version | ||
from cognite_toolkit._cdf_tk import bootstrap | ||
from cognite_toolkit._cdf_tk.constants import _RUNNING_IN_BROWSER | ||
from cognite_toolkit._cdf_tk.describe import describe_datamodel | ||
|
@@ -49,8 +47,11 @@ | |
from cognite_toolkit._version import __version__ as current_version | ||
|
||
if "pytest" not in sys.modules and os.environ.get("SENTRY_ENABLED", "true").lower() == "true": | ||
import sentry_sdk | ||
|
||
sentry_sdk.init( | ||
dsn="https://[email protected]/4506429021093888", | ||
release=current_version, | ||
# Set traces_sample_rate to 1.0 to capture 100% | ||
# of transactions for performance monitoring. | ||
traces_sample_rate=1.0, | ||
|
@@ -111,7 +112,7 @@ class Common: | |
|
||
def _version_callback(value: bool) -> None: | ||
if value: | ||
typer.echo(f"CDF-Toolkit version: {_version.__version__}.") | ||
typer.echo(f"CDF-Toolkit version: {current_version}.") | ||
raise typer.Exit() | ||
|
||
|
||
|
@@ -233,12 +234,10 @@ def build( | |
help="Build environment to build for", | ||
), | ||
] = "dev", | ||
clean: Annotated[ | ||
no_clean: Annotated[ | ||
bool, | ||
typer.Option( | ||
"--clean", | ||
"-c", | ||
help="Delete the build directory before building the configurations", | ||
"--no-clean", "-c", help="Whether not to delete the build directory before building the configurations" | ||
), | ||
] = False, | ||
) -> None: | ||
|
@@ -247,9 +246,7 @@ def build( | |
if not source_path.is_dir(): | ||
print(f" [bold red]ERROR:[/] {source_path} does not exist") | ||
exit(1) | ||
cognite_modules_path = source_path / COGNITE_MODULES | ||
|
||
system_config = SystemYAML.load_from_directory(cognite_modules_path, build_env) | ||
system_config = SystemYAML.load_from_directory(source_path, build_env) | ||
config = BuildConfigYAML.load_from_directory(source_path, build_env) | ||
print( | ||
Panel( | ||
|
@@ -264,7 +261,7 @@ def build( | |
source_dir=source_path, | ||
config=config, | ||
system_config=system_config, | ||
clean=clean, | ||
clean=not no_clean, | ||
verbose=ctx.obj.verbose, | ||
) | ||
|
||
|
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.