Skip to content

feat: Improvements to plugin#43

Closed
lfvjimisola wants to merge 13 commits intomainfrom
feature/improvements_to_plugin
Closed

feat: Improvements to plugin#43
lfvjimisola wants to merge 13 commits intomainfrom
feature/improvements_to_plugin

Conversation

@lfvjimisola
Copy link
Contributor

@lfvjimisola lfvjimisola commented Jan 9, 2025

Reworked the plugin quite a bit. It's not an application plugin instead of a generic plugin.
This allows the plugin to only do its stuff when poetry build is executed and not will all poetry commands as before.

I also made the plugin a bit less noisy.

ping @lfvdavid

@lfvdavid
Copy link
Contributor

Looks good, have you tested it locally?

I had some problems with the previous version of the plugin executing too early during the build process and it seemed like it was not possible to configure it to run later.

I assume this is not an issue now?

@lfvjimisola
Copy link
Contributor Author

Looks good, have you tested it locally?

I had some problems with the previous version of the plugin executing too early during the build process and it seemed like it was not possible to configure it to run later.

I assume this is not an issue now?

@lfvdavid Please confirm that this works locally for you as well. Then I convinced that I can merge it to main.

@lfvdavid
Copy link
Contributor

Plugin works now after a few tweaks.

When updating the pyproject.toml with new includes during poetry build command poetry has already read the file and any changes made is not included (for that build).

Added a check for InstallCommand and we are now adding the includes when running poetry install instead.

We did not check if the includes was already added, so every build command would add duplicate includes, fixed this by checking the existing includes before adding new ones.

Also added a cleanup of the pyproject.toml file to remove excessive new lines.

@lfvjimisola
Copy link
Contributor Author

Plugin works now after a few tweaks.

When updating the pyproject.toml with new includes during poetry build command poetry has already read the file and any changes made is not included (for that build).

Added a check for InstallCommand and we are now adding the includes when running poetry install instead.

We did not check if the includes was already added, so every build command would add duplicate includes, fixed this by checking the existing includes before adding new ones.

Also added a cleanup of the pyproject.toml file to remove excessive new lines.

I'm not following here. The sdist needs to be updated during build to my knowledge so that the sdist has the reqstool files.
poetry install installs project dependencies if I recall right. that something different I believe.

let's take it in person next week. have a nice weekend

@lfvdavid
Copy link
Contributor

After discussing how we want the plugin to work:

If possible, when running poetry build add the reqstool files to include under include section of pyproject.toml then clean up/remove again after the build is complete.

The main issue here that we need to figure out is when the build command is running any changes made to the pyproject.toml file is not applied since poetry has already read the file.

  1. Can we refresh the file during the build process to include changes made?
  2. Can we restart the build process after making changes to the file?

This will make the plugin more dynamic and reduces the chance for miss-configuration.

@jimisola
Copy link
Member

jimisola commented Mar 2, 2026

Superseded by #98 which implemented and extended these improvements (ApplicationPlugin refactor, event-driven hooks, TOML/YAML bug fix, docs update, test fixture). All changes are now on main.

@jimisola jimisola closed this Mar 2, 2026
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.

3 participants