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

Enable poetry workflow #236

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft

Enable poetry workflow #236

wants to merge 25 commits into from

Conversation

jdkandersson
Copy link
Contributor

@jdkandersson jdkandersson commented Jan 16, 2024

Applicable spec: ISD115

Overview

  • Install poetry in the unit/integ test runner with the poetry-plugin-export plugin
  • Optionally uses the tox -e pack command instead of charmcraft pack to enable the use of poetry
  • Remove tox.ini's dependencies check since they will be located in pyproject.toml

Rationale

Enable workflows with full dependency pinning using poetry.
PRs using this branch:

Workflow Changes

The integration test has been changed to optionally use tox -e pack command instead of charmcraft pack

Checklist

  • The contributing guide was applied
  • The PR is tagged with appropriate label (urgent, trivial, complex)

@jdkandersson jdkandersson requested a review from a team as a code owner January 16, 2024 05:58
@jdkandersson jdkandersson marked this pull request as draft January 16, 2024 05:58
@nrobinaubertin nrobinaubertin changed the title optionally use tox pack Enable poetry workflow Feb 26, 2024
@nrobinaubertin
Copy link
Contributor

This is blocked until I make it work with the following PR: canonical/synapse-operator#223

@@ -216,51 +216,6 @@ jobs:
STDOUT_LOG=$(mktemp --suffix=stdout.log)
echo STDOUT_LOG=$STDOUT_LOG >> $GITHUB_ENV
tox --result-json=test-result.json | tee $STDOUT_LOG ; test ${PIPESTATUS[0]} -eq 0
- name: Check lint and test stdout
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for removing this please?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using poetry, the dependencies will be handled in the pyproject.toml file and this test will always fail

Copy link
Contributor Author

@jdkandersson jdkandersson Mar 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it somehow be adapted so that we still get the benefits please? It is checking here that the expected tools are being run which is quite helpful to make sure that the expected linting is actually being done in a given repo

@jdkandersson jdkandersson marked this pull request as ready for review February 29, 2024 05:26
@cbartz
Copy link
Contributor

cbartz commented Feb 29, 2024

This is now marked ready for review, but I think the PR description is out of sync (e.g. Install poetry in the unit/integ test runner with the poetry-plugin-export plugin is not present).

@jdkandersson
Copy link
Contributor Author

This is now marked ready for review, but I think the PR description is out of sync (e.g. Install poetry in the unit/integ test runner with the poetry-plugin-export plugin is not present).

Good point, perhaps @nrobinaubertin would you like to take over this PR please?

@nrobinaubertin
Copy link
Contributor

This is now marked ready for review, but I think the PR description is out of sync (e.g. Install poetry in the unit/integ test runner with the poetry-plugin-export plugin is not present).

Good point, perhaps @nrobinaubertin would you like to take over this PR please?

I'll take it over.
But I did not want to put it in review because of #236 (comment)

@nrobinaubertin nrobinaubertin marked this pull request as draft February 29, 2024 15:03
@merkata
Copy link
Contributor

merkata commented Jul 10, 2024

@nrobinaubertin @jdkandersson is this being worked on? I suggest closing it if not and we can reopen it if needed..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants