troposphere
troposphere copied to clipboard
setup poetry
Summary
Setup poetry to manage project dependencies, build, and publish.
What Changed
Added
- added configuration for
poetry- to support the
scriptsarg ofsetuptools.setup(), will need to use a pre-release version of poetry
- to support the
- added TOML and YAML indentation settings to
.editorconfig
Changed
troposphere.__init__.__version__is now defined by reading the version from package metadatadocs/conf.pyrelease is now defined by reading the version from package metadata- updated make targets to use poetry
- updated github action workflow to use poetry
- project metadata is now stored in
pyproject.toml - project dependencies are now stored in
pyproject.toml - updated contribution and release documentation for using poetry
Removed
- remove setuptools files and metadata
I'm not sure if the tests are actually working or ignoring failures... The output makes me think its the latter. The command I'm using to run the tests could be entirely wrong but it was my best guess and switching over from python setup.py test.
I tried to use pytest to run the tests but, some are written in a format that it does not support (tests/test_examples.py::TestExamples::test_example & tests/test_examples_template_generator.py::TestTemplateGenerator::test_template_generator) so those would need to be refactored before transitioning to pytest as the test runner.
As nice as it would be to get poetry setup for this project, it may not be advisable in the current state of its pre-release and this project.
The issue is with adding scripts to setup.py. In order to do this, poetry 1.2 is required. I have been testing the current pre-release of 1.2 and it's not quite ready for use yet imo. yes, it works in the action but, people may run into issue when trying to use it for development or publishing releases.
If we were to convert troposphere's scripts into console_scripts, we could use the stable release of poetry 1.1.6.
@ITProKyle Thank you for all of these changes! I'll take a deeper look at this PR and poetry after I get done getting the resources up to date. Apology for creating a Makefile conflict. Doh!