Skip to content

Commit eca2f4b

Browse files
validbecknrichers
andauthored
notebook templates & scripts: Append copyright & copyright verification/update (#467)
* Updating copyright template * Updating notebooks with new wording * Cell ID * Copyright cell comment * Renaming mini-templates * Save point * Updating cells with comments * Save point * Copyright insertion test * Save point * Save point * Updating README * Testing notebook copyright script * Save point * Ran the script * Updating with cell ID * Rerunning script * Combining script & README instructions * Editing returns * Editing READMEs * Verification script * Save point * Update notebooks/templates/_copyright.ipynb Co-authored-by: Nik Richers <nik@validmind.ai> * Reverting weird changes to load.py * Updating notebooks with simplified license * Switch template script to use Cursor * Testing editor detection * Tweak * Tweak 2 * Remove debugging info * Revert validmind/tests/ to main? --------- Co-authored-by: Nik Richers <nik@validmind.ai>
1 parent 1294af4 commit eca2f4b

89 files changed

Lines changed: 8507 additions & 7644 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ generate-test-id-types:
7777

7878
copyright:
7979
poetry run python scripts/copyright_files.py
80+
poetry run python scripts/copyright_notebooks.py
8081

8182
verify-copyright:
8283
poetry run python scripts/verify_copyright.py
84+
poetry run python scripts/verify_notebook_copyright.py
8385

8486
verify-exposed-credentials:
8587
poetry run python scripts/credentials_check.py

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ poetry run python scripts/add_test_description.py review validmind/tests/ongoing
161161

162162
## Adding a copyright header
163163

164-
When adding new Python files to the project, you can add the ValidMind copyright header to any files that
164+
When adding new Python or stand-alone Jupyter Notebook files to the project, you can add the ValidMind copyright header to any files that
165165
are missing it by running:
166166

167167
```bash

notebooks/code_samples/agents/langgraph_agent_simple_banking_demo.ipynb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1462,14 +1462,17 @@
14621462
},
14631463
{
14641464
"cell_type": "markdown",
1465+
"id": "copyright-e7184e5605bb4f85b3d7b8306aaaef78",
14651466
"metadata": {},
14661467
"source": [
1468+
"<!-- VALIDMIND COPYRIGHT -->\n",
1469+
"\n",
14671470
"<small>\n",
14681471
"\n",
14691472
"***\n",
14701473
"\n",
14711474
"Copyright © 2023-2026 ValidMind Inc. All rights reserved.<br>\n",
1472-
"Refer to the [LICENSE file in the root of the GitHub `validmind-library` repository](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
1475+
"Refer to [LICENSE](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
14731476
"SPDX-License-Identifier: AGPL-3.0 AND ValidMind Commercial</small>"
14741477
]
14751478
}

notebooks/code_samples/capital_markets/quickstart_option_pricing_models.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,15 +2061,17 @@
20612061
},
20622062
{
20632063
"cell_type": "markdown",
2064-
"id": "adb15089",
2064+
"id": "copyright-a23adf093a60485ea005cf8fc18545a5",
20652065
"metadata": {},
20662066
"source": [
2067+
"<!-- VALIDMIND COPYRIGHT -->\n",
2068+
"\n",
20672069
"<small>\n",
20682070
"\n",
20692071
"***\n",
20702072
"\n",
20712073
"Copyright © 2023-2026 ValidMind Inc. All rights reserved.<br>\n",
2072-
"Refer to the [LICENSE file in the root of the GitHub `validmind-library` repository](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
2074+
"Refer to [LICENSE](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
20732075
"SPDX-License-Identifier: AGPL-3.0 AND ValidMind Commercial</small>"
20742076
]
20752077
}

notebooks/code_samples/capital_markets/quickstart_option_pricing_models_quantlib.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,15 +1291,17 @@
12911291
},
12921292
{
12931293
"cell_type": "markdown",
1294-
"id": "cab6911c",
1294+
"id": "copyright-de5d1e182b09403abddabc2850f2dd05",
12951295
"metadata": {},
12961296
"source": [
1297+
"<!-- VALIDMIND COPYRIGHT -->\n",
1298+
"\n",
12971299
"<small>\n",
12981300
"\n",
12991301
"***\n",
13001302
"\n",
13011303
"Copyright © 2023-2026 ValidMind Inc. All rights reserved.<br>\n",
1302-
"Refer to the [LICENSE file in the root of the GitHub `validmind-library` repository](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
1304+
"Refer to [LICENSE](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
13031305
"SPDX-License-Identifier: AGPL-3.0 AND ValidMind Commercial</small>"
13041306
]
13051307
}

notebooks/code_samples/code_explainer/quickstart_code_explainer_demo.ipynb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,14 +823,17 @@
823823
},
824824
{
825825
"cell_type": "markdown",
826+
"id": "copyright-ccbede139a26452183291a108b791513",
826827
"metadata": {},
827828
"source": [
829+
"<!-- VALIDMIND COPYRIGHT -->\n",
830+
"\n",
828831
"<small>\n",
829832
"\n",
830833
"***\n",
831834
"\n",
832835
"Copyright © 2023-2026 ValidMind Inc. All rights reserved.<br>\n",
833-
"Refer to the [LICENSE file in the root of the GitHub `validmind-library` repository](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
836+
"Refer to [LICENSE](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
834837
"SPDX-License-Identifier: AGPL-3.0 AND ValidMind Commercial</small>"
835838
]
836839
}

notebooks/code_samples/credit_risk/application_scorecard_executive.ipynb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,14 +343,17 @@
343343
},
344344
{
345345
"cell_type": "markdown",
346+
"id": "copyright-97f68fa25e694a059b7028ce3ec374cc",
346347
"metadata": {},
347348
"source": [
349+
"<!-- VALIDMIND COPYRIGHT -->\n",
350+
"\n",
348351
"<small>\n",
349352
"\n",
350353
"***\n",
351354
"\n",
352355
"Copyright © 2023-2026 ValidMind Inc. All rights reserved.<br>\n",
353-
"Refer to the [LICENSE file in the root of the GitHub `validmind-library` repository](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
356+
"Refer to [LICENSE](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
354357
"SPDX-License-Identifier: AGPL-3.0 AND ValidMind Commercial</small>"
355358
]
356359
}

notebooks/code_samples/credit_risk/application_scorecard_full_suite.ipynb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,14 +863,17 @@
863863
},
864864
{
865865
"cell_type": "markdown",
866+
"id": "copyright-ce253f0d12144a08847d4a65a250a85f",
866867
"metadata": {},
867868
"source": [
869+
"<!-- VALIDMIND COPYRIGHT -->\n",
870+
"\n",
868871
"<small>\n",
869872
"\n",
870873
"***\n",
871874
"\n",
872875
"Copyright © 2023-2026 ValidMind Inc. All rights reserved.<br>\n",
873-
"Refer to the [LICENSE file in the root of the GitHub `validmind-library` repository](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
876+
"Refer to [LICENSE](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
874877
"SPDX-License-Identifier: AGPL-3.0 AND ValidMind Commercial</small>"
875878
]
876879
}

notebooks/code_samples/credit_risk/application_scorecard_with_bias.ipynb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1508,14 +1508,17 @@
15081508
},
15091509
{
15101510
"cell_type": "markdown",
1511+
"id": "copyright-6ee1a1ce0bd74036a8890be21965bfd2",
15111512
"metadata": {},
15121513
"source": [
1514+
"<!-- VALIDMIND COPYRIGHT -->\n",
1515+
"\n",
15131516
"<small>\n",
15141517
"\n",
15151518
"***\n",
15161519
"\n",
15171520
"Copyright © 2023-2026 ValidMind Inc. All rights reserved.<br>\n",
1518-
"Refer to the [LICENSE file in the root of the GitHub `validmind-library` repository](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
1521+
"Refer to [LICENSE](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
15191522
"SPDX-License-Identifier: AGPL-3.0 AND ValidMind Commercial</small>"
15201523
]
15211524
}

notebooks/code_samples/credit_risk/application_scorecard_with_ml.ipynb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1958,14 +1958,17 @@
19581958
},
19591959
{
19601960
"cell_type": "markdown",
1961+
"id": "copyright-00e4b240625f4af29adb179235912142",
19611962
"metadata": {},
19621963
"source": [
1964+
"<!-- VALIDMIND COPYRIGHT -->\n",
1965+
"\n",
19631966
"<small>\n",
19641967
"\n",
19651968
"***\n",
19661969
"\n",
19671970
"Copyright © 2023-2026 ValidMind Inc. All rights reserved.<br>\n",
1968-
"Refer to the [LICENSE file in the root of the GitHub `validmind-library` repository](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
1971+
"Refer to [LICENSE](https://github.com/validmind/validmind-library/blob/main/LICENSE) for details.<br>\n",
19691972
"SPDX-License-Identifier: AGPL-3.0 AND ValidMind Commercial</small>"
19701973
]
19711974
}

0 commit comments

Comments
 (0)