diff --git a/README.md b/README.md index 2eccac91c..0410467e6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,22 @@ + +
diff --git a/docs/reference/disabling-telemetry.md b/docs/reference/disabling-telemetry.md
index 38d5783d9..1ab75a9c7 100644
--- a/docs/reference/disabling-telemetry.md
+++ b/docs/reference/disabling-telemetry.md
@@ -1,3 +1,22 @@
+
+
# Telemetry
If you do not wish to participate in telemetry capture, one can opt-out with one of the following methods:
diff --git a/examples/feature_engineering/feature_engineering_multiple_contexts/scenario_1/fastapi_server.py b/examples/feature_engineering/feature_engineering_multiple_contexts/scenario_1/fastapi_server.py
index 7d518ceee..b9e6db44a 100644
--- a/examples/feature_engineering/feature_engineering_multiple_contexts/scenario_1/fastapi_server.py
+++ b/examples/feature_engineering/feature_engineering_multiple_contexts/scenario_1/fastapi_server.py
@@ -120,7 +120,7 @@ async def predict_model_version1(request: PredictRequest) -> dict:
:return: a dictionary with the prediction value.
"""
# one liner to quickly create some series from the request.
- input_series = pd.DataFrame([request.dict()]).to_dict(orient="series")
+ input_series = pd.DataFrame([request.model_dump()]).to_dict(orient="series")
# create the features -- point here is we're reusing the same code as in the training!
# with the ability to provide static values for things like `age_mean` and `age_std_dev`.
features = await dr.execute(
diff --git a/hamilton/function_modifiers/README b/hamilton/function_modifiers/README
index d826e29e9..ffb6031c1 100644
--- a/hamilton/function_modifiers/README
+++ b/hamilton/function_modifiers/README
@@ -1,3 +1,22 @@
+
+
# with_columns_base
Documenting the current design flow for the `with_columns` decorator.
diff --git a/hamilton/graph_types.py b/hamilton/graph_types.py
index 7c81b625f..ba95b7cab 100644
--- a/hamilton/graph_types.py
+++ b/hamilton/graph_types.py
@@ -70,7 +70,15 @@ def _remove_docs_and_comments(source: str) -> str:
if not isinstance(n.body[0], ast.Expr):
continue
- if not hasattr(n.body[0], "value") or not isinstance(n.body[0].value, ast.Str):
+ # In Python 3.8+, string literals (including docstrings) are ast.Constant nodes
+ # ast.Str is deprecated and will be removed in Python 3.14
+ if not hasattr(n.body[0], "value"):
+ continue
+
+ value = n.body[0].value
+ is_docstring = isinstance(value, ast.Constant) and isinstance(value.value, str)
+
+ if not is_docstring:
continue
# skip docstring
diff --git a/hamilton/plugins/README.md b/hamilton/plugins/README.md
index c6f4b821d..6dfa1821e 100644
--- a/hamilton/plugins/README.md
+++ b/hamilton/plugins/README.md
@@ -1,3 +1,22 @@
+
+
# Plugins
Apache Hamilton enables plugins -- the requirement is that the core library according to the plugin is installed, and the plugin will be registered automatically.
diff --git a/hamilton/plugins/polars_post_1_0_0_extensions.py b/hamilton/plugins/polars_post_1_0_0_extensions.py
index 57bf1dbae..056a87dce 100644
--- a/hamilton/plugins/polars_post_1_0_0_extensions.py
+++ b/hamilton/plugins/polars_post_1_0_0_extensions.py
@@ -54,6 +54,12 @@
if hasattr(polars.selectors, "_selector_proxy_"):
from polars.selectors import _selector_proxy_ # noqa
+ # Make Selector available for type hints
+ Selector = type(_selector_proxy_)
+else:
+ # Stub for older polars versions
+ Selector = Type
+
# for polars 0.18.0 we need to check what to do.
from polars._typing import CsvEncoding, SchemaDefinition
diff --git a/plugin_tests/README.md b/plugin_tests/README.md
index 00e4b53d0..8df56f659 100644
--- a/plugin_tests/README.md
+++ b/plugin_tests/README.md
@@ -1,3 +1,22 @@
+
+
# What are these tests?
These are "integration style" tests, that test the more heavy-weight plugin functionality Apache Hamilton has. E.g. with GraphAdapters. So find/place tests here that exercise `h_*.py` modules.
diff --git a/scripts/add_license_headers.py b/scripts/add_license_headers.py
index 259992c1b..c7b5d48ba 100755
--- a/scripts/add_license_headers.py
+++ b/scripts/add_license_headers.py
@@ -23,90 +23,62 @@
from pathlib import Path
from typing import List
-# TODO: Simplify this script if we add more file types. Since the license text
-# (including line breaks) stays the same, we really just need different comment
-# character insertion helpers based on file extension rather than duplicating
-# the full license text for each file type.
-
-# Apache 2 license header for Python files
-PYTHON_LICENSE_HEADER = """# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-"""
-
-# Apache 2 license header for Markdown files (using HTML comments)
-MARKDOWN_LICENSE_HEADER = """
-
-"""
-
-# Apache 2 license header text for Jupyter notebooks (as markdown cell content)
-NOTEBOOK_LICENSE_TEXT = """Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License."""
-
-# Apache 2 license header for SQL files (using -- comments)
-SQL_LICENSE_HEADER = """-- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership. The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing,
--- software distributed under the License is distributed on an
--- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
--- KIND, either express or implied. See the License for the
--- specific language governing permissions and limitations
--- under the License.
-
-"""
+# Base Apache 2 license text (without comment characters)
+# This is used by all formatters below to generate file-type-specific headers
+LICENSE_LINES = [
+ "Licensed to the Apache Software Foundation (ASF) under one",
+ "or more contributor license agreements. See the NOTICE file",
+ "distributed with this work for additional information",
+ "regarding copyright ownership. The ASF licenses this file",
+ "to you under the Apache License, Version 2.0 (the",
+ '"License"); you may not use this file except in compliance',
+ "with the License. You may obtain a copy of the License at",
+ "",
+ " http://www.apache.org/licenses/LICENSE-2.0",
+ "",
+ "Unless required by applicable law or agreed to in writing,",
+ "software distributed under the License is distributed on an",
+ '"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY',
+ "KIND, either express or implied. See the License for the",
+ "specific language governing permissions and limitations",
+ "under the License.",
+]
+
+
+def format_hash_comment(lines: List[str]) -> str:
+ """Format license as # comments (for Python, Shell, etc.)."""
+ return "\n".join(f"# {line}" if line else "#" for line in lines) + "\n\n"
+
+
+def format_dash_comment(lines: List[str]) -> str:
+ """Format license as -- comments (for SQL)."""
+ return "\n".join(f"-- {line}" if line else "--" for line in lines) + "\n\n"
+
+
+def format_c_style_comment(lines: List[str]) -> str:
+ """Format license as /* */ comments (for TypeScript, JavaScript, etc.)."""
+ formatted_lines = ["/*"]
+ for line in lines:
+ formatted_lines.append(f" * {line}" if line else " *")
+ formatted_lines.append(" */")
+ return "\n".join(formatted_lines) + "\n\n"
+
+
+def format_html_comment(lines: List[str]) -> str:
+ """Format license as HTML comments (for Markdown)."""
+ formatted_lines = ["")
+ return "\n".join(formatted_lines) + "\n\n"
+
+
+# Pre-generate common license headers
+PYTHON_LICENSE_HEADER = format_hash_comment(LICENSE_LINES)
+SQL_LICENSE_HEADER = format_dash_comment(LICENSE_LINES)
+TYPESCRIPT_LICENSE_HEADER = format_c_style_comment(LICENSE_LINES)
+MARKDOWN_LICENSE_HEADER = format_html_comment(LICENSE_LINES)
+# For notebooks, we need just the plain text
+NOTEBOOK_LICENSE_TEXT = "\n".join(LICENSE_LINES)
def add_license_to_python(content: str) -> str:
@@ -171,6 +143,11 @@ def add_license_to_sql(content: str) -> str:
return SQL_LICENSE_HEADER + content
+def add_license_to_typescript(content: str) -> str:
+ """Add Apache 2 license header to TypeScript/JavaScript file content."""
+ return TYPESCRIPT_LICENSE_HEADER + content
+
+
def add_license_header(file_path: Path, dry_run: bool = False) -> bool:
"""Add Apache 2 license header to a file.
@@ -209,7 +186,9 @@ def add_license_header(file_path: Path, dry_run: bool = False) -> bool:
new_content = add_license_to_shell(content)
elif file_path.suffix == ".sql":
new_content = add_license_to_sql(content)
- elif file_path.name == "Dockerfile":
+ elif file_path.suffix in {".ts", ".tsx", ".js", ".jsx"}:
+ new_content = add_license_to_typescript(content)
+ elif file_path.name == "Dockerfile" or file_path.name.startswith("Dockerfile."):
# Dockerfiles use # comments like shell scripts
new_content = add_license_to_shell(content)
elif file_path.name == "README":
@@ -269,7 +248,6 @@ def main():
files_to_update: List[Path] = []
with open(list_file, "r") as f:
for line in f:
- original_line = line
line = line.strip()
# Skip header lines and empty lines
if (
@@ -277,20 +255,15 @@ def main():
or line.startswith("Checking")
or line.startswith("Extensions")
or line.startswith("Found")
+ or line.startswith("Mode:")
+ or line.startswith("Excluded")
):
continue
- # Skip lines that look like section headers (not starting with space and not a file path)
- if (
- not original_line.startswith(" ")
- and not line.startswith("examples")
- and not line.startswith("hamilton")
- and "/" not in line
- ):
- continue
- # Remove leading spaces
+ # Try to parse as a file path - if it exists, add it
+ # This is more robust than trying to guess if it's a header line
file_path = line
full_path = repo_root / file_path
- if full_path.exists():
+ if full_path.exists() and full_path.is_file():
files_to_update.append(full_path)
if not files_to_update:
diff --git a/scripts/build_conda.sh b/scripts/build_conda.sh
index 40aeab2e8..2b7a58da8 100644
--- a/scripts/build_conda.sh
+++ b/scripts/build_conda.sh
@@ -1,4 +1,21 @@
#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
CONDA_HOME=$HOME/anaconda3
# This is a script to create and build hamilton for conda.
# Be sure you have conda activated and have logged into anaconda
diff --git a/scripts/check_license_headers.py b/scripts/check_license_headers.py
index fc67379e8..3fb0dd09e 100755
--- a/scripts/check_license_headers.py
+++ b/scripts/check_license_headers.py
@@ -20,31 +20,103 @@
import sys
from pathlib import Path
-from typing import List, Set
+from typing import List
# License header patterns to check for
-LICENSE_PATTERNS = [
+# ASF-specific header (our standard)
+ASF_LICENSE_PATTERNS = [
"Licensed to the Apache Software Foundation (ASF)",
"Apache License, Version 2.0",
]
-# File extensions to check
-PYTHON_EXTENSIONS = {".py"}
-MARKDOWN_EXTENSIONS = {".md"}
-NOTEBOOK_EXTENSIONS = {".ipynb"}
-SHELL_EXTENSIONS = {".sh"}
-SQL_EXTENSIONS = {".sql"}
-TYPESCRIPT_EXTENSIONS = {".ts", ".tsx"}
-JAVASCRIPT_EXTENSIONS = {".js", ".jsx"}
-ALL_EXTENSIONS = (
- PYTHON_EXTENSIONS
- | MARKDOWN_EXTENSIONS
- | NOTEBOOK_EXTENSIONS
- | SHELL_EXTENSIONS
- | SQL_EXTENSIONS
- | TYPESCRIPT_EXTENSIONS
- | JAVASCRIPT_EXTENSIONS
-)
+# Third-party Apache 2.0 headers (also acceptable)
+# Note: Some third-party headers may have spaces in the URL
+THIRD_PARTY_APACHE_PATTERNS = [
+ "Apache License, Version 2.0",
+ "www.apache.org/licenses/LICENSE-2.0",
+]
+
+# File extensions to EXCLUDE from checking (based on what exists in this repo)
+EXCLUDED_EXTENSIONS = {
+ # Python compiled/generated
+ ".pyc",
+ ".pyi", # Type stubs
+ ".pyx", # Cython
+ ".pxd", # Cython headers
+ ".pxi", # Cython includes
+ # Compiled binaries
+ ".so",
+ ".dylib",
+ ".jar",
+ # Images and media
+ ".png",
+ ".svg",
+ ".ttf",
+ ".afm", # Adobe font metrics
+ # Config/data files
+ ".json",
+ ".jsonl",
+ ".yaml",
+ ".yml",
+ ".toml",
+ ".cfg", # setup.cfg, etc.
+ ".conf", # nginx.conf, etc.
+ ".xml", # Test data, config files
+ ".csv",
+ ".fwf", # Fixed-width format test data
+ ".dot", # Graphviz DOT files
+ ".npy", # NumPy arrays
+ ".mat", # MATLAB data
+ ".sav", # SPSS data
+ ".po", # Gettext translations
+ ".mo", # Compiled translations
+ ".template", # Template config files
+ # Build/generated files
+ ".map", # Source maps
+ ".gz",
+ ".log",
+ ".typed", # PEP 561 marker
+ # Web assets (usually don't have license headers)
+ ".css",
+ ".scss",
+ ".html",
+ # JavaScript config files (these are code but often generated)
+ ".eslintrc",
+ ".nycrc",
+ ".npmignore",
+ ".editorconfig",
+ # Template files
+ ".j2",
+ ".jinja2",
+ # Documentation that doesn't need headers
+ ".txt",
+ ".rst",
+ # Other
+ ".gitkeep",
+ ".asc", # GPG keys
+ ".cmd", # Windows batch
+ ".coffee", # CoffeeScript (if any)
+ ".mjs", # ES modules (often generated)
+ ".cjs", # CommonJS modules (often generated)
+ ".mts", # TypeScript ES modules
+ ".flow", # Flow type definitions
+ ".in", # MANIFEST.in, etc.
+}
+
+# Specific filenames to exclude (exact matches)
+EXCLUDED_FILENAMES = {
+ # Lock files
+ "package-lock.json",
+ "yarn.lock",
+ "poetry.lock",
+ "uv.lock",
+ # License/legal files
+ "LICENSE",
+ "NOTICE",
+ "CHANGELOG",
+ # OS files
+ ".DS_Store",
+}
# Directories to skip
SKIP_DIRS = {
@@ -84,47 +156,69 @@ def should_skip_path(path: Path) -> bool:
def has_license_header(file_path: Path, num_lines: int = 20) -> bool:
- """Check if a file has the Apache 2 license header."""
+ """Check if a file has an Apache 2 license header (ASF or third-party)."""
try:
with open(file_path, "r", encoding="utf-8") as f:
content = "".join(f.readlines()[:num_lines])
- # Check if all license patterns are present in the first N lines
- return all(pattern in content for pattern in LICENSE_PATTERNS)
+ # Check if all ASF license patterns are present
+ has_asf_header = all(pattern in content for pattern in ASF_LICENSE_PATTERNS)
+
+ # Check if all third-party Apache 2.0 patterns are present
+ has_third_party_header = all(pattern in content for pattern in THIRD_PARTY_APACHE_PATTERNS)
+
+ # Accept either ASF or third-party Apache 2.0 headers
+ return has_asf_header or has_third_party_header
except (UnicodeDecodeError, PermissionError):
# Skip files that can't be read as text
return True # Assume they're fine to avoid false positives
-def find_files_without_license(
- root_dir: Path, extensions: Set[str] = ALL_EXTENSIONS, include_special: bool = True
-) -> List[Path]:
+def find_files_without_license(root_dir: Path) -> List[Path]:
"""Find all files without Apache 2 license headers.
+ Uses an exclusion-based approach: checks all files except those with
+ excluded extensions or filenames.
+
Args:
root_dir: Root directory to search
- extensions: Set of file extensions to check
- include_special: Whether to include special files like Dockerfile and README (no extension)
+
+ Returns:
+ Sorted list of file paths without license headers
"""
files_without_license = []
- # Special files to check (by exact name, not extension)
- SPECIAL_FILES = {"Dockerfile", "README"}
-
for file_path in root_dir.rglob("*"):
# Skip directories
if file_path.is_dir():
continue
- # Check if file matches by extension or by special name
- matches_extension = file_path.suffix in extensions
- matches_special = include_special and file_path.name in SPECIAL_FILES
+ # Skip if in excluded paths
+ if should_skip_path(file_path):
+ continue
- if not (matches_extension or matches_special):
+ # Skip if extension is in exclusion list
+ if file_path.suffix in EXCLUDED_EXTENSIONS:
continue
- # Skip if in excluded paths
- if should_skip_path(file_path):
+ # Skip if filename is in exclusion list
+ if file_path.name in EXCLUDED_FILENAMES:
+ continue
+
+ # Skip editor backup files (emacs, vim, etc.)
+ if (
+ file_path.name.startswith("#")
+ or file_path.name.endswith("~")
+ or file_path.name.endswith("#")
+ ):
+ continue
+
+ # Skip files without extensions that aren't special files
+ if (
+ not file_path.suffix
+ and not file_path.name.startswith("Dockerfile")
+ and file_path.name != "README"
+ ):
continue
# Check for license header
@@ -139,44 +233,13 @@ def main():
# Get repository root (parent of scripts directory)
repo_root = Path(__file__).parent.parent
- # Allow specifying extensions via command line
- if len(sys.argv) > 1:
- extension_arg = sys.argv[1]
- if extension_arg == "py":
- extensions = PYTHON_EXTENSIONS
- elif extension_arg == "md":
- extensions = MARKDOWN_EXTENSIONS
- elif extension_arg == "ipynb":
- extensions = NOTEBOOK_EXTENSIONS
- elif extension_arg == "sh":
- extensions = SHELL_EXTENSIONS
- elif extension_arg == "sql":
- extensions = SQL_EXTENSIONS
- elif extension_arg == "ts":
- extensions = TYPESCRIPT_EXTENSIONS
- elif extension_arg == "js":
- extensions = JAVASCRIPT_EXTENSIONS
- elif extension_arg == "special":
- # Check only Dockerfile and README files
- extensions = set()
- else:
- extensions = ALL_EXTENSIONS
- else:
- extensions = ALL_EXTENSIONS
-
- # Only include special files (Dockerfile, README) if checking all or "special" type
- include_special = len(sys.argv) <= 1 or (
- len(sys.argv) > 1 and sys.argv[1] in ["special", "all"]
- )
-
print(f"Checking for Apache 2 license headers in {repo_root}")
- if extensions:
- print(f"Extensions: {', '.join(sorted(extensions))}")
- if include_special:
- print("Including: Dockerfile, README files")
+ print("Mode: Checking all files except excluded types")
+ print(f"Excluded extensions: {len(EXCLUDED_EXTENSIONS)} types")
+ print(f"Excluded filenames: {len(EXCLUDED_FILENAMES)} patterns")
print()
- files_without_license = find_files_without_license(repo_root, extensions, include_special)
+ files_without_license = find_files_without_license(repo_root)
if not files_without_license:
print("✓ All files have license headers!")
diff --git a/tests/plugins/test_huggingface_extensions.py b/tests/plugins/test_huggingface_extensions.py
index 7b52446a1..a27f14287 100644
--- a/tests/plugins/test_huggingface_extensions.py
+++ b/tests/plugins/test_huggingface_extensions.py
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+import json
import pathlib
import lancedb
@@ -24,6 +25,11 @@
from hamilton.plugins import huggingface_extensions
+def _normalize_for_comparison(d):
+ """Normalize dictionary/list for order-independent comparison using JSON serialization."""
+ return json.loads(json.dumps(d, sort_keys=True, default=str))
+
+
def test_hfds_loader():
path_to_test = "tests/resources/hf_datasets"
reader = huggingface_extensions.HuggingFaceDSLoader(path_to_test)
@@ -62,18 +68,43 @@ def test_hfds_lancedb_saver(tmp_path: pathlib.Path):
saver = huggingface_extensions.HuggingFaceDSLanceDBSaver(db_client, "test_table")
ds = Dataset.from_dict({"vector": [np.array([1.0, 2.0, 3.0])], "named_entities": ["a"]})
metadata = saver.save_data(ds)
- assert metadata == {
+
+ # Different versions of HuggingFace datasets use either 'Sequence' or 'List' for array types
+ # Both are semantically equivalent, so we normalize this for comparison
+ expected_metadata = {
+ "db_meta": {"table_name": "test_table"},
"dataset_metadata": {
"columns": ["vector", "named_entities"],
"features": {
+ "vector": {"_type": "Sequence", "feature": {"_type": "Value", "dtype": "float64"}},
"named_entities": {"_type": "Value", "dtype": "string"},
- "vector": {"_type": "List", "feature": {"_type": "Value", "dtype": "float64"}},
},
"rows": 1,
"size_in_bytes": None,
},
- "db_meta": {"table_name": "test_table"},
}
+
+ # Normalize _type values: 'List' and 'Sequence' are equivalent
+ def normalize_feature_types(d):
+ if isinstance(d, dict):
+ result = {}
+ for k, v in d.items():
+ if k == "_type" and v in ("List", "Sequence"):
+ result[k] = "Sequence" # Normalize to Sequence
+ else:
+ result[k] = normalize_feature_types(v)
+ return result
+ elif isinstance(d, list):
+ return [normalize_feature_types(item) for item in d]
+ return d
+
+ # Normalize both dictionaries for order-independent comparison and feature type equivalence
+ normalized_metadata = normalize_feature_types(metadata)
+ normalized_expected = normalize_feature_types(expected_metadata)
+ assert _normalize_for_comparison(normalized_metadata) == _normalize_for_comparison(
+ normalized_expected
+ )
+
assert db_client.open_table("test_table").search().to_list() == [
{"named_entities": "a", "vector": [1.0, 2.0, 3.0]}
]
diff --git a/tests/plugins/test_polars_extensions.py b/tests/plugins/test_polars_extensions.py
index 1bec4494d..796e413ce 100644
--- a/tests/plugins/test_polars_extensions.py
+++ b/tests/plugins/test_polars_extensions.py
@@ -201,12 +201,5 @@ def test_polars_spreadsheet(df: pl.DataFrame, tmp_path: pathlib.Path) -> None:
def test_getting_type_hints_spreadsheetwriter():
"""Tests that types can be resolved at run time."""
-
- local_namespace = {}
- if sys.version_info.major == 3 and sys.version_info.minor > 8:
- from polars.selectors import Selector
-
- local_namespace = {"Selector": Selector}
-
- type_hints = typing.get_type_hints(PolarsSpreadsheetWriter, localns=local_namespace)
+ type_hints = typing.get_type_hints(PolarsSpreadsheetWriter)
assert type_hints["workbook"] == typing.Union[Workbook, io.BytesIO, pathlib.Path, str]
diff --git a/tests/plugins/test_xgboost_extensions.py b/tests/plugins/test_xgboost_extensions.py
index 289edc9a7..537fa474a 100644
--- a/tests/plugins/test_xgboost_extensions.py
+++ b/tests/plugins/test_xgboost_extensions.py
@@ -16,6 +16,7 @@
# under the License.
import pathlib
+import sys
import pytest
import xgboost
@@ -39,6 +40,11 @@ def fitted_xgboost_booster() -> xgboost.Booster:
return booster
+@pytest.mark.xfail(
+ condition=sys.version_info >= (3, 11),
+ reason="scikitlearn library incompatibility issue with Python 3.11+",
+ strict=False,
+)
def test_xgboost_model_json_writer(
fitted_xgboost_model: xgboost.XGBModel, tmp_path: pathlib.Path
) -> None:
@@ -51,7 +57,11 @@ def test_xgboost_model_json_writer(
assert metadata[FILE_METADATA]["path"] == str(model_path)
-@pytest.mark.xfail(condition=True, reason="scikitlearn library incompatibility issue", strict=False)
+@pytest.mark.xfail(
+ condition=sys.version_info >= (3, 11),
+ reason="scikitlearn library incompatibility issue with Python 3.11+",
+ strict=False,
+)
def test_xgboost_model_json_reader(
fitted_xgboost_model: xgboost.XGBModel, tmp_path: pathlib.Path
) -> None:
diff --git a/ui/README.md b/ui/README.md
index aef34ee76..29dd10f4e 100644
--- a/ui/README.md
+++ b/ui/README.md
@@ -1,3 +1,22 @@
+
+
# Apache Hamilton UI
This contains the code for the new Apache Hamilton UI. For an overview of getting started & features
diff --git a/ui/backend/Dockerfile.backend b/ui/backend/Dockerfile.backend
index 5abdafb11..e1b90d2d7 100644
--- a/ui/backend/Dockerfile.backend
+++ b/ui/backend/Dockerfile.backend
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
FROM python:3.8-slim
ENV PYTHONDONTWRITEBYTECODE 1
diff --git a/ui/backend/Dockerfile.backend-prod b/ui/backend/Dockerfile.backend-prod
index 4107dd8cb..f37717fd1 100644
--- a/ui/backend/Dockerfile.backend-prod
+++ b/ui/backend/Dockerfile.backend-prod
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
FROM python:3.8-slim
ENV PYTHONDONTWRITEBYTECODE 1
diff --git a/ui/backend/server/entrypoint.sh b/ui/backend/server/entrypoint.sh
index 3a3329f1c..9ac1d6c9c 100755
--- a/ui/backend/server/entrypoint.sh
+++ b/ui/backend/server/entrypoint.sh
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
set -e
python manage.py migrate # Apply database migrations
diff --git a/ui/backend/server/requirements.txt b/ui/backend/server/requirements.txt
index e64306798..615f559a3 100644
--- a/ui/backend/server/requirements.txt
+++ b/ui/backend/server/requirements.txt
@@ -23,7 +23,7 @@ ddtrace==1.15.0
Deprecated==1.2.14
Django==4.2.27
django-extensions==3.2.3
-django-ninja==1.0b1
+django-ninja>=1.1.0
envier==0.4.0
frozenlist==1.4.0
idna==3.7
diff --git a/ui/backend/server/tests/conftest.py b/ui/backend/server/tests/conftest.py
index 7762e397a..e018ae999 100644
--- a/ui/backend/server/tests/conftest.py
+++ b/ui/backend/server/tests/conftest.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
import asyncio
import pytest
diff --git a/ui/backend/server/tests/test_db_methods/test_api_keys.py b/ui/backend/server/tests/test_db_methods/test_api_keys.py
index 5007f7ccc..2754f1406 100644
--- a/ui/backend/server/tests/test_db_methods/test_api_keys.py
+++ b/ui/backend/server/tests/test_db_methods/test_api_keys.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
import pytest
from trackingserver_base.auth.api_keys import create_api_key_for_user, validate_api_key
diff --git a/ui/backend/server/tests/test_db_methods/test_auth_synchronization.py b/ui/backend/server/tests/test_db_methods/test_auth_synchronization.py
index 8b48c03fc..eba1f3485 100644
--- a/ui/backend/server/tests/test_db_methods/test_auth_synchronization.py
+++ b/ui/backend/server/tests/test_db_methods/test_auth_synchronization.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
import uuid
import pytest
diff --git a/ui/backend/server/tests/test_db_methods/test_permissions.py b/ui/backend/server/tests/test_db_methods/test_permissions.py
index 7af725612..1ff9cb0a3 100644
--- a/ui/backend/server/tests/test_db_methods/test_permissions.py
+++ b/ui/backend/server/tests/test_db_methods/test_permissions.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
import dataclasses
import datetime
import uuid
diff --git a/ui/backend/server/tests/test_db_methods/utils.py b/ui/backend/server/tests/test_db_methods/utils.py
index d6965d5ce..0dd0fd23f 100644
--- a/ui/backend/server/tests/test_db_methods/utils.py
+++ b/ui/backend/server/tests/test_db_methods/utils.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
import uuid
from typing import List, Optional
diff --git a/ui/backend/server/tests/test_lifecycle/test_auth.py b/ui/backend/server/tests/test_lifecycle/test_auth.py
index 8941ec9d7..b58602d93 100644
--- a/ui/backend/server/tests/test_lifecycle/test_auth.py
+++ b/ui/backend/server/tests/test_lifecycle/test_auth.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
import uuid
import pytest
diff --git a/ui/backend/server/tests/test_lifecycle/test_projects.py b/ui/backend/server/tests/test_lifecycle/test_projects.py
index 6916f83af..26ab129a3 100644
--- a/ui/backend/server/tests/test_lifecycle/test_projects.py
+++ b/ui/backend/server/tests/test_lifecycle/test_projects.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
import uuid
from typing import Any, Dict, Tuple
@@ -25,7 +42,7 @@ async def _setup_sample_project(
)
post_response = await async_client.post(
"/api/v1/projects",
- data=project_to_create.dict(),
+ data=project_to_create.model_dump(),
content_type="application/json",
headers={"test_username": username},
)
diff --git a/ui/backend/server/tests/test_lifecycle/test_run_tracking.py b/ui/backend/server/tests/test_lifecycle/test_run_tracking.py
index e4f3b7848..894d89641 100644
--- a/ui/backend/server/tests/test_lifecycle/test_run_tracking.py
+++ b/ui/backend/server/tests/test_lifecycle/test_run_tracking.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
import collections
import datetime
from typing import List, Tuple
@@ -23,7 +40,7 @@ async def _setup_dag_template(
project_id, *_ = await _setup_sample_project(async_client, username)
post_dag_template_response = await async_client.post(
f"/api/v1/dag_templates?{urlencode({'project_id': project_id})}",
- data=dag_template_to_generate.dict(),
+ data=dag_template_to_generate.model_dump(),
content_type="application/json",
headers={"test_username": username},
)
@@ -76,7 +93,7 @@ async def test_create_and_check_dag_template_exists(async_client: AsyncClient, d
project_id, *_ = await _setup_sample_project(async_client, username)
post_dag_template_response = await async_client.post(
f"/api/v1/dag_templates?{urlencode({'project_id': project_id})}",
- data=dag_template_to_generate.dict(),
+ data=dag_template_to_generate.model_dump(),
content_type="application/json",
headers={"test_username": username},
)
@@ -106,7 +123,7 @@ async def test_create_and_update_empty_dag_run(async_client: AsyncClient, db):
)
update_dag_run_response = await async_client.put(
f"/api/v1/dag_runs/{run_id}/",
- data=dag_run_update.dict(),
+ data=dag_run_update.model_dump(),
content_type="application/json",
headers={"test_username": username},
)
diff --git a/ui/backend/server/tests/test_lifecycle/test_templates.py b/ui/backend/server/tests/test_lifecycle/test_templates.py
index dbb41b0de..99a44950c 100644
--- a/ui/backend/server/tests/test_lifecycle/test_templates.py
+++ b/ui/backend/server/tests/test_lifecycle/test_templates.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
import random
import string
from typing import List, Tuple
@@ -89,7 +106,7 @@ async def test_create_and_get_dag_template(async_client: AsyncClient, db):
project_id, *_ = await _setup_sample_project(async_client, username)
post_dag_template_response = await async_client.post(
f"/api/v1/dag_templates?{urlencode({'project_id': project_id})}",
- data=dag_template_to_generate.dict(),
+ data=dag_template_to_generate.model_dump(),
content_type="application/json",
headers={"test_username": username},
)
@@ -140,7 +157,7 @@ async def test_create_and_get_all_project_dag_templates(async_client: AsyncClien
)
post_dag_template_response = await async_client.post(
f"/api/v1/dag_templates?{urlencode({'project_id': project_id})}",
- data=dag_template_to_generate.dict(),
+ data=dag_template_to_generate.model_dump(),
content_type="application/json",
headers={"test_username": username},
)
diff --git a/ui/backend/server/trackingserver_auth/README.md b/ui/backend/server/trackingserver_auth/README.md
index 4435d7102..988ff8279 100644
--- a/ui/backend/server/trackingserver_auth/README.md
+++ b/ui/backend/server/trackingserver_auth/README.md
@@ -1,3 +1,22 @@
+
+
# Enterprise licensed directory
See license for details.
diff --git a/ui/backend/server/trackingserver_auth/schema.py b/ui/backend/server/trackingserver_auth/schema.py
index 1b7c64bb7..72b7ae4ef 100644
--- a/ui/backend/server/trackingserver_auth/schema.py
+++ b/ui/backend/server/trackingserver_auth/schema.py
@@ -26,21 +26,21 @@
# These correspond (ish) to DB models #
##########################################
class UserOut(ModelSchema):
- class Config:
+ class Meta:
model = User
- model_fields = ["id", "email", "first_name", "last_name"]
+ fields = ["id", "email", "first_name", "last_name"]
class TeamOut(ModelSchema):
- class Config:
+ class Meta:
model = Team
- model_fields = ["id", "name", "auth_provider_type", "auth_provider_organization_id"]
+ fields = ["id", "name", "auth_provider_type", "auth_provider_organization_id"]
class ApiKeyOut(ModelSchema):
- class Config:
+ class Meta:
model = APIKey
- model_fields = ["id", "key_name", "key_start", "is_active", "created_at", "updated_at"]
+ fields = ["id", "key_name", "key_start", "is_active", "created_at", "updated_at"]
##########################################
diff --git a/ui/backend/server/trackingserver_projects/api.py b/ui/backend/server/trackingserver_projects/api.py
index 3fef9fb09..7c46f6c4a 100644
--- a/ui/backend/server/trackingserver_projects/api.py
+++ b/ui/backend/server/trackingserver_projects/api.py
@@ -151,7 +151,7 @@ async def get_project_by_id(
project_id=project_id, type__in=attribute_types
).all()
]
- return ProjectOutWithAttributes(**project_out.dict(), attributes=attributes)
+ return ProjectOutWithAttributes(**project_out.model_dump(), attributes=attributes)
@router.put("/v1/projects/{project_id}", response=ProjectOut, tags=["projects"])
@@ -288,7 +288,7 @@ async def get_projects(
)
return [
ProjectOutWithAttributes(
- **project.dict(), attributes=project_id_to_attributes.get(project.id, [])
+ **project.model_dump(), attributes=project_id_to_attributes.get(project.id, [])
)
for project in projects
]
diff --git a/ui/backend/server/trackingserver_projects/schema.py b/ui/backend/server/trackingserver_projects/schema.py
index 123ddd662..fa86107d9 100644
--- a/ui/backend/server/trackingserver_projects/schema.py
+++ b/ui/backend/server/trackingserver_projects/schema.py
@@ -39,27 +39,27 @@ class VisibilityFull(Schema):
class ProjectAttributeIn(ModelSchema):
- class Config:
+ class Meta:
model = ProjectAttribute
- model_fields = ["name", "type", "schema_version", "value"]
+ fields = ["name", "type", "schema_version", "value"]
class ProjectAttributeOut(ModelSchema):
- class Config:
+ class Meta:
model = ProjectAttribute
- model_fields = ["name", "type", "schema_version", "value", "id", "project"]
+ fields = ["name", "type", "schema_version", "value", "id", "project"]
class ProjectTeamMembershipOut(ModelSchema):
- class Config:
+ class Meta:
model = ProjectTeamMembership
- model_fields = "__all__"
+ fields = "__all__"
class ProjectUserMembershipOut(ModelSchema):
- class Config:
+ class Meta:
model = ProjectUserMembership
- model_fields = "__all__"
+ fields = "__all__"
# This is currently the schema we take from the UI
@@ -224,9 +224,9 @@ class ProjectOut(ProjectBase):
created_at: datetime.datetime = Field(description="When the project was created")
updated_at: datetime.datetime = Field(description="When the project was last updated")
- class Config:
+ class Meta:
model = Project
- model_fields = "__all__"
+ fields = "__all__"
@staticmethod
async def from_model(project: Project, role: str) -> "ProjectOut":
diff --git a/ui/backend/server/trackingserver_run_tracking/api.py b/ui/backend/server/trackingserver_run_tracking/api.py
index 055ecda85..c216c3a67 100644
--- a/ui/backend/server/trackingserver_run_tracking/api.py
+++ b/ui/backend/server/trackingserver_run_tracking/api.py
@@ -64,7 +64,7 @@ async def create_dag_run(request, dag_template_id: int, dag_run: DAGRunIn) -> DA
user, teams = request.auth
logger.info(f"Creating DAG run for dag template: {dag_template_id} for user: {user.email}")
dag_run_created = await DAGRun.objects.acreate(
- **dag_run.dict(), dag_template_id=dag_template_id, launched_by_id=user.id
+ **dag_run.model_dump(), dag_template_id=dag_template_id, launched_by_id=user.id
)
logger.info(f"Created DAG run for dag template: {dag_template_id}")
return DAGRunOut.from_orm(dag_run_created)
@@ -300,7 +300,7 @@ async def bulk_log(
)
logger.info(f"Updated {len(task_updates_to_save)} task updates for dag run: {dag_run_id}")
node_attributes_to_create = [
- NodeRunAttribute(**attribute.dict(), dag_run_id=dag_run.id)
+ NodeRunAttribute(**attribute.model_dump(), dag_run_id=dag_run.id)
for attribute in node_run_attributes
]
logger.info(
diff --git a/ui/backend/server/trackingserver_run_tracking/schema.py b/ui/backend/server/trackingserver_run_tracking/schema.py
index ef08d9e64..66a7c7569 100644
--- a/ui/backend/server/trackingserver_run_tracking/schema.py
+++ b/ui/backend/server/trackingserver_run_tracking/schema.py
@@ -50,7 +50,7 @@ class Meta:
def create_with_username(cls, orm_model: DAGRun) -> "DAGRunOut":
return DAGRunOut(
**{
- **DAGRunOut.from_orm(orm_model).dict(),
+ **DAGRunOut.from_orm(orm_model).model_dump(),
**{
"username_resolved": (
orm_model.launched_by.email if orm_model.launched_by else None
@@ -95,7 +95,7 @@ class NodeRunOutWithAttributes(NodeRunOut):
def from_data(cls, node_run: NodeRun, attributes: List[NodeRunAttributeOut]):
return NodeRunOutWithAttributes(
**{
- **NodeRunOut.from_orm(node_run).dict(),
+ **NodeRunOut.from_orm(node_run).model_dump(),
**{"attributes": attributes, "dag_run_id": node_run.dag_run_id},
}
)
@@ -109,7 +109,7 @@ class DAGRunOutWithData(DAGRunOut):
def from_data(cls, dag_run: DAGRun, node_runs: List[NodeRunOutWithAttributes]):
return DAGRunOutWithData(
**{
- **DAGRunOut.from_orm(dag_run).dict(),
+ **DAGRunOut.from_orm(dag_run).model_dump(),
# Not sure why this isn't showing up -- todo, clean this up across the board
**{"node_runs": node_runs, "dag_template_id": dag_run.dag_template_id},
}
@@ -129,7 +129,7 @@ class NodeRunOutWithExtraData(NodeRunOut, BaseModel):
def from_orm(cls, obj, dag_template_id):
node_run_out = NodeRunOut.from_orm(obj)
return NodeRunOutWithExtraData(
- **node_run_out.dict(),
+ **node_run_out.model_dump(),
dag_template_id=dag_template_id,
dag_run_id=obj.dag_run_id,
)
diff --git a/ui/backend/server/trackingserver_template/api.py b/ui/backend/server/trackingserver_template/api.py
index 195de34f8..04d45c534 100644
--- a/ui/backend/server/trackingserver_template/api.py
+++ b/ui/backend/server/trackingserver_template/api.py
@@ -74,7 +74,9 @@ async def create_dag_template(
code_log = dag_template.code_log
if code_log is not None:
logger.info(f"Saving code log for project {project_id} for {user.email}")
- code_log_url = await blob_store.write_obj("project" + str(project_id), code_log.dict())
+ code_log_url = await blob_store.write_obj(
+ "project" + str(project_id), code_log.model_dump()
+ )
logger.info(f"Stored code for project {project_id} for {user.email} at {code_log_url}")
code_log_store = blob_store.store()
code_log_schema_version = 1
@@ -102,7 +104,7 @@ async def create_dag_template(
logger.info(f"Created DAG template for project : {project_id} for {user.email}")
code_artifacts_created = await CodeArtifact.objects.abulk_create(
[
- CodeArtifact(**code_artifact.dict(), dag_template_id=dag_template_created.id)
+ CodeArtifact(**code_artifact.model_dump(), dag_template_id=dag_template_created.id)
for code_artifact in dag_template.code_artifacts
],
ignore_conflicts=False,
@@ -115,7 +117,11 @@ async def create_dag_template(
for node in dag_template.nodes:
node_template = NodeTemplate(
- **{key: value for key, value in node.dict().items() if key != "code_artifact_pointers"},
+ **{
+ key: value
+ for key, value in node.model_dump().items()
+ if key != "code_artifact_pointers"
+ },
dag_template_id=dag_template_created.id,
)
node_templates_to_create.append(node_template)
@@ -400,7 +406,7 @@ async def load_dag_template(
# TODO -- assert that the blob store matches he one we have available
code_log = await blob_store.read_obj(dag_template.code_log_url)
return DAGTemplateOutWithData(
- **dag_template.dict(),
+ **dag_template.model_dump(),
# TODO -- fix this -- this is due to something weird with the ID names in from_orm
code_artifacts=code_artifacts_out,
nodes=nodes_out,
diff --git a/ui/buildx_and_push.sh b/ui/buildx_and_push.sh
index 755cb766a..cb56f4ac1 100755
--- a/ui/buildx_and_push.sh
+++ b/ui/buildx_and_push.sh
@@ -1,4 +1,21 @@
#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
export DOCKER_CLI_EXPERIMENTAL=enabled
diff --git a/ui/common.sh b/ui/common.sh
index 478dd163c..10f2fedc4 100755
--- a/ui/common.sh
+++ b/ui/common.sh
@@ -1,4 +1,21 @@
#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
if [[ -z $(which docker-compose) ]];
then
diff --git a/ui/dev.sh b/ui/dev.sh
index f8bd1d3d1..2af369cd4 100755
--- a/ui/dev.sh
+++ b/ui/dev.sh
@@ -1,4 +1,21 @@
#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
. common.sh
diff --git a/ui/frontend/Dockerfile.frontend b/ui/frontend/Dockerfile.frontend
index 505cb62e3..0774cabaf 100644
--- a/ui/frontend/Dockerfile.frontend
+++ b/ui/frontend/Dockerfile.frontend
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
FROM node:20
# Set working directory
diff --git a/ui/frontend/Dockerfile.frontend-prod b/ui/frontend/Dockerfile.frontend-prod
index 39b917d51..9a1883523 100644
--- a/ui/frontend/Dockerfile.frontend-prod
+++ b/ui/frontend/Dockerfile.frontend-prod
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
FROM node:20 AS build-stage
# Set working directory
diff --git a/ui/frontend/README.md b/ui/frontend/README.md
index fe8f19919..9faa14064 100644
--- a/ui/frontend/README.md
+++ b/ui/frontend/README.md
@@ -1,3 +1,22 @@
+
+
# Apache Hamilton UI frontend
## Dev setup
diff --git a/ui/frontend/src/App.test.tsx b/ui/frontend/src/App.test.tsx
index 05d3d3e5f..c57f12381 100644
--- a/ui/frontend/src/App.test.tsx
+++ b/ui/frontend/src/App.test.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React from "react";
import { render, screen } from "@testing-library/react";
import { App } from "./App";
diff --git a/ui/frontend/src/App.tsx b/ui/frontend/src/App.tsx
index c0b0f5b68..d8037846e 100644
--- a/ui/frontend/src/App.tsx
+++ b/ui/frontend/src/App.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom";
import { useContext, useEffect, useState } from "react";
import { useAuthInfo } from "@propelauth/react";
diff --git a/ui/frontend/src/auth/LocalAccount.tsx b/ui/frontend/src/auth/LocalAccount.tsx
index 2d8cde6d3..a305a6d6d 100644
--- a/ui/frontend/src/auth/LocalAccount.tsx
+++ b/ui/frontend/src/auth/LocalAccount.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { useContext } from "react";
import { UserContext } from "./Login";
import { ProjectLogInstructions } from "../components/dashboard/Project/ProjectLogInstructions";
diff --git a/ui/frontend/src/auth/Login.tsx b/ui/frontend/src/auth/Login.tsx
index 12c5111fc..1181eeb86 100644
--- a/ui/frontend/src/auth/Login.tsx
+++ b/ui/frontend/src/auth/Login.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React, { useState, createContext } from "react";
import { useLocalStorage } from "../utils/localStorage";
import { HiChevronDown, HiChevronUp } from "react-icons/hi";
diff --git a/ui/frontend/src/components/Home.tsx b/ui/frontend/src/components/Home.tsx
index 32e488e19..f6d56455e 100644
--- a/ui/frontend/src/components/Home.tsx
+++ b/ui/frontend/src/components/Home.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React from "react";
import { Link } from "react-router-dom";
diff --git a/ui/frontend/src/components/common/Checkbox.tsx b/ui/frontend/src/components/common/Checkbox.tsx
index 66387588b..1b683db70 100644
--- a/ui/frontend/src/components/common/Checkbox.tsx
+++ b/ui/frontend/src/components/common/Checkbox.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
export const CheckBox = () => {
return (
{
diff --git a/ui/frontend/src/components/common/GenericTabbedView.tsx b/ui/frontend/src/components/common/GenericTabbedView.tsx
index c25426362..c1c17728d 100644
--- a/ui/frontend/src/components/common/GenericTabbedView.tsx
+++ b/ui/frontend/src/components/common/GenericTabbedView.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { classNames } from "../../utils";
import { HiChevronDown, HiChevronUp } from "react-icons/hi";
diff --git a/ui/frontend/src/components/common/GenericTable.tsx b/ui/frontend/src/components/common/GenericTable.tsx
index d34a31597..b3fb09e0c 100644
--- a/ui/frontend/src/components/common/GenericTable.tsx
+++ b/ui/frontend/src/components/common/GenericTable.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React, { FC } from "react";
import { HiChevronDown, HiChevronUp } from "react-icons/hi";
diff --git a/ui/frontend/src/components/common/HelpTooltip.tsx b/ui/frontend/src/components/common/HelpTooltip.tsx
index 37da3ed78..f90ce6e81 100644
--- a/ui/frontend/src/components/common/HelpTooltip.tsx
+++ b/ui/frontend/src/components/common/HelpTooltip.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { AiFillQuestionCircle } from "react-icons/ai";
export const HelpTooltip: React.FC<{ description: string }> = (props) => {
diff --git a/ui/frontend/src/components/common/Loading.tsx b/ui/frontend/src/components/common/Loading.tsx
index bb35b56fa..1e19c21bf 100644
--- a/ui/frontend/src/components/common/Loading.tsx
+++ b/ui/frontend/src/components/common/Loading.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React from "react";
export const Loading = () => {
diff --git a/ui/frontend/src/components/common/ProjectVersionSelector.tsx b/ui/frontend/src/components/common/ProjectVersionSelector.tsx
index 371ccdf17..3b2f49018 100644
--- a/ui/frontend/src/components/common/ProjectVersionSelector.tsx
+++ b/ui/frontend/src/components/common/ProjectVersionSelector.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React from "react";
import { classNames } from "../../utils";
import { DAGTemplateWithoutData } from "../../state/api/friendlyApi";
diff --git a/ui/frontend/src/components/common/RunDurationChart.tsx b/ui/frontend/src/components/common/RunDurationChart.tsx
index edd7f54d1..56c0cdeb1 100644
--- a/ui/frontend/src/components/common/RunDurationChart.tsx
+++ b/ui/frontend/src/components/common/RunDurationChart.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import {
Chart as ChartJS,
LinearScale,
diff --git a/ui/frontend/src/components/common/TagSelector.tsx b/ui/frontend/src/components/common/TagSelector.tsx
index 04141133d..ead8e7598 100644
--- a/ui/frontend/src/components/common/TagSelector.tsx
+++ b/ui/frontend/src/components/common/TagSelector.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import ReactSelect from "react-select";
export const TagSelectorWithValues = (props: {
diff --git a/ui/frontend/src/components/common/Tooltip.tsx b/ui/frontend/src/components/common/Tooltip.tsx
index 2821a8335..8735dc9a9 100644
--- a/ui/frontend/src/components/common/Tooltip.tsx
+++ b/ui/frontend/src/components/common/Tooltip.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { ReactNode } from "react";
export const ToolTip: React.FC<{ children: ReactNode; tooltip?: string }> = (
diff --git a/ui/frontend/src/components/common/WithHelpIcon.tsx b/ui/frontend/src/components/common/WithHelpIcon.tsx
index 0c853d145..5e04377f2 100644
--- a/ui/frontend/src/components/common/WithHelpIcon.tsx
+++ b/ui/frontend/src/components/common/WithHelpIcon.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { ReactNode, useContext } from "react";
import { HelpVideos, TutorialContext } from "../tutorial/HelpVideo";
import { FaQuestionCircle } from "react-icons/fa";
diff --git a/ui/frontend/src/components/dashboard/Account/Account.tsx b/ui/frontend/src/components/dashboard/Account/Account.tsx
index 0b3a44b8f..82a6c67f4 100644
--- a/ui/frontend/src/components/dashboard/Account/Account.tsx
+++ b/ui/frontend/src/components/dashboard/Account/Account.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { Loading } from "../../common/Loading";
import { useUserInformation } from "../../../state/api/friendlyApi";
import { useRedirectFunctions } from "@propelauth/react";
diff --git a/ui/frontend/src/components/dashboard/Alerts.tsx b/ui/frontend/src/components/dashboard/Alerts.tsx
index a35aa9278..fa0491556 100644
--- a/ui/frontend/src/components/dashboard/Alerts.tsx
+++ b/ui/frontend/src/components/dashboard/Alerts.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { Link } from "react-router-dom";
// NOTE The Alerts() page is currently not displayed in the UI
diff --git a/ui/frontend/src/components/dashboard/Catalog/CatalogOutlet.tsx b/ui/frontend/src/components/dashboard/Catalog/CatalogOutlet.tsx
index 8e668b9d3..200e167dd 100644
--- a/ui/frontend/src/components/dashboard/Catalog/CatalogOutlet.tsx
+++ b/ui/frontend/src/components/dashboard/Catalog/CatalogOutlet.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { ErrorPage } from "../../common/Error";
import { Loading } from "../../common/Loading";
import { CatalogView } from "./SearchTable";
diff --git a/ui/frontend/src/components/dashboard/Catalog/NodeRunExpansion.tsx b/ui/frontend/src/components/dashboard/Catalog/NodeRunExpansion.tsx
index 450684129..5ed6ad797 100644
--- a/ui/frontend/src/components/dashboard/Catalog/NodeRunExpansion.tsx
+++ b/ui/frontend/src/components/dashboard/Catalog/NodeRunExpansion.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/**
* Table view of an expanded node run.
* TODO -- unify this with the table view of a run in the runs page
diff --git a/ui/frontend/src/components/dashboard/Catalog/SearchTable.tsx b/ui/frontend/src/components/dashboard/Catalog/SearchTable.tsx
index 2a304b59f..bbe17df81 100644
--- a/ui/frontend/src/components/dashboard/Catalog/SearchTable.tsx
+++ b/ui/frontend/src/components/dashboard/Catalog/SearchTable.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { FC, useMemo, useState } from "react";
import Fuse from "fuse.js";
diff --git a/ui/frontend/src/components/dashboard/Code/Code.tsx b/ui/frontend/src/components/dashboard/Code/Code.tsx
index b2dba515e..ec8aa6dcb 100644
--- a/ui/frontend/src/components/dashboard/Code/Code.tsx
+++ b/ui/frontend/src/components/dashboard/Code/Code.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { FC, useState } from "react";
import CodeExplorer, { getFunctionIdentifier } from "./CodeExplorer";
import {
diff --git a/ui/frontend/src/components/dashboard/Code/CodeExplorer.tsx b/ui/frontend/src/components/dashboard/Code/CodeExplorer.tsx
index 3b38a122a..9d1fd4f5a 100644
--- a/ui/frontend/src/components/dashboard/Code/CodeExplorer.tsx
+++ b/ui/frontend/src/components/dashboard/Code/CodeExplorer.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React, { FC } from "react";
import { HiChevronRight, HiChevronDown } from "react-icons/hi";
import { IconType } from "react-icons/lib";
diff --git a/ui/frontend/src/components/dashboard/Code/CodeOutlet.tsx b/ui/frontend/src/components/dashboard/Code/CodeOutlet.tsx
index f2ecc9a14..7dfca1b67 100644
--- a/ui/frontend/src/components/dashboard/Code/CodeOutlet.tsx
+++ b/ui/frontend/src/components/dashboard/Code/CodeOutlet.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { Loading } from "../../common/Loading";
import { useData as useDashboardData } from "../Dashboard";
import { Code } from "./Code";
diff --git a/ui/frontend/src/components/dashboard/Code/CodeViewUtils.tsx b/ui/frontend/src/components/dashboard/Code/CodeViewUtils.tsx
index a28cfc146..f12b07e62 100644
--- a/ui/frontend/src/components/dashboard/Code/CodeViewUtils.tsx
+++ b/ui/frontend/src/components/dashboard/Code/CodeViewUtils.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { NodeTemplate } from "../../../state/api/friendlyApi";
import { getPythonTypeIconFromNode } from "../../../utils";
diff --git a/ui/frontend/src/components/dashboard/Code/Function.tsx b/ui/frontend/src/components/dashboard/Code/Function.tsx
index ee7157dfb..8ca273ea1 100644
--- a/ui/frontend/src/components/dashboard/Code/Function.tsx
+++ b/ui/frontend/src/components/dashboard/Code/Function.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React, { FC, useState } from "react";
import ReactDiffViewer, { DiffMethod } from "react-diff-viewer-continued";
diff --git a/ui/frontend/src/components/dashboard/Code/FunctionGraphView.tsx b/ui/frontend/src/components/dashboard/Code/FunctionGraphView.tsx
index b83196e6e..a58bdb551 100644
--- a/ui/frontend/src/components/dashboard/Code/FunctionGraphView.tsx
+++ b/ui/frontend/src/components/dashboard/Code/FunctionGraphView.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
// import ReactFlow, {
// useNodesState,
// useEdgesState,
diff --git a/ui/frontend/src/components/dashboard/Dashboard.tsx b/ui/frontend/src/components/dashboard/Dashboard.tsx
index 7164397dd..8963cd939 100644
--- a/ui/frontend/src/components/dashboard/Dashboard.tsx
+++ b/ui/frontend/src/components/dashboard/Dashboard.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { useState } from "react";
import {
FolderIcon,
diff --git a/ui/frontend/src/components/dashboard/NavBreadCrumb.tsx b/ui/frontend/src/components/dashboard/NavBreadCrumb.tsx
index f7ba0d4fa..ce33b0204 100644
--- a/ui/frontend/src/components/dashboard/NavBreadCrumb.tsx
+++ b/ui/frontend/src/components/dashboard/NavBreadCrumb.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { ChevronRightIcon, HomeIcon } from "@heroicons/react/20/solid";
import { DAGTemplateWithoutData, Project } from "../../state/api/friendlyApi";
import { Link } from "react-router-dom";
diff --git a/ui/frontend/src/components/dashboard/Project/Project.tsx b/ui/frontend/src/components/dashboard/Project/Project.tsx
index 889342113..69327fa3a 100644
--- a/ui/frontend/src/components/dashboard/Project/Project.tsx
+++ b/ui/frontend/src/components/dashboard/Project/Project.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { skipToken } from "@reduxjs/toolkit/dist/query";
import { ErrorPage } from "../../common/Error";
import { Loading } from "../../common/Loading";
diff --git a/ui/frontend/src/components/dashboard/Project/ProjectDocumentation.tsx b/ui/frontend/src/components/dashboard/Project/ProjectDocumentation.tsx
index 5c05626e8..86fc3a699 100644
--- a/ui/frontend/src/components/dashboard/Project/ProjectDocumentation.tsx
+++ b/ui/frontend/src/components/dashboard/Project/ProjectDocumentation.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { useLayoutEffect, useRef, useState } from "react";
import { classNames } from "../../../utils";
import { AttributeDocumentationLoom1 } from "../../../state/api/friendlyApi";
diff --git a/ui/frontend/src/components/dashboard/Project/ProjectLogInstructions.tsx b/ui/frontend/src/components/dashboard/Project/ProjectLogInstructions.tsx
index bc228432a..90b5bd609 100644
--- a/ui/frontend/src/components/dashboard/Project/ProjectLogInstructions.tsx
+++ b/ui/frontend/src/components/dashboard/Project/ProjectLogInstructions.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { API_KEY_ICON } from "../Dashboard";
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import { vscDarkPlus } from "react-syntax-highlighter/dist/esm/styles/prism";
diff --git a/ui/frontend/src/components/dashboard/Project/Projects.tsx b/ui/frontend/src/components/dashboard/Project/Projects.tsx
index b3862c6a7..47af7b2c8 100644
--- a/ui/frontend/src/components/dashboard/Project/Projects.tsx
+++ b/ui/frontend/src/components/dashboard/Project/Projects.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { Fragment, useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
diff --git a/ui/frontend/src/components/dashboard/Runs/Dashboarding.tsx b/ui/frontend/src/components/dashboard/Runs/Dashboarding.tsx
index 863baf22b..fcd3c7374 100644
--- a/ui/frontend/src/components/dashboard/Runs/Dashboarding.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Dashboarding.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
export const DashboardItem = (props: {
children: React.ReactNode;
extraWide?: boolean;
diff --git a/ui/frontend/src/components/dashboard/Runs/Run/DAGRunView.tsx b/ui/frontend/src/components/dashboard/Runs/Run/DAGRunView.tsx
index ba605e09b..3d6dfeac2 100644
--- a/ui/frontend/src/components/dashboard/Runs/Run/DAGRunView.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Run/DAGRunView.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React from "react";
import { DAGNode, VizType } from "../../Visualize/types";
import {
diff --git a/ui/frontend/src/components/dashboard/Runs/Run/Run.tsx b/ui/frontend/src/components/dashboard/Runs/Run/Run.tsx
index aef0f4266..ed274041e 100644
--- a/ui/frontend/src/components/dashboard/Runs/Run/Run.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Run/Run.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { useEffect, useState } from "react";
import { Outlet, useLocation, useOutletContext } from "react-router-dom";
import {
diff --git a/ui/frontend/src/components/dashboard/Runs/Run/TaskTable.tsx b/ui/frontend/src/components/dashboard/Runs/Run/TaskTable.tsx
index 54e3d62cb..4a68df518 100644
--- a/ui/frontend/src/components/dashboard/Runs/Run/TaskTable.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Run/TaskTable.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { FC, useEffect, useState } from "react";
import { Link, useNavigate } from "react-router-dom";
import { HashLink } from "react-router-hash-link";
diff --git a/ui/frontend/src/components/dashboard/Runs/Run/WaterfallChart.tsx b/ui/frontend/src/components/dashboard/Runs/Run/WaterfallChart.tsx
index 6d21baaa5..ef1ab98bb 100644
--- a/ui/frontend/src/components/dashboard/Runs/Run/WaterfallChart.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Run/WaterfallChart.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React, { useRef } from "react";
import {
DAGRunWithData,
diff --git a/ui/frontend/src/components/dashboard/Runs/RunSummary.tsx b/ui/frontend/src/components/dashboard/Runs/RunSummary.tsx
index d81cbbf93..8bdef063b 100644
--- a/ui/frontend/src/components/dashboard/Runs/RunSummary.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/RunSummary.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import "chartjs-adapter-date-fns";
import { Bar, Scatter } from "react-chartjs-2";
import Datepicker from "react-tailwindcss-datepicker";
diff --git a/ui/frontend/src/components/dashboard/Runs/Runs.tsx b/ui/frontend/src/components/dashboard/Runs/Runs.tsx
index a54f2a18b..500e2ad6e 100644
--- a/ui/frontend/src/components/dashboard/Runs/Runs.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Runs.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React from "react";
import {
Project,
diff --git a/ui/frontend/src/components/dashboard/Runs/RunsOutlet.tsx b/ui/frontend/src/components/dashboard/Runs/RunsOutlet.tsx
index e06daec79..b18fecf5a 100644
--- a/ui/frontend/src/components/dashboard/Runs/RunsOutlet.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/RunsOutlet.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { useData as useDashboardData } from "../Dashboard";
import Runs from "./Runs";
diff --git a/ui/frontend/src/components/dashboard/Runs/RunsTable.tsx b/ui/frontend/src/components/dashboard/Runs/RunsTable.tsx
index cdefad26a..d124161bc 100644
--- a/ui/frontend/src/components/dashboard/Runs/RunsTable.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/RunsTable.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React, { FC, useState } from "react";
import { Link, useNavigate } from "react-router-dom";
import { RunStatus } from "./Status";
diff --git a/ui/frontend/src/components/dashboard/Runs/Status.tsx b/ui/frontend/src/components/dashboard/Runs/Status.tsx
index bdcba363b..021d076dc 100644
--- a/ui/frontend/src/components/dashboard/Runs/Status.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Status.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
// import { RunLogOut } from "../../../../state/api/backendApiRaw";
import { RunStatusType } from "../../../state/api/friendlyApi";
diff --git a/ui/frontend/src/components/dashboard/Runs/Task/CodeView.tsx b/ui/frontend/src/components/dashboard/Runs/Task/CodeView.tsx
index 2cd168b8b..b13deb764 100644
--- a/ui/frontend/src/components/dashboard/Runs/Task/CodeView.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Task/CodeView.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import ReactDiffViewer, { DiffMethod } from "react-diff-viewer-continued";
import { useState } from "react";
import { NodeRunWithAttributes } from "../../../../state/api/friendlyApi";
diff --git a/ui/frontend/src/components/dashboard/Runs/Task/ErrorView.tsx b/ui/frontend/src/components/dashboard/Runs/Task/ErrorView.tsx
index 6ffb64fcf..647ee26f2 100644
--- a/ui/frontend/src/components/dashboard/Runs/Task/ErrorView.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Task/ErrorView.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { AttributeError1 } from "../../../../state/api/backendApiRaw";
import { useState } from "react";
import {
diff --git a/ui/frontend/src/components/dashboard/Runs/Task/Task.tsx b/ui/frontend/src/components/dashboard/Runs/Task/Task.tsx
index c8d753a5c..460e38614 100644
--- a/ui/frontend/src/components/dashboard/Runs/Task/Task.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Task/Task.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { Link, createSearchParams, useSearchParams } from "react-router-dom";
import { classNames, getPythonTypeIcon } from "../../../../utils";
diff --git a/ui/frontend/src/components/dashboard/Runs/Task/TaskRunOutlet.tsx b/ui/frontend/src/components/dashboard/Runs/Task/TaskRunOutlet.tsx
index bfbe4bdf2..66d61fb23 100644
--- a/ui/frontend/src/components/dashboard/Runs/Task/TaskRunOutlet.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Task/TaskRunOutlet.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { useNavigate } from "react-router-dom";
import { useRunData } from "../Run/Run";
import { TaskView } from "./Task";
diff --git a/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/DAGWorksDescribe.tsx b/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/DAGWorksDescribe.tsx
index fd0387050..6dd0331c6 100644
--- a/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/DAGWorksDescribe.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/DAGWorksDescribe.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import {
Chart as ChartJS,
LinearScale,
diff --git a/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/DataObservability.tsx b/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/DataObservability.tsx
index cadcbf0c5..e9676a7f3 100644
--- a/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/DataObservability.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/DataObservability.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { useState } from "react";
import {
AttributeDagworksDescribe3,
diff --git a/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/DictView.tsx b/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/DictView.tsx
index 190cfcc87..cb71e7537 100644
--- a/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/DictView.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/DictView.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import JsonView from "@uiw/react-json-view";
import {
AttributeDict1,
diff --git a/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/HTMLView.tsx b/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/HTMLView.tsx
index cddaa7faf..361703803 100644
--- a/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/HTMLView.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/HTMLView.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { AttributeHTML1 } from "../../../../../state/api/friendlyApi";
import { GenericTable } from "../../../../common/GenericTable";
diff --git a/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/PandasDescribe.tsx b/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/PandasDescribe.tsx
index ba2414814..71ef4e525 100644
--- a/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/PandasDescribe.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/PandasDescribe.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/**
* This is legacy code and we will likely stop supporting it.
* Just kept it around cause one of our customers has old runs on it and I want to test the typing system.
diff --git a/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/SchemaView.tsx b/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/SchemaView.tsx
index 7e5ee6bf6..259702c2b 100644
--- a/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/SchemaView.tsx
+++ b/ui/frontend/src/components/dashboard/Runs/Task/result-summaries/SchemaView.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { AttributeSchema1 } from "../../../../../state/api/friendlyApi";
import { GenericGroupedTable } from "../../../../common/GenericTable";
import { ColSchema } from "../../../../../state/api/backendApiRaw";
diff --git a/ui/frontend/src/components/dashboard/Search/search.tsx b/ui/frontend/src/components/dashboard/Search/search.tsx
index d9dcde363..fed5c8f4c 100644
--- a/ui/frontend/src/components/dashboard/Search/search.tsx
+++ b/ui/frontend/src/components/dashboard/Search/search.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
/*
This example requires Tailwind CSS v3.0+
diff --git a/ui/frontend/src/components/dashboard/Settings/Account.tsx b/ui/frontend/src/components/dashboard/Settings/Account.tsx
index 147e0ab42..d9a703d28 100644
--- a/ui/frontend/src/components/dashboard/Settings/Account.tsx
+++ b/ui/frontend/src/components/dashboard/Settings/Account.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { Loading } from "../../common/Loading";
import { useUserInformation } from "../../../state/api/friendlyApi";
diff --git a/ui/frontend/src/components/dashboard/Settings/ApiKeys.tsx b/ui/frontend/src/components/dashboard/Settings/ApiKeys.tsx
index 45da52c0a..c795d96e8 100644
--- a/ui/frontend/src/components/dashboard/Settings/ApiKeys.tsx
+++ b/ui/frontend/src/components/dashboard/Settings/ApiKeys.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React from "react";
import { ApiKeyOut } from "../../../state/api/backendApiRaw";
diff --git a/ui/frontend/src/components/dashboard/Settings/Settings.tsx b/ui/frontend/src/components/dashboard/Settings/Settings.tsx
index 2075ea6e8..8ea6e95ce 100644
--- a/ui/frontend/src/components/dashboard/Settings/Settings.tsx
+++ b/ui/frontend/src/components/dashboard/Settings/Settings.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React from "react";
import { ApiKeys } from "./ApiKeys";
diff --git a/ui/frontend/src/components/dashboard/Versions/Versions.tsx b/ui/frontend/src/components/dashboard/Versions/Versions.tsx
index 974598b79..b8a0e8272 100644
--- a/ui/frontend/src/components/dashboard/Versions/Versions.tsx
+++ b/ui/frontend/src/components/dashboard/Versions/Versions.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { useState } from "react";
import { Link, useNavigate } from "react-router-dom";
import ReactSelect from "react-select";
diff --git a/ui/frontend/src/components/dashboard/Versions/VersionsOutlet.tsx b/ui/frontend/src/components/dashboard/Versions/VersionsOutlet.tsx
index 912c8d262..ca38a4baf 100644
--- a/ui/frontend/src/components/dashboard/Versions/VersionsOutlet.tsx
+++ b/ui/frontend/src/components/dashboard/Versions/VersionsOutlet.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import React from "react";
import { useData as useDashboardData } from "../Dashboard";
import Versions from "./Versions";
diff --git a/ui/frontend/src/components/dashboard/Visualize/DAGRun.tsx b/ui/frontend/src/components/dashboard/Visualize/DAGRun.tsx
index 7da21951a..d5cea16f7 100644
--- a/ui/frontend/src/components/dashboard/Visualize/DAGRun.tsx
+++ b/ui/frontend/src/components/dashboard/Visualize/DAGRun.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { createContext, useContext } from "react";
import { DAGNode, GroupSpec } from "./types";
import { iconForGroupSpecName, iconsForNodes } from "./utils";
diff --git a/ui/frontend/src/components/dashboard/Visualize/DAGViz.tsx b/ui/frontend/src/components/dashboard/Visualize/DAGViz.tsx
index 4f9d744d1..8e08bebc8 100644
--- a/ui/frontend/src/components/dashboard/Visualize/DAGViz.tsx
+++ b/ui/frontend/src/components/dashboard/Visualize/DAGViz.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import {
DAGRunWithData,
DAGTemplateWithData,
diff --git a/ui/frontend/src/components/dashboard/Visualize/Legend.tsx b/ui/frontend/src/components/dashboard/Visualize/Legend.tsx
index d576faeda..3d18c5630 100644
--- a/ui/frontend/src/components/dashboard/Visualize/Legend.tsx
+++ b/ui/frontend/src/components/dashboard/Visualize/Legend.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
export const Legend = () => {
const legendItems = [
{ text: "Current", bgClass: "bg-green-500 text-white" },
diff --git a/ui/frontend/src/components/dashboard/Visualize/NodeHierarchyManager.tsx b/ui/frontend/src/components/dashboard/Visualize/NodeHierarchyManager.tsx
index bdb21faa4..353e23840 100644
--- a/ui/frontend/src/components/dashboard/Visualize/NodeHierarchyManager.tsx
+++ b/ui/frontend/src/components/dashboard/Visualize/NodeHierarchyManager.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { Switch } from "@headlessui/react";
import { DAGNode, NodeGroupingState, TerminalVizNodeType } from "./types";
import { classNames } from "../../../utils";
diff --git a/ui/frontend/src/components/dashboard/Visualize/VisualizeOutlet.tsx b/ui/frontend/src/components/dashboard/Visualize/VisualizeOutlet.tsx
index dda283473..787046616 100644
--- a/ui/frontend/src/components/dashboard/Visualize/VisualizeOutlet.tsx
+++ b/ui/frontend/src/components/dashboard/Visualize/VisualizeOutlet.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { useData as useDashboardData } from "../Dashboard";
import { VisualizeDAG } from "./DAGViz";
import { VizType } from "./types";
diff --git a/ui/frontend/src/components/dashboard/Visualize/VizConsole.tsx b/ui/frontend/src/components/dashboard/Visualize/VizConsole.tsx
index a1edc4beb..b0991db83 100644
--- a/ui/frontend/src/components/dashboard/Visualize/VizConsole.tsx
+++ b/ui/frontend/src/components/dashboard/Visualize/VizConsole.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import dracula from "prism-react-renderer/themes/dracula";
import Highlight, { defaultProps } from "prism-react-renderer";
diff --git a/ui/frontend/src/components/dashboard/Welcome.tsx b/ui/frontend/src/components/dashboard/Welcome.tsx
index 496ea165a..df02418cd 100644
--- a/ui/frontend/src/components/dashboard/Welcome.tsx
+++ b/ui/frontend/src/components/dashboard/Welcome.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { IconType } from "react-icons";
import {
AiOutlinePhone,
diff --git a/ui/frontend/src/components/notimplemented/NotImplemented.tsx b/ui/frontend/src/components/notimplemented/NotImplemented.tsx
index b51f7d454..fe77e7f2b 100644
--- a/ui/frontend/src/components/notimplemented/NotImplemented.tsx
+++ b/ui/frontend/src/components/notimplemented/NotImplemented.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { useLocation } from "react-router-dom";
interface LocationState {
diff --git a/ui/frontend/src/components/tutorial/HelpVideo.tsx b/ui/frontend/src/components/tutorial/HelpVideo.tsx
index 4597917bd..b9ac0d99e 100644
--- a/ui/frontend/src/components/tutorial/HelpVideo.tsx
+++ b/ui/frontend/src/components/tutorial/HelpVideo.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
// List of help videos
export const HelpVideos = {
PROJECT_SELECTOR: "d6787ecc66794ad8b3d25023d58e1751", // Referred to in the project selector on the main page
diff --git a/ui/frontend/src/index.tsx b/ui/frontend/src/index.tsx
index 33b914d63..11dd77bde 100644
--- a/ui/frontend/src/index.tsx
+++ b/ui/frontend/src/index.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import ReactDOM from "react-dom/client";
import "./index.css";
import { App } from "./App";
diff --git a/ui/frontend/src/state/urlState.tsx b/ui/frontend/src/state/urlState.tsx
index ee2e94aac..efd029e5c 100644
--- a/ui/frontend/src/state/urlState.tsx
+++ b/ui/frontend/src/state/urlState.tsx
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { useParams } from "react-router-dom";
import { parseListOfInts } from "../utils/parsing";
diff --git a/ui/run.sh b/ui/run.sh
index e93e196cd..4ea40b928 100755
--- a/ui/run.sh
+++ b/ui/run.sh
@@ -1,4 +1,21 @@
#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
. common.sh
diff --git a/ui/sdk/README.md b/ui/sdk/README.md
index c51f7ba08..af067b3bf 100644
--- a/ui/sdk/README.md
+++ b/ui/sdk/README.md
@@ -1,3 +1,22 @@
+
+
# Apache Hamilton UI SDK: Client Code & Related
> **Disclaimer**
diff --git a/ui/sdk/developer_setup.md b/ui/sdk/developer_setup.md
index 9fcaf5bc2..c71b041ba 100644
--- a/ui/sdk/developer_setup.md
+++ b/ui/sdk/developer_setup.md
@@ -1,3 +1,22 @@
+
+
# Developer/Contributor Setup
## Repo organization
diff --git a/ui/sdk/src/hamilton_sdk/adapters.py b/ui/sdk/src/hamilton_sdk/adapters.py
index 2e969f828..b45757c79 100644
--- a/ui/sdk/src/hamilton_sdk/adapters.py
+++ b/ui/sdk/src/hamilton_sdk/adapters.py
@@ -22,6 +22,13 @@
import random
import traceback
from datetime import timezone
+
+# Compatibility for Python < 3.11
+try:
+ from datetime import UTC
+except ImportError:
+ UTC = timezone.utc
+
from types import ModuleType
from typing import Any, Callable, Dict, List, Optional, Union
@@ -199,7 +206,7 @@ def pre_node_execute(
in_sample = self.is_in_sample(task_id)
task_run = TaskRun(node_name=node_.name, is_in_sample=in_sample)
task_run.status = Status.RUNNING
- task_run.start_time = datetime.datetime.now(timezone.utc)
+ task_run.start_time = datetime.datetime.now(UTC)
tracking_state.update_task(node_.name, task_run)
self.task_runs[run_id][node_.name] = task_run
@@ -277,7 +284,7 @@ def post_node_execute(
logger.debug("post_node_execute %s %s", run_id, task_id)
task_run: TaskRun = self.task_runs[run_id][node_.name]
tracking_state = self.tracking_states[run_id]
- task_run.end_time = datetime.datetime.now(timezone.utc)
+ task_run.end_time = datetime.datetime.now(UTC)
other_results = []
if success:
@@ -368,7 +375,7 @@ def post_graph_execute(
dw_run_id = self.dw_run_ids[run_id]
tracking_state = self.tracking_states[run_id]
tracking_state.clock_end(status=Status.SUCCESS if success else Status.FAILURE)
- finally_block_time = datetime.datetime.utcnow()
+ finally_block_time = datetime.datetime.now(UTC)
if tracking_state.status != Status.SUCCESS:
# TODO: figure out how to handle crtl+c stuff
# -- we are at the mercy of Hamilton here.
@@ -526,7 +533,7 @@ async def pre_node_execute(
task_run = TaskRun(node_name=node_.name)
task_run.status = Status.RUNNING
- task_run.start_time = datetime.datetime.now(timezone.utc)
+ task_run.start_time = datetime.datetime.now(UTC)
tracking_state.update_task(node_.name, task_run)
self.task_runs[run_id][node_.name] = task_run
@@ -558,7 +565,7 @@ async def post_node_execute(
logger.debug("post_node_execute %s", run_id)
task_run = self.task_runs[run_id][node_.name]
tracking_state = self.tracking_states[run_id]
- task_run.end_time = datetime.datetime.now(timezone.utc)
+ task_run.end_time = datetime.datetime.now(UTC)
other_results = []
if success:
@@ -644,7 +651,7 @@ async def post_graph_execute(
dw_run_id = self.dw_run_ids[run_id]
tracking_state = self.tracking_states[run_id]
tracking_state.clock_end(status=Status.SUCCESS if success else Status.FAILURE)
- finally_block_time = datetime.datetime.utcnow()
+ finally_block_time = datetime.datetime.now(UTC)
if tracking_state.status != Status.SUCCESS:
# TODO: figure out how to handle crtl+c stuff
tracking_state.status = Status.FAILURE
diff --git a/ui/sdk/src/hamilton_sdk/api/clients.py b/ui/sdk/src/hamilton_sdk/api/clients.py
index 168984379..fff954590 100644
--- a/ui/sdk/src/hamilton_sdk/api/clients.py
+++ b/ui/sdk/src/hamilton_sdk/api/clients.py
@@ -19,6 +19,14 @@
import asyncio
import atexit
import datetime
+from datetime import timezone
+
+# Compatibility for Python < 3.11
+try:
+ from datetime import UTC
+except ImportError:
+ UTC = timezone.utc
+
import functools
import logging
import queue
@@ -486,7 +494,7 @@ def create_and_start_dag_run(
headers=self._common_headers(),
json=make_json_safe(
{
- "run_start_time": datetime.datetime.utcnow(), # TODO -- ensure serializable
+ "run_start_time": datetime.datetime.now(UTC), # TODO -- ensure serializable
"tags": tags,
# TODO: make the following replace with summary stats if it's large data, e.g. dataframes.
"inputs": make_json_safe(inputs), # TODO -- ensure serializable
@@ -533,7 +541,7 @@ def log_dag_run_end(self, dag_run_id: int, status: str):
logger.debug(f"Logging end of DAG run {dag_run_id} with status {status}")
response = requests.put(
f"{self.base_url}/dag_runs/{dag_run_id}/",
- json=make_json_safe({"run_status": status, "run_end_time": datetime.datetime.utcnow()}),
+ json=make_json_safe({"run_status": status, "run_end_time": datetime.datetime.now(UTC)}),
headers=self._common_headers(),
verify=self.verify,
)
@@ -823,7 +831,7 @@ async def create_and_start_dag_run(
f"{self.base_url}/dag_runs?dag_template_id={dag_template_id}",
json=make_json_safe(
{
- "run_start_time": datetime.datetime.utcnow(), # TODO -- ensure serializable
+ "run_start_time": datetime.datetime.now(UTC), # TODO -- ensure serializable
"tags": tags,
# TODO: make the following replace with summary stats if it's large data, e.g. dataframes.
"inputs": make_json_safe(inputs), # TODO -- ensure serializable
@@ -862,7 +870,7 @@ async def update_tasks(
async def log_dag_run_end(self, dag_run_id: int, status: str):
logger.debug(f"Logging end of DAG run {dag_run_id} with status {status}")
url = f"{self.base_url}/dag_runs/{dag_run_id}/"
- data = make_json_safe({"run_status": status, "run_end_time": datetime.datetime.utcnow()})
+ data = make_json_safe({"run_status": status, "run_end_time": datetime.datetime.now(UTC)})
headers = self._common_headers()
async with aiohttp.ClientSession() as session:
async with session.put(url, json=data, headers=headers, ssl=self.ssl) as response:
diff --git a/ui/sdk/src/hamilton_sdk/driver.py b/ui/sdk/src/hamilton_sdk/driver.py
index 416463edb..6a9966905 100644
--- a/ui/sdk/src/hamilton_sdk/driver.py
+++ b/ui/sdk/src/hamilton_sdk/driver.py
@@ -16,6 +16,14 @@
# under the License.
import datetime
+from datetime import timezone
+
+# Compatibility for Python < 3.11
+try:
+ from datetime import UTC
+except ImportError:
+ UTC = timezone.utc
+
import hashlib
import inspect
import json
@@ -835,7 +843,7 @@ def execute(
tracking_state.clock_end(status=Status.FAILURE)
raise e
finally:
- finally_block_time = datetime.datetime.utcnow()
+ finally_block_time = datetime.datetime.now(UTC)
if tracking_state.status != Status.SUCCESS:
tracking_state.status = Status.FAILURE
# this assumes the task map only has things that have been processed, not
diff --git a/ui/sdk/src/hamilton_sdk/tracking/polars_col_stats.py b/ui/sdk/src/hamilton_sdk/tracking/polars_col_stats.py
index e10485675..c4ff96307 100644
--- a/ui/sdk/src/hamilton_sdk/tracking/polars_col_stats.py
+++ b/ui/sdk/src/hamilton_sdk/tracking/polars_col_stats.py
@@ -48,6 +48,9 @@ def zeros(col: pl.Series) -> int:
except ValueError:
# e.g. comparing datetime
return 0
+ except NotImplementedError:
+ # Polars 1.0+ raises NotImplementedError for Date types
+ return 0
if str(result) == "NotImplemented":
return 0
return result.sum()
@@ -92,7 +95,9 @@ def histogram(col: pl.Series, num_hist_bins: int = 10) -> Dict[str, int]:
except pl.InvalidOperationError:
# happens for Date data types. TODO: convert them to numeric so we can get a histogram.
return {}
- return dict(zip(hist_dict["category"], hist_dict["count"]))
+ # Sort by category to ensure consistent ordering across Python versions
+ result = dict(zip(hist_dict["category"], hist_dict["count"]))
+ return dict(sorted(result.items()))
def numeric_column_stats(
@@ -139,11 +144,12 @@ def datetime_column_stats(
histogram: Dict[str, int],
) -> dfs.DatetimeColumnStatistics:
# TODO: push these conversions into Hamilton functions.
- min = min.isoformat() if isinstance(min, (pl.Date, pl.Datetime, datetime.date)) else min
- max = max.isoformat() if isinstance(max, (pl.Date, pl.Datetime, datetime.date)) else max
- mean = mean.isoformat() if isinstance(mean, (pl.Date, pl.Datetime, datetime.date)) else mean
+ # Note: datetime.datetime is a subclass of datetime.date, so checking datetime.date catches both
+ min = min.isoformat() if isinstance(min, datetime.date) else min
+ max = max.isoformat() if isinstance(max, datetime.date) else max
+ mean = mean.isoformat() if isinstance(mean, datetime.date) else mean
quantiles = {
- q: v if not isinstance(v, pl.Datetime) else v.isoformat() for q, v in quantiles.items()
+ q: v.isoformat() if isinstance(v, datetime.date) else v for q, v in quantiles.items()
}
return dfs.DatetimeColumnStatistics(
name=name,
diff --git a/ui/sdk/src/hamilton_sdk/tracking/polars_stats.py b/ui/sdk/src/hamilton_sdk/tracking/polars_stats.py
index 38357c8d1..d9332855d 100644
--- a/ui/sdk/src/hamilton_sdk/tracking/polars_stats.py
+++ b/ui/sdk/src/hamilton_sdk/tracking/polars_stats.py
@@ -18,6 +18,7 @@
from typing import Any, Dict
import polars as pl
+from polars import selectors
if not hasattr(pl, "Series"):
raise ImportError("Polars is not installed")
@@ -54,10 +55,10 @@ def _compute_stats(df: pl.DataFrame) -> Dict[str, Dict[str, Any]]:
"""
category_types = df.select([pl.col(pl.Categorical)])
string_types = df.select([pl.col(pl.Utf8)])
- numeric_types = df.select([pl.col(pl.NUMERIC_DTYPES)])
+ numeric_types = df.select(selectors.numeric())
bool_types = df.select([pl.col(pl.Boolean)])
# df.select([pl.col(pl.Object)])
- date_types = df.select([pl.col(pl.TEMPORAL_DTYPES)])
+ date_types = df.select(selectors.temporal())
# get all other columns that have not been selected
# df.select(
# ~cs.by_dtype([pl.Categorical, pl.Utf8, pl.Boolean, pl.Object])
diff --git a/ui/sdk/src/hamilton_sdk/tracking/pydantic_stats.py b/ui/sdk/src/hamilton_sdk/tracking/pydantic_stats.py
index f186e380b..249447bce 100644
--- a/ui/sdk/src/hamilton_sdk/tracking/pydantic_stats.py
+++ b/ui/sdk/src/hamilton_sdk/tracking/pydantic_stats.py
@@ -28,7 +28,7 @@ def compute_stats_pydantic(
if hasattr(result, "dump_model"):
llm_result = result.dump_model()
else:
- llm_result = result.dict()
+ llm_result = result.model_dump()
return {
"observability_type": "dict",
"observability_value": {
diff --git a/ui/sdk/src/hamilton_sdk/tracking/runs.py b/ui/sdk/src/hamilton_sdk/tracking/runs.py
index 2d4bce7aa..7487dcbfb 100644
--- a/ui/sdk/src/hamilton_sdk/tracking/runs.py
+++ b/ui/sdk/src/hamilton_sdk/tracking/runs.py
@@ -23,6 +23,13 @@
import traceback
from contextlib import contextmanager
from datetime import datetime, timezone
+
+# Compatibility for Python < 3.11
+try:
+ from datetime import UTC
+except ImportError:
+ UTC = timezone.utc
+
from typing import Any, Callable, Dict, List, Optional, Tuple
from hamilton_sdk.tracking import constants, data_observation
@@ -128,12 +135,12 @@ def clock_start(self):
"""Called at start of run"""
logger.info("Clocked beginning of run")
self.status = Status.RUNNING
- self.start_time = datetime.now(timezone.utc)
+ self.start_time = datetime.now(UTC)
def clock_end(self, status: Status):
"""Called at end of run"""
logger.info(f"Clocked end of run with status: {status}")
- self.end_time = datetime.now(timezone.utc)
+ self.end_time = datetime.now(UTC)
self.status = status
def update_task(self, task_name: str, task_run: TaskRun):
@@ -226,7 +233,7 @@ def execute_node(
task_run = TaskRun(node_name=node_.name) # node run.
task_run.status = Status.RUNNING
- task_run.start_time = datetime.now(timezone.utc)
+ task_run.start_time = datetime.now(UTC)
self.tracking_state.update_task(node_.name, task_run)
try:
result = original_do_node_execute(run_id, node_, kwargs, task_id)
@@ -239,13 +246,13 @@ def execute_node(
task_run.status = Status.SUCCESS
task_run.result_type = type(result)
task_run.result_summary = result_summary
- task_run.end_time = datetime.now(timezone.utc)
+ task_run.end_time = datetime.now(UTC)
self.tracking_state.update_task(node_.name, task_run)
logger.debug(f"Node: {node_.name} ran successfully")
return result
except dq_base.DataValidationError as e:
task_run.status = Status.FAILURE
- task_run.end_time = datetime.now(timezone.utc)
+ task_run.end_time = datetime.now(UTC)
task_run.error = serialize_data_quality_error(e)
self.tracking_state.update_status(Status.FAILURE)
self.tracking_state.update_task(node_.name, task_run)
@@ -253,7 +260,7 @@ def execute_node(
raise e
except Exception as e:
task_run.status = Status.FAILURE
- task_run.end_time = datetime.now(timezone.utc)
+ task_run.end_time = datetime.now(UTC)
task_run.error = serialize_error()
self.tracking_state.update_status(Status.FAILURE)
self.tracking_state.update_task(node_.name, task_run)
diff --git a/ui/sdk/tests/test_driver.py b/ui/sdk/tests/test_driver.py
index f32180aaf..b59ff5e07 100644
--- a/ui/sdk/tests/test_driver.py
+++ b/ui/sdk/tests/test_driver.py
@@ -50,7 +50,7 @@ def test_hash_module_simple():
seen_modules = set()
result = _hash_module(subpackage, hash_object, seen_modules)
- assert result.hexdigest() == "3d364e2761d96875e11d0f862c2a5d7299f059ebe429deb94f2112ac243f080f"
+ assert result.hexdigest() == "7dc5ec7dcfae665257eaae7bdde971da914677e26777ee83c5a3080e824e8d0d"
assert len(seen_modules) == 1
assert {m.__name__ for m in seen_modules} == {"tests.test_package_to_hash.subpackage"}
@@ -63,7 +63,7 @@ def test_hash_module_with_subpackage():
seen_modules = set()
result = _hash_module(submodule1, hash_object, seen_modules)
- assert result.hexdigest() == "4466d1f61b2c57c2b5bfe8a9fec09acd53befcfdf2f5720075aef83e3d6c6bf8"
+ assert result.hexdigest() == "b634731cc3037f628e37e91522871245c7f6b2fe9ffad5f0715e7e33324f1b65"
assert len(seen_modules) == 2
assert {m.__name__ for m in seen_modules} == {
"tests.test_package_to_hash.subpackage",
@@ -79,7 +79,7 @@ def test_hash_module_complex():
seen_modules = set()
result = _hash_module(test_package_to_hash, hash_object, seen_modules)
- assert result.hexdigest() == "c22023a4fdc8564de1cda70d05a19d5e8c0ddaaa9dcccf644a2b789b80f19896"
+ assert result.hexdigest() == "d91d96366991a8e8aee244c6f72aa7d27f5a9badfae2ab79c1f62694ac9e9fb2"
assert len(seen_modules) == 4
assert {m.__name__ for m in seen_modules} == {
"tests.test_package_to_hash",
diff --git a/ui/sdk/tests/tracking/test_ibis_stats.py b/ui/sdk/tests/tracking/test_ibis_stats.py
index dd4dc6ea4..f383d7ad9 100644
--- a/ui/sdk/tests/tracking/test_ibis_stats.py
+++ b/ui/sdk/tests/tracking/test_ibis_stats.py
@@ -26,7 +26,7 @@ def test_compute_stats_ibis_table():
columns=["one", "two", "three"],
index=[5, 6],
)
- result = ibis.memtable(df, name="t")
+ result = ibis.memtable(df)
# result = Table({"a": "int", "b": "string"})
node_name = "test_node"
node_tags = {}
diff --git a/ui/sdk/tests/tracking/test_polars_stats.py b/ui/sdk/tests/tracking/test_polars_stats.py
index 141e4d90d..9db8e7884 100644
--- a/ui/sdk/tests/tracking/test_polars_stats.py
+++ b/ui/sdk/tests/tracking/test_polars_stats.py
@@ -27,7 +27,7 @@ def test_compute_stats_df():
"b": ["a", "b", "c", "d", "e"],
"c": [True, False, True, False, True],
"d": [1.0, 2.0, 3.0, 4.0, 5.0],
- "e": pl.Series(["a", "b", "c", "d", "e"], dtype=pl.Categorical),
+ "e": pl.Series(["a", "a", "b", "c", "d"], dtype=pl.Categorical),
"f": pl.Series(["a", "b", "c", "d", "e"], dtype=pl.Utf8),
"g": pl.Series(["a", "b", "c", "d", "e"], dtype=pl.Object),
"h": pl.Series(
@@ -47,7 +47,6 @@ def test_compute_stats_df():
"count": 5,
"data_type": "Int64",
"histogram": {
- "[1.0, 1.4]": 1,
"(1.4, 1.8]": 0,
"(1.8, 2.2]": 1,
"(2.2, 2.6]": 0,
@@ -57,6 +56,7 @@ def test_compute_stats_df():
"(3.8, 4.2]": 1,
"(4.2, 4.6]": 0,
"(4.6, 5.0]": 1,
+ "[1.0, 1.4]": 1,
},
"max": 5,
"mean": 3.0,
@@ -93,7 +93,6 @@ def test_compute_stats_df():
"count": 5,
"data_type": "Float64",
"histogram": {
- "[1.0, 1.4]": 1,
"(1.4, 1.8]": 0,
"(1.8, 2.2]": 1,
"(2.2, 2.6]": 0,
@@ -103,6 +102,7 @@ def test_compute_stats_df():
"(3.8, 4.2]": 1,
"(4.2, 4.6]": 0,
"(4.6, 5.0]": 1,
+ "[1.0, 1.4]": 1,
},
"max": 5.0,
"mean": 3.0,
@@ -117,15 +117,15 @@ def test_compute_stats_df():
"e": {
"base_data_type": "category",
"count": 5,
- "data_type": "Categorical(ordering='physical')",
- "domain": {"a": 1, "b": 1, "c": 1, "d": 1, "e": 1},
+ "data_type": "Categorical",
+ "domain": {"a": 2, "b": 1, "c": 1, "d": 1},
"empty": 0,
"missing": 0,
"name": "e",
"pos": 4,
- "top_freq": 1,
+ "top_freq": 2,
"top_value": "a",
- "unique": 5,
+ "unique": 4,
},
"f": {
"avg_str_len": 1.0,
@@ -157,7 +157,13 @@ def test_compute_stats_df():
"missing": 0,
"name": "h",
"pos": 7,
- "quantiles": {},
+ "quantiles": {
+ 0.1: "2024-01-01T00:00:00",
+ 0.25: "2024-01-03T00:00:00",
+ 0.5: "2024-01-06T00:00:00",
+ 0.75: "2024-01-10T00:00:00",
+ 0.9: "2024-01-14T00:00:00",
+ },
"std": 0.0,
"zeros": 0,
},
@@ -187,7 +193,13 @@ def test_compute_stats_df():
"missing": 0,
"name": "j",
"pos": 9,
- "quantiles": {},
+ "quantiles": {
+ 0.1: "2022-01-01T00:00:00",
+ 0.25: "2022-02-01T00:00:00",
+ 0.5: "2022-03-01T00:00:00",
+ 0.75: "2022-04-01T00:00:00",
+ 0.9: "2022-05-01T00:00:00",
+ },
"std": 0.0,
"zeros": 0,
},
diff --git a/ui/sdk/tests/tracking/test_pydantic_stats.py b/ui/sdk/tests/tracking/test_pydantic_stats.py
index 5059a840c..a6adfc4bc 100644
--- a/ui/sdk/tests/tracking/test_pydantic_stats.py
+++ b/ui/sdk/tests/tracking/test_pydantic_stats.py
@@ -19,12 +19,12 @@
from pydantic import BaseModel
-class TestModel(BaseModel):
+class ModelTest(BaseModel):
name: str
value: int
-class TestModel2(BaseModel):
+class ModelTest2(BaseModel):
name: str
value: int
@@ -37,7 +37,7 @@ class EmptyModel(BaseModel):
def test_compute_stats_df_with_dump_model():
- model = TestModel2(name="test", value=2)
+ model = ModelTest2(name="test", value=2)
result = pydantic_stats.compute_stats_pydantic(model, "node1", {"tag1": "value1"})
assert result["observability_type"] == "dict"
assert result["observability_value"]["type"] == str(type(model))
@@ -46,7 +46,7 @@ def test_compute_stats_df_with_dump_model():
def test_compute_stats_df_without_dump_model():
- model = TestModel(name="test", value=1)
+ model = ModelTest(name="test", value=1)
result = pydantic_stats.compute_stats_pydantic(model, "node1", {"tag1": "value1"})
assert result["observability_type"] == "dict"
assert result["observability_value"]["type"] == str(type(model))
diff --git a/ui/stop.sh b/ui/stop.sh
index 0b7fb7f9a..71f746066 100755
--- a/ui/stop.sh
+++ b/ui/stop.sh
@@ -1,4 +1,21 @@
#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
. common.sh
diff --git a/writeups/basics.md b/writeups/basics.md
index e848ea590..33e4b341c 100644
--- a/writeups/basics.md
+++ b/writeups/basics.md
@@ -1,3 +1,22 @@
+
+
# Apache Hamilton Basics
There are two parts to Apache Hamilton:
diff --git a/writeups/data_quality.md b/writeups/data_quality.md
index 3c5ce9f27..6dfd4d98e 100644
--- a/writeups/data_quality.md
+++ b/writeups/data_quality.md
@@ -1,3 +1,22 @@
+
+
# Data Quality
Apache Hamilton has a simple but powerful data quality capability. This enables you to write functions
diff --git a/writeups/decorators.md b/writeups/decorators.md
index 89ebf4622..33619bbd5 100644
--- a/writeups/decorators.md
+++ b/writeups/decorators.md
@@ -1,3 +1,22 @@
+
+
# Decorators
While the 1:1 mapping of column -> function implementation is powerful, we've implemented a few decorators to promote
diff --git a/writeups/developer_setup.md b/writeups/developer_setup.md
index 7a8591651..0af38927e 100644
--- a/writeups/developer_setup.md
+++ b/writeups/developer_setup.md
@@ -1,3 +1,22 @@
+
+
# Developer/Contributor Setup
## Repo organization
diff --git a/writeups/garbage_collection/post.md b/writeups/garbage_collection/post.md
index 8044d1e29..b4fa7bb4c 100644
--- a/writeups/garbage_collection/post.md
+++ b/writeups/garbage_collection/post.md
@@ -1,3 +1,22 @@
+
+
# On Garbage Collection and Memory Optimization in Apache Hamilton
## A chance to nerd out