amazon-redshift-python-driver icon indicating copy to clipboard operation
amazon-redshift-python-driver copied to clipboard

Issue 128 introduce poetry

Open bneijt opened this issue 3 years ago • 4 comments

Use poetry for building

Closes #128

Description

Motivation and Context

Makes it easier to manage dependencies and venvs in a reproducable manner.

Testing

Screenshots (if appropriate)

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)

Checklist

  • [ ] Local run of ./build.sh succeeds
  • [ ] Code changes have been run against the repository's pre-commit hooks
  • [ ] Commit messages follow Conventional Commit Specification
  • [ ] I have read the README document
  • [ ] I have added tests to cover my changes
  • [ ] I have run all unit tests using pytest test/unit and they are passing.
  • By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

bneijt avatar Sep 07 '22 15:09 bneijt

Hey @bneijt , thanks for getting started on this. One small question -- would it be possible for us to retain the setuptools build implementation while adding support for poetry? I ask because our build system is currently using setuptool and after looking into this a bit more, migrating to poetry would require some rework that we don't have bandwidth for at the moment. What are your thoughts?

Brooke-white avatar Sep 08 '22 16:09 Brooke-white

I'm not sure how specific your build requirements are. Are you talking about:

custom_cmds = {
    "bdist_wheel": BDistWheelCommand,
    "unit_test": UnitTestCommand,
    "integration_test": IntegrationTestCommand,
}

If so, those commands are part of a code pipeline somewhere you can't update/change (outside of github) than I guess we would have to find a work-around.

One work around I could find doing a quick google was having Poetry generate a setup.py, but that would require you to be able to inject a command before the custom commands are required.

Could you give some insights into how these commands are being called in the pipeline? Maybe we can use a simple script to support it. If that is to much trouble, than feel free to let me know and we can archive this pull request for a later date.

Thank you for responding!

bneijt avatar Sep 08 '22 18:09 bneijt

I put the setup.py (al be it stripped) back in. You should be able to now still run python setup.py integration_tests if you need that for a pipeline outside of github.

Please let me know which commands the off-github pipeline runs and I can see if we can support those. Please consider publishing or sharing parts of the pipeline configuration to allow me to effectively judge if this is something we could hook in. If that is not possible, then I think we should close this PR and write a summary in the issue that this will be picked up at a later date and should not be worked on atm.

bneijt avatar Sep 10 '22 18:09 bneijt

Hey @bneijt ,

Could you give some insights into how these commands are being called in the pipeline?

All the mentioned commands in custom_cmds are used in our CI pipeline using something similar to python setup.py $MY_CMD as you wrote above.

If that is not possible, then I think we should close this PR and write a summary in the issue that this will be picked up at a later date and should not be worked on atm.

Given that we cannot share our pipeline configuration I think this course of action would be best for now. My apologies for the time and energy you've invested in looking into this, I should have done better due diligence before giving you the go ahead to start work on this.

Brooke-white avatar Sep 12 '22 16:09 Brooke-white

closing this out as we won't be supporting poetry in the short term

Brooke-white avatar Feb 27 '23 17:02 Brooke-white