Skip to content

Conversation

@validbeck
Copy link
Collaborator

@validbeck validbeck commented Jan 19, 2026

Pull Request Description

What and why?

sc-13985

As a follow-up to adding a copyright to our notebook files, the notebook templating script now appends copyright information, and two new scripts that check for missing copyright info (scripts/verify_notebook_copyright.py) and that add/update copyright info (scripts/copyright_notebooks.py) can be called via the Makefile (make verify-copyright and make copyright respectively).

READMEs have been updated to accommodate these changes:

Root README Notebook templates README
Screenshot 2026-01-19 at 12 20 11 PM Screenshot 2026-01-19 at 12 20 01 PM

How to test

Pull down this PR: gh pr checkout 467:

1. Generate new notebooks

Via the CLI

i. Call make notebook and follow the prompts. Note that the newly created notebook has the copyright info automatically added at the end.

Important

Name the file _notebook.ipynb so you can follow the instructions in "2. Update existing notebooks".

ii. Delete the copyright cell from the notebook.

Using the end-to-end notebook

i. Open up /notebooks/templates/e2e-notebook.ipynb and run the notebook, following the prompts. Note that the newly created notebook has the copyright info automatically added at the end.

Important

Name the file notebook.ipynb so you can follow the instructions in "2. Update existing notebooks".

ii. Delete the copyright cell from the notebook.

2. Update existing notebooks

Once you've deleted the existing copyright cell from the notebooks, call:

i. Run make verify-copyright — You should get a return that one file (notebook.ipynb) is missing the copyright info. This is correct as the script only looks for standalone notebooks (ones that don't start with a _ in front of the rest of the filename).
ii. Run make copyright — You should get a return that one file (notebook.ipynb) has been appended with the copyright info. 🎉

What needs special review?

n/a

Dependencies, breaking changes, and deployment notes

Release notes

n/a

Checklist

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

@validbeck validbeck self-assigned this Jan 19, 2026
@validbeck validbeck added the internal Not to be externalized in the release notes label Jan 19, 2026
Copy link
Collaborator

@nrichers nrichers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, this PR does exactly what it says on the tin when testing and I was able to test the core functionality changes. I also tried removing a copyright header from an unrelated Python API file and the make actions continue to work as expected.

That said, I have two comments:

  1. I had a "huh, this looks like VS Code?" moment when I tested: e2e_template.py is defaulting to VS Code when we should use Cursor AI at this point. Please either default to Cursor (s/code/cursor/)or make this a configurable choice.
  2. The copyright notice for notebooks continues to be unnecessarily wordy, only because it tries to mimic what our plain text copyright headers do. All you need is a simple link to the LICENSE file, let the hyperlink to the heavy lifting for where to find the notice. I made a suggestion to this effect.

Related, if I may: please start exploring what Cursor has to offer, even if you don't yet use much of it ... It initially feels very much like VS Code but you'll quickly discover that it has agent features that are much better. We pay for a team license for us to use it. And, I can see a day not too far in the future where working on docs PRs will require you to use Cursor (or de facto already requires it if you want to do follow the current release notes process I use ...).

Co-authored-by: Nik Richers <nik@validmind.ai>
@validbeck validbeck force-pushed the beck/sc-13985/update-notebook-templates-templating-script branch from 13ab799 to 72488a2 Compare January 19, 2026 23:19
@validbeck
Copy link
Collaborator Author

validbeck commented Jan 19, 2026

I had a "huh, this looks like VS Code?" moment when I tested: e2e_template.py is defaulting to VS Code when we should use Cursor AI at this point. Please either default to Cursor (s/code/cursor/)or make this a configurable choice.

@nrichers I don't actually know how to change this or what you're referring to, so you might need to help here.

EDIT: What I mean by that is your link just takes me to... the full file, if you meant to highlight a line of something. Also, this script was created months, maybe over a year ago, when we were still all on VSCode, so that might have something to do with it? If you want significant updates here you'll need to provide some more guidance/suggest the changes yourself as I am not quite clear just based on the comment what changes you want to see.

@validbeck
Copy link
Collaborator Author

Re: force-push, sort of an accident — Not sure what happened in my logic and I think I was confused about the notebooks already being updated somehow and got lost. I don't even remember what I was trying to undo!

…pt' of github.com:validmind/validmind-library into beck/sc-13985/update-notebook-templates-templating-script
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ validbeck
❌ nrichers
You have signed the CLA already but the status is still pending? Let us recheck it.

@nrichers
Copy link
Collaborator

@nrichers I don't actually know how to change this or what you're referring to, so you might need to help here.

I pushed 4ef319f and retested both the make action and the notebook to ensure both still work as expected. Note that you will need to restart the notebook kernel to get it to use Cursor.

Copy link
Collaborator

@nrichers nrichers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀 Thank you for making the switch to the simplified license footer. As discussed, I pushed a commit to call Cursor instead of VS Code and retested.

@validbeck
Copy link
Collaborator Author

As discussed, I pushed a commit to call Cursor instead of VS Code and retested.

Ah, I see what you were referring to now, I didn't understand what you meant by default until now. I would prefer if we aligned with the option the user was currently using, instead of forcing something they might not have open. I'll take a look at the options.

@nrichers
Copy link
Collaborator

I would prefer if we aligned with the option the user was currently using, instead of forcing something they might not have open. I'll take a look at the options.

Yes, that would be much more elegant. What your describing is exactly what happened to me: I was testing your PR on Cursor when all of a sudden VS Code popped up.

@validbeck
Copy link
Collaborator Author

Yes, that would be much more elegant. What your describing is exactly what happened to me: I was testing your PR on Cursor when all of a sudden VS Code popped up.

It should now "elegantly" open in the editor you're actively in, in theory beyond VS Code or Cursor (and in multiple OS), or in your system default editor, courtesy of Cursor's suggestions.

@github-actions
Copy link
Contributor

PR Summary

This pull request introduces extensive enhancements to how ValidMind copyrights are handled across the repository. In particular, it:

  1. Updates multiple Jupyter notebooks, templates, and end-to-end scripts so that each notebook now contains a standardized copyright block. The copyright cell now includes the canonical marker "" and a unique cell ID prefixed with copyright-.

  2. Modifies file references in the documentation templates to use a new naming convention where supporting templates (such as about, install-initialize, next-steps, upgrade, and copyright) now have a leading underscore (e.g. _about-validmind.ipynb, _upgrade-validmind.ipynb, _copyright.ipynb).

  3. Improves the scripts that synchronize and verify copyright info (e.g. scripts/copyright_notebooks.py and scripts/verify_notebook_copyright.py) so that they compare the existing copyright cell content against a canonical version stored in the templates. The functions now normalize the text (handling line breaks and trailing whitespace) and enforce that the cell IDs follow the expected format.

  4. Ensures that notebooks which are not meant to be modified (filename starting with _) are excluded from processing, and adds or updates the copyright cell in notebooks missing it or whose content differs from the canonical version.

Overall, this PR standardizes the copyright header across the repository and solidifies its enforcement using helper scripts, contributing to improved compliance and consistency across documentation.

Test Suggestions

  • Run the 'verify_notebook_copyright.py' script to ensure all notebooks contain the correct copyright cell.
  • Execute the 'sync_copyright.py' script with the '--dry-run' flag to preview changes.
  • Manually inspect a sample of notebooks (especially ones not starting with '_') to verify that the copyright cell has the canonical text and the proper ID prefix.
  • Test the make target for copyright (if available) to confirm that the notebooks are correctly updated.

@validbeck
Copy link
Collaborator Author

validbeck commented Jan 20, 2026

@nrichers For some reason, GitHub thinks you haven't signed our licensing agreement...

❌ nrichers
You have signed the CLA already but the status is still pending? Let us recheck it.

@validbeck validbeck merged commit eca2f4b into main Jan 20, 2026
6 of 7 checks passed
@validbeck validbeck deleted the beck/sc-13985/update-notebook-templates-templating-script branch January 20, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants