From 40bb2d5f50a6c1adc7404b0d41d32781a2a955ac Mon Sep 17 00:00:00 2001 From: Guillaume Yziquel <142336927+gl-yziquel@users.noreply.github.com> Date: Sat, 29 Jun 2024 15:10:15 +0000 Subject: [PATCH 1/4] pip cache remove for out-of-test testing of builder plugins. --- docs/how-to/plugins/testing-builds.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/how-to/plugins/testing-builds.md b/docs/how-to/plugins/testing-builds.md index fb3ed7f0d..cbe8e7a7f 100644 --- a/docs/how-to/plugins/testing-builds.md +++ b/docs/how-to/plugins/testing-builds.md @@ -75,5 +75,7 @@ version = "0.1.0" ... ``` +Alternatively, you may wish to perform `pip cache remove hatch-plugin-name` before testing it manually on some project with `hatch build --target hatch-plugin-target`. This is suitable when developing a plugin in tandem with another project consuming it. However, it is not advisable for writing tests inside a builder plugin project, self-contained, as it modifying the global cache of the system rather than working around it at the test level. For writing tests, the former method is advisable. + !!! note This example chooses to ignore copying `.git` for performance reasons. You may want to ignore more patterns, or copy only specific paths like [this plugin](https://github.com/hynek/hatch-fancy-pypi-readme/blob/main/tests/conftest.py) does. From e0e0176d32bfc164d604994ad6ef1cfdf8531751 Mon Sep 17 00:00:00 2001 From: Guillaume Yziquel <142336927+gl-yziquel@users.noreply.github.com> Date: Sat, 29 Jun 2024 15:23:08 +0000 Subject: [PATCH 2/4] Fixing a grammatical mistake. --- docs/how-to/plugins/testing-builds.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/how-to/plugins/testing-builds.md b/docs/how-to/plugins/testing-builds.md index cbe8e7a7f..a6de74319 100644 --- a/docs/how-to/plugins/testing-builds.md +++ b/docs/how-to/plugins/testing-builds.md @@ -75,7 +75,7 @@ version = "0.1.0" ... ``` -Alternatively, you may wish to perform `pip cache remove hatch-plugin-name` before testing it manually on some project with `hatch build --target hatch-plugin-target`. This is suitable when developing a plugin in tandem with another project consuming it. However, it is not advisable for writing tests inside a builder plugin project, self-contained, as it modifying the global cache of the system rather than working around it at the test level. For writing tests, the former method is advisable. +Alternatively, you may wish to perform `pip cache remove hatch-plugin-name` before testing it manually on some project with `hatch build --target hatch-plugin-target`. This is suitable when developing a plugin in tandem with another project consuming it. However, it is not advisable for writing tests inside a builder plugin project, self-contained, as it modifies the global cache of the system rather than working around it at the test level. For writing tests, the former method is advisable. !!! note This example chooses to ignore copying `.git` for performance reasons. You may want to ignore more patterns, or copy only specific paths like [this plugin](https://github.com/hynek/hatch-fancy-pypi-readme/blob/main/tests/conftest.py) does. From 3c36319eb1bf079a0e5f38ab27e501442b538782 Mon Sep 17 00:00:00 2001 From: Guillaume Yziquel <142336927+gl-yziquel@users.noreply.github.com> Date: Sat, 29 Jun 2024 17:52:42 +0000 Subject: [PATCH 3/4] Referencing testing howto from builder plugins page. --- docs/plugins/builder/reference.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/plugins/builder/reference.md b/docs/plugins/builder/reference.md index acd8ffe06..378a4f048 100644 --- a/docs/plugins/builder/reference.md +++ b/docs/plugins/builder/reference.md @@ -4,6 +4,8 @@ See the documentation for [build configuration](../../config/build.md). +See the How-To for [testing plugins](../../how-to/plugins/testing-builds.md). + ## Known third-party - [hatch-aws](https://github.com/aka-raccoon/hatch-aws) - used for building AWS Lambda functions with SAM From 7bccfcba1a80e1bb38a496fb0d7b3979e5abb446 Mon Sep 17 00:00:00 2001 From: gl-yziquel <142336927+gl-yziquel@users.noreply.github.com> Date: Sat, 29 Jun 2024 21:28:00 +0200 Subject: [PATCH 4/4] Update docs/plugins/builder/reference.md Co-authored-by: Ofek Lev --- docs/plugins/builder/reference.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/plugins/builder/reference.md b/docs/plugins/builder/reference.md index 378a4f048..c5b83da61 100644 --- a/docs/plugins/builder/reference.md +++ b/docs/plugins/builder/reference.md @@ -2,9 +2,7 @@ ----- -See the documentation for [build configuration](../../config/build.md). - -See the How-To for [testing plugins](../../how-to/plugins/testing-builds.md). +See the documentation for [build configuration](../../config/build.md) and the how-to for [testing plugins](../../how-to/plugins/testing-builds.md). ## Known third-party