harshith1118 opened a new issue, #1401:
URL: https://github.com/apache/hamilton/issues/1401

    
   
        ## Description
        Currently, the Hamilton CLI only supports loading context files from 
`.json` and `.py` files. It
         would be beneficial to add support for TOML files, especially since 
many Python projects use
         `pyproject.toml` for project configuration.
       
        ## Motivation
        - Many Python projects already have `pyproject.toml` files
        - It would follow Python packaging conventions to keep Hamilton 
configuration in `
         [tool.hamilton]` section
        - Users could consolidate their project configuration in one place
        - TOML is a more readable format than JSON for configuration files
       
       ## Implementation Plan
       I've already implemented this feature in a fork which:
       - Adds support for `.toml` file extension in the CLI context loading
       - Supports both formats:
         1. Top-level Hamilton headers: `HAMILTON_CONFIG`, 
`HAMILTON_FINAL_VARS`, etc.
         2. Tool-specific section: `[tool.hamilton]` with `config`, 
`final_vars`, etc. sub-sections
           Added comprehensive tests for both formats
           Updated CLI help text to reflect the new supported file type
      
       ## Files Modified
       - `hamilton/cli/logic.py` - Enhanced `load_context` function
       - `hamilton/cli/__main__.py` - Updated help text
       - Added test files and test functions
      
       ## Testing
       All existing tests continue to pass, and new tests cover the TOML 
functionality.
      
       I'd like to submit a pull request for this feature if the maintainers 
approve.


-- 
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