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

   Adds the directory `hamilton-core/` with mechanism to dynamically patch 
`hamilton/` and bundle a library named `sf-hamilton-core` which could be pushed 
to pypi.
   
   It makes targeted 2 changes:
   - disable plugin autoloading
   - make `pandas` and `numpy` optional dependencies; and remove `networkx` 
dependency (currently unused).
   
   This makes the Hamilton package a much lighter install and solves long 
library loading time. See the file `hamilton-core/README.md` for details
   
   ## Changes
   - Add `hamilton-core/` directory
   - `hamilton-core/setup.py` copies the code of `hamilton/` to 
`hamilton-core/hamilton/_hamilton`
   - `hamilton-core/hamilton/__init__.py` is the entry point to 
`sf-hamilton-core`, which proxies everything directly to the source code of 
`hamilton` stored in `hamilton-core/hamilton/_hamilton`
   - modify `hamilton/base.py` to lazily import `pandas` and `numpy`. This 
shouldn't affect users in any way
   
   ## How I tested this
   - successfully ran all core unit tests locally
   - added CI workflow that installs `sf-hamilton-core` and runs Hamilton's 
unit tests
   
   ## TODO
   - remove networkx dependency
   - add info to README about how it works
   - clean up `hamilton-core/setup.py` and add linting + formatting
   - potentially add docs pages
   
   ## Checklist
   
   - [x] PR has an informative and human-readable title (this will be pulled 
into the release notes)
   - [x] Changes are limited to a single goal (no scope creep)
   - [x] Code passed the pre-commit check & code is left cleaner/nicer than 
when first encountered.
   - [x] Any _change_ in functionality is tested
   - [x] New functions are documented (with a description, list of inputs, and 
expected output)
   - [x] 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