Releases: DavidVujic/python-polylith
fix(project): circular imports when importing the 'get' module
Solving an issue with circular dependency within the polylith.project
component. This happen when directly importing the get
module, currently only done via REPL during development.
Details in #379
feat(poly deps, info, libs): save contents to file command option
Adding a --save
option to the poly deps
, poly info
and poly libs
commands. In addition to printing the output (as before) a file will be saved with the contents of the output.
Details in #372
feat(poly sync): suggest adding available bases, and used components, to empty projects
poly sync
will now identify any projects without bricks to suggest adding a base (and then sync the needed components) - if there are any available bases.
Details in #369
fix: bump the rich library version
Expand the supported version of the rich library.
Details in #366 and a solution in #367
Thank you @NellyWhads for this contribution! ⭐
feat(poly create project): interactively suggest base and components to add
Adding the possibility to interactively add base(s) and components to a newly created project.
poly create project
will create the project data as before. If there are any unused bases
in the Polylith workspace, the user will be asked to add a base to the project. Any other needed bricks (basically a sync operation) will be added to the newly created project.
Details in #362
feat(poly check): report unused bricks in projects
Adding a feature to the poly check
command: report any unused bricks in projects.
In case a project includes a brick that is no longer needed, this new feature will report on it. Currently, it is only information and won't return with a fail exit code.
Usage, examples:
# poetry
poetry poly check --strict
# uv (or any of your favorite package & dependency management tool)
uv run poly check --strict
When there's a brick not used in a specific project, the output will be:
🔎 Is <the_brick> needed in <the_project>?
Implementation details in #360
fix(poly check): dependency lookup performance improvements
Improving the performance of the poly check
command.
Details in #359
fix(rewrite): add module name to alias for plain imports and when not already using alias
Fixing an issue with rewriting the top namespace for bricks, when the brick is imported as: import the_namespace
Details in #358
fix: poly check improve performance for large repos
The poly check
command performs AST parsing to find any missing bricks or third-party imports. A module that already have been parsed should be cached during the session. This is done since before, but the caching has moved up a layer to avoid re-running AST walking and import analysis for the same module.
Details in #356
This is a continuation of #355
fix: poly check performance for large repos
The poly check
command performs AST parsing to find any missing bricks or third-party imports. A module that already have been parsed should be cached during the session. This is done since before, but with the default max size of lru_cache
. For large Polylith workspaces, the cache need to be bigger.
Details in #355