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

feat: find workspace root, for repos with several sub-workspaces #296

Merged

Conversation

DavidVujic
Copy link
Owner

@DavidVujic DavidVujic commented Nov 22, 2024

…repos where the Workspace root is not the same as the git root

Description

Find the Workspace root for repos containing the Polylith workspace in a sub-directory, and when not using the workspace.toml to configure the workspace.

As before, when the workspace.toml cannot be located, the lookup will fallback to the pyproject.toml file.

With the changes in this Pull Request, it is no longer assumed that the Polylith Workspace root is the same as the repo root (i.e. the .git folder). This is the new feature, making it possible to structure a monorepo like:

the_repo/
    pyhon/
        the_polylith_workspace/
            bases/
            components/
            projects/
            ...
    kotlin/
    javascript/
    ...

Also, there's an extra check for configs in workspace.toml in case of an empty file with the contents moved to pyproject.toml.

Motivation and Context

fixes #295

How Has This Been Tested?

✅ CI
✅ Local install of CLI and the Poetry plugin: tested the example repos
✅ running commands in a repo with the Python Workspace(s) in a subfolder of the repo root.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

@DavidVujic DavidVujic changed the title wip: find workspace root, for repos without a workspace.toml and for … wip: find workspace root, for repos without a workspace.toml Nov 24, 2024
@DavidVujic DavidVujic changed the title wip: find workspace root, for repos without a workspace.toml feat: find workspace root, for repos with several sub-workspaces Nov 24, 2024
@DavidVujic DavidVujic marked this pull request as ready for review November 24, 2024 13:47
@DavidVujic DavidVujic merged commit 0c7b67a into main Nov 24, 2024
2 checks passed
@DavidVujic DavidVujic deleted the find-workspace-root-without-the-need-of-workspace_toml branch November 24, 2024 14:25
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.

poly error if config is in pyproject.toml in subfolder
1 participant