skrawcz opened a new pull request, #1425:
URL: https://github.com/apache/hamilton/pull/1425

   Adds more license headers
   
   ## Changes
   
   1. Updated headers 
   
     - examples/ - 537 files
       - 343 Python files (.py)
       - 105 Markdown files (.md)
       - 73 Jupyter notebooks (.ipynb)
       - 2 Shell scripts (.sh)
       - 2 SQL files (.sql)
       - 9 Dockerfiles
       - 4 README files (no extension)
     - ui/ - 23 files
       - 22 test files in ui/sdk/tests/
       - 1 file in ui/backend/server/trackingserver_base/
     - docs/ - 3 files
       - conf.py
       - data_adapters_extension.py
       - make_testimonials.py
     - Other directories - 5 files
       - 2 files in scripts/
       - 1 file in hamilton/experimental/
       - 1 file in writeups/
       - 1 file in ui/backend/
   
     Total: 568 files with Apache 2 license headers added
   
    2. Created Tooling
   
     - scripts/check_license_headers.py - Script to find files missing Apache 2 
license headers
       - Supports: .py, .md, .ipynb, .sh, .sql, Dockerfile, and README files
       - Can check specific file types or all at once
       - Excludes build artifacts, node_modules, and documentation snippets
     - scripts/add_license_headers.py - Script to automatically add license 
headers
       - Adds appropriate comment formats based on file type:
           - Python/Shell/Dockerfile: # comments
         - Markdown/README: <!-- --> HTML comments
         - SQL: -- comments
         - Jupyter notebooks: Markdown cell at the beginning
       - Handles special cases (shebangs, existing headers)
       - Dry-run mode for testing
   
     3. Updated Notebook Validation
   
     - examples/validate_examples.py - Updated pre-commit hook validator
       - Now correctly handles notebooks with license headers
       - Checks for license at cell 0, setup at cell 1, title at cell 2 (if 
license present)
       - Maintains backward compatibility with notebooks without license headers
   
    ### Exclusions
   
     - Documentation snippets in docs/code-comparisons/*snippets/ - These are 
embedded in docs via literalinclude and adding headers would clutter the 
rendered documentation
     - examples/plotly/interactive.html - Has a different license
     - dev_tools/language_server/tests/ (2 files) - Already have appropriate 
Apache 2.0 licenses from third-party sources (Open Law Library, Palantir 
Technologies)
   
   ### Testing
   
     - Verified all files with scripts/check_license_headers.py
     - Pre-commit notebook validation passes for all example notebooks
     - License headers use correct comment format for each file type
   
   ###  Notes
   
     - License header format follows Apache Software Foundation standard
     - Headers are added at the beginning of files (after shebang if present)
     - No functional code changes - only license header additions
   
   
   ## Checklist
   
   - [ ] PR has an informative and human-readable title (this will be pulled 
into the release notes)
   - [ ] Changes are limited to a single goal (no scope creep)
   - [ ] Code passed the pre-commit check & code is left cleaner/nicer than 
when first encountered.
   - [ ] Any _change_ in functionality is tested
   - [ ] New functions are documented (with a description, list of inputs, and 
expected output)
   - [ ] Placeholder code is flagged / future TODOs are captured in comments
   - [ ] Project documentation has been updated if adding/changing 
functionality.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to