Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .license-header.txt

This file was deleted.

44 changes: 44 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright/license header enforcement via skywalking-eyes.
# Docs: https://github.com/apache/skywalking-eyes
#
# Run locally (same image the pre-commit hook uses):
# docker run --rm -v "$PWD:/src" --workdir /src \
# apache/skywalking-eyes:0.8.0 -c .licenserc.yaml header check
# docker run --rm -v "$PWD:/src" --workdir /src \
# apache/skywalking-eyes:0.8.0 -c .licenserc.yaml header fix
#
# Notebooks (*.ipynb) are handled by the companion `insert-license-notebooks`
# pre-commit hook: skywalking-eyes cannot process notebooks, so license-eye
# ignores them here.
#
# The `pattern` matches the previous two-line SPDX header so `header fix`
# rewrites it to the full Apache-2.0 notice instead of double-stamping.
header:
license:
spdx-id: Apache-2.0
copyright-owner: DataRobot, Inc.
content: |
Copyright 2026 DataRobot, Inc. and its affiliates.

Licensed 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.
pattern: |
Copyright \(c\) \d{4} DataRobot, Inc\.
SPDX-License-Identifier: Apache-2\.0
paths:
- '**/*.py'
paths-ignore:
- '**/*.ipynb'
- '.venv/**'
- '**/.venv/**'
- 'build/**'
- 'dist/**'
13 changes: 10 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ repos:
- repo: local
hooks:
- id: insert-license
name: insert license header (python + notebooks)
entry: uv run python scripts/insert_license.py --license-filepath .license-header.txt
name: insert license header (python)
entry: apache/skywalking-eyes:0.8.0 -c .licenserc.yaml header fix
language: docker_image
pass_filenames: false
require_serial: true
always_run: true
- id: insert-license-notebooks
name: insert license header (notebooks)
entry: uv run python scripts/insert_license_notebooks.py
language: system
types_or: [python, jupyter]
types: [jupyter]
- id: commitizen
name: conventional commit message
entry: uv run cz check --commit-msg-file
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ Use `forecast_samples(...)` for sampled trajectories or `forecast_quantiles(...)
- `task release`: cut a SemVer release with Commitizen (writes `CHANGELOG.md`, bumps versions, creates tag)
- `task pre-commit`: run every configured pre-commit hook

Contributors do not need to add copyright or license headers to new Python files manually. The `insert-license` pre-commit hook stamps the standard SPDX header (`Copyright (c) 2026 DataRobot, Inc.` + `SPDX-License-Identifier: Apache-2.0`) into every `.py` file the first time you run `task pre-commit`. Verify the headers are present at any time with `task license-check`.
Contributors do not need to add copyright or license headers manually. The `insert-license` pre-commit hook runs [skywalking-eyes](https://github.com/apache/skywalking-eyes) (via the `apache/skywalking-eyes` Docker image, so a running Docker daemon is required) to stamp the standard Apache-2.0 header (`Copyright 2026 DataRobot, Inc. and its affiliates.` followed by the standard "Licensed under the Apache License, Version 2.0" notice) into every `.py` file, and the companion `insert-license-notebooks` hook stamps the same notice into a leading markdown cell of every notebook the first time you run `task pre-commit`. Verify the headers are present at any time with `task license-check`.

## Versioning & Commits

Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ tasks:

license-check:
desc: Verify every Python source file has the required copyright/SPDX header
cmd: uv run ruff check --preview --select CPY001 --extend-exclude '*.ipynb' .
cmd: docker run --rm -v "$PWD:/src" --workdir /src apache/skywalking-eyes:0.8.0 -c .licenserc.yaml header check

format:
desc: Run Ruff formatter (rewrites files in place)
Expand Down
16 changes: 13 additions & 3 deletions notebooks/forecast_csv.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@
"language": "markdown"
},
"source": [
"Copyright (c) 2026 DataRobot, Inc.\n",
"Copyright 2026 DataRobot, Inc. and its affiliates.\n",
"\n",
"SPDX-License-Identifier: Apache-2.0"
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"you may not use this file except in compliance with the License.\n",
"You may obtain a copy of the License at\n",
"\n",
" http://www.apache.org/licenses/LICENSE-2.0\n",
"\n",
"Unless required by applicable law or agreed to in writing, software\n",
"distributed under the License is distributed on an \"AS IS\" BASIS,\n",
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
"See the License for the specific language governing permissions and\n",
"limitations under the License."
]
},
{
Expand Down Expand Up @@ -129,7 +139,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "joint-client-python (3.13.3)",
"display_name": "joint-client-python (3.13.3.final.0)",
"language": "python",
"name": "python3"
},
Expand Down
16 changes: 13 additions & 3 deletions notebooks/forecast_mean.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@
"language": "markdown"
},
"source": [
"Copyright (c) 2026 DataRobot, Inc.\n",
"Copyright 2026 DataRobot, Inc. and its affiliates.\n",
"\n",
"SPDX-License-Identifier: Apache-2.0"
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"you may not use this file except in compliance with the License.\n",
"You may obtain a copy of the License at\n",
"\n",
" http://www.apache.org/licenses/LICENSE-2.0\n",
"\n",
"Unless required by applicable law or agreed to in writing, software\n",
"distributed under the License is distributed on an \"AS IS\" BASIS,\n",
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
"See the License for the specific language governing permissions and\n",
"limitations under the License."
]
},
{
Expand Down Expand Up @@ -94,7 +104,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "joint-client-python (3.13.3)",
"display_name": "joint-client-python (3.13.3.final.0)",
"language": "python",
"name": "python3"
},
Expand Down
16 changes: 13 additions & 3 deletions notebooks/forecast_quantiles.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@
"language": "markdown"
},
"source": [
"Copyright (c) 2026 DataRobot, Inc.\n",
"Copyright 2026 DataRobot, Inc. and its affiliates.\n",
"\n",
"SPDX-License-Identifier: Apache-2.0"
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"you may not use this file except in compliance with the License.\n",
"You may obtain a copy of the License at\n",
"\n",
" http://www.apache.org/licenses/LICENSE-2.0\n",
"\n",
"Unless required by applicable law or agreed to in writing, software\n",
"distributed under the License is distributed on an \"AS IS\" BASIS,\n",
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
"See the License for the specific language governing permissions and\n",
"limitations under the License."
]
},
{
Expand Down Expand Up @@ -96,7 +106,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "joint-client-python (3.13.3)",
"display_name": "joint-client-python (3.13.3.final.0)",
"language": "python",
"name": "python3"
},
Expand Down
16 changes: 13 additions & 3 deletions notebooks/forecast_samples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@
"language": "markdown"
},
"source": [
"Copyright (c) 2026 DataRobot, Inc.\n",
"Copyright 2026 DataRobot, Inc. and its affiliates.\n",
"\n",
"SPDX-License-Identifier: Apache-2.0"
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"you may not use this file except in compliance with the License.\n",
"You may obtain a copy of the License at\n",
"\n",
" http://www.apache.org/licenses/LICENSE-2.0\n",
"\n",
"Unless required by applicable law or agreed to in writing, software\n",
"distributed under the License is distributed on an \"AS IS\" BASIS,\n",
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
"See the License for the specific language governing permissions and\n",
"limitations under the License."
]
},
{
Expand Down Expand Up @@ -96,7 +106,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "joint-client-python (3.13.3)",
"display_name": "joint-client-python (3.13.3.final.0)",
"language": "python",
"name": "python3"
},
Expand Down
16 changes: 13 additions & 3 deletions notebooks/forecast_trading.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@
"language": "markdown"
},
"source": [
"Copyright (c) 2026 DataRobot, Inc.\n",
"Copyright 2026 DataRobot, Inc. and its affiliates.\n",
"\n",
"SPDX-License-Identifier: Apache-2.0"
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"you may not use this file except in compliance with the License.\n",
"You may obtain a copy of the License at\n",
"\n",
" http://www.apache.org/licenses/LICENSE-2.0\n",
"\n",
"Unless required by applicable law or agreed to in writing, software\n",
"distributed under the License is distributed on an \"AS IS\" BASIS,\n",
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
"See the License for the specific language governing permissions and\n",
"limitations under the License."
]
},
{
Expand Down Expand Up @@ -517,7 +527,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "joint-client-python (3.13.3)",
"display_name": "joint-client-python (3.13.3.final.0)",
"language": "python",
"name": "python3"
},
Expand Down
18 changes: 14 additions & 4 deletions notebooks/pandas_result_conversion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@
"language": "markdown"
},
"source": [
"Copyright (c) 2026 DataRobot, Inc.\n",
"Copyright 2026 DataRobot, Inc. and its affiliates.\n",
"\n",
"SPDX-License-Identifier: Apache-2.0"
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"you may not use this file except in compliance with the License.\n",
"You may obtain a copy of the License at\n",
"\n",
" http://www.apache.org/licenses/LICENSE-2.0\n",
"\n",
"Unless required by applicable law or agreed to in writing, software\n",
"distributed under the License is distributed on an \"AS IS\" BASIS,\n",
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
"See the License for the specific language governing permissions and\n",
"limitations under the License."
]
},
{
Expand Down Expand Up @@ -65,7 +75,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "jointfm-client (3.14.0)",
"display_name": "joint-client-python (3.13.3.final.0)",
"language": "python",
"name": "python3"
},
Expand All @@ -79,7 +89,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.0"
"version": "3.13.3"
}
},
"nbformat": 4,
Expand Down
14 changes: 12 additions & 2 deletions notebooks/predict_json.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@
"language": "markdown"
},
"source": [
"Copyright (c) 2026 DataRobot, Inc.\n",
"Copyright 2026 DataRobot, Inc. and its affiliates.\n",
"\n",
"SPDX-License-Identifier: Apache-2.0"
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"you may not use this file except in compliance with the License.\n",
"You may obtain a copy of the License at\n",
"\n",
" http://www.apache.org/licenses/LICENSE-2.0\n",
"\n",
"Unless required by applicable law or agreed to in writing, software\n",
"distributed under the License is distributed on an \"AS IS\" BASIS,\n",
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
"See the License for the specific language governing permissions and\n",
"limitations under the License."
]
},
{
Expand Down
14 changes: 12 additions & 2 deletions notebooks/service_health.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@
"language": "markdown"
},
"source": [
"Copyright (c) 2026 DataRobot, Inc.\n",
"Copyright 2026 DataRobot, Inc. and its affiliates.\n",
"\n",
"SPDX-License-Identifier: Apache-2.0"
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"you may not use this file except in compliance with the License.\n",
"You may obtain a copy of the License at\n",
"\n",
" http://www.apache.org/licenses/LICENSE-2.0\n",
"\n",
"Unless required by applicable law or agreed to in writing, software\n",
"distributed under the License is distributed on an \"AS IS\" BASIS,\n",
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
"See the License for the specific language governing permissions and\n",
"limitations under the License."
]
},
{
Expand Down
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ select = ["D100", "D101", "D102", "D103"]
[tool.ruff.lint.per-file-ignores]
"notebooks/**/tests/**" = ["D100", "D101", "D102", "D103"]

[tool.ruff.lint.flake8-copyright]
notice-rgx = "(?i)Copyright \\(c\\) \\d{4}"
author = "DataRobot, Inc."

[tool.commitizen]
name = "cz_conventional_commits"
version = "0.1.0"
Expand Down
Loading
Loading