dspy
dspy copied to clipboard
fix(dependencies): move builds and dependencies to poetry
📝 Changes Description
This PR contains the following changes:
- migrated setuptools to poetry
- remove poetry main project stuffs and move them to the tool.dependencies
- export the poetry stuffs to requirements to if someone wanted to use it till June
- update PR structure message.
🛠 Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x] This change requires a documentation update
- [ ] This change will expire our current cache and need cache update
🔍 How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [ ] Added new unit/integration tests
- [x] Updated one notebook (that tests end-to-end)
- [ ] I stared at the code and made sure it makes sense
How to test?
-
the way that you can test it is to setup an environment and follow the steps for setting up your poetry and use that.
-
we should run notebooks and make sure they works.
-
another part that should be tested is the build of the package and push it to pypi, which should be done with poetry build
-
To publish a Python package to PyPI using Poetry, you need to follow these steps:
- Poetry will create a distribution package that you can upload to PyPI. You can build the package with the following command:
poetry build
- Before you can publish the package, you need to add the PyPI repository to Poetry if you haven't done so already. You can do this with the following command:
poetry config repositories.pypi https://upload.pypi.org/legacy/
- Now you can publish your package to PyPI. You'll be prompted to enter your PyPI username and password:
poetry publish -r pypi
Checklist
- [x] I have added dependencies to the
pyproject.toml
file - [x] I have updated the
poetry.lock
file - [x] I have updated the
requirements.txt
file (till 2024-06-01) - [ ] I have updated the documentation accordingly
- [x] New and existing unit tests pass locally with my changes
- [ ] New and existing integration notebooks pass locally with my changes
- [x] Pre-Commit checks are passing (locally and remotely)
- [x] Title of your PR / MR corresponds to the required format
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] I have added Google Colab support for the newly added notebooks.
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added a new notebook that tests the new feature
- [x] I ran
ruff check . --fix-only
to appease the lint gods - [x] Commit message follows required format {label}(dspy): {message}
Thank you for writing this! It is definitely a change that needed to be made at some point. We should keep requirements.txt imo. I tried getting it to autogenerate when I was making CI changes a little while ago, and it was messy, but if you have a better/clean way I am open.
@isaacbmiller thank you for the review and comments.
I have added it to recommended Suggested Checklist
for templates and I think we should at some point deprecate it.
Also, @okhat should be a blocking reviewer on this one, as he uploads the builds to pypi. I talked to him like a month ago about moving away from setup.py, and I thinking the testing wasn't good enough, but now it is significantly better
I agree, but still the PR is a draft till I talk with @okhat
@isaacbmiller @okhat folks should I merge the master with this or we should wait on this one for now?