-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow rats.projects to work on non-poetry components (#404)
some small api breaking changes but i think this should make things usable across any PEP 621 compliant project. i had to remove public apis that relied on poetry configs that do not exist in PEP 621 because it would result in a bunch of branching logic to handle every build backend. this should fix #341, #342, and #343 by updating ComponentTools methods and deleting any `ci` command I couldn't easily update to be general. i added some test projects that hopefully let us keep `poetry`, `uv`, and `pdm` support working from now on.
- Loading branch information
Showing
30 changed files
with
313 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ jobs: | |
PACKAGE_VERSION: "${{ steps.runner-context.outputs.package-version }}" | ||
run: | | ||
cd ${{ matrix.component }} | ||
rats-devtools.pipx ci update-version "$PACKAGE_VERSION" | ||
poetry version "$PACKAGE_VERSION" | ||
rats-devtools.pipx ci install check test | ||
- name: upload-coverage | ||
uses: codecov/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
rats-devtools/test/python/rats_test/projects/test_component_tools.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from rats import projects | ||
|
||
|
||
class TestComponentTools: | ||
def test_basics(self) -> None: | ||
tools = projects.ProjectTools( | ||
lambda: projects.ProjectConfig( | ||
name="example-project", | ||
path="test/resources/projects", | ||
image_registry="none", | ||
image_push_on_build=False, | ||
) | ||
) | ||
|
||
examples = ["pdm", "poetry", "uv"] | ||
for x in examples: | ||
component = tools.get_component(f"example-{x}") | ||
assert component.component_name() == f"example-{x}" |
15 changes: 15 additions & 0 deletions
15
rats-devtools/test/python/rats_test/projects/test_project_tools.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from rats import projects | ||
|
||
|
||
class TestProjectTools: | ||
def test_basics(self) -> None: | ||
tools = projects.ProjectTools( | ||
lambda: projects.ProjectConfig( | ||
name="example-project", | ||
path="test/resources/projects", | ||
image_registry="none", | ||
image_push_on_build=False, | ||
) | ||
) | ||
|
||
assert len(tools.discover_components()) == 3 |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.