Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup poetry #1912

Closed
wants to merge 1 commit into from
Closed

setup poetry #1912

wants to merge 1 commit into from

Conversation

ITProKyle
Copy link
Contributor

Summary

Setup poetry to manage project dependencies, build, and publish.

What Changed

Added

  • added configuration for poetry
    • to support the scripts arg of setuptools.setup(), will need to use a pre-release version of poetry
  • added TOML and YAML indentation settings to .editorconfig

Changed

  • troposphere.__init__.__version__ is now defined by reading the version from package metadata
  • docs/conf.py release 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

@ITProKyle ITProKyle mentioned this pull request Jun 4, 2021
@ITProKyle
Copy link
Contributor Author

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.

@ITProKyle ITProKyle marked this pull request as ready for review June 4, 2021 23:06
@ITProKyle
Copy link
Contributor Author

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.

@markpeek
Copy link
Member

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

- `__version__` is now read from package metadata
- updated make targets
- updated github action workflow
- remove setuptools files and metadata
- updated documentation
- added config file entries to .editorconfig
@ITProKyle ITProKyle closed this by deleting the head repository Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants