From a2ef84a4a0dc491a1fd09f4d78c779c080b0532c Mon Sep 17 00:00:00 2001 From: Anton Larin Date: Fri, 18 Aug 2023 17:43:17 +0200 Subject: [PATCH 1/3] Adapt documentation to existing tests. --- CONTRIBUTING.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0c10d0b..b2d82e2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,8 +26,9 @@ Please try to follow guidelines ### If you are looking to contribute to Backend (🐍Python): -Check out our issues, and contribute to /application or /scripts (ignore old ingest_rst.py ingest_rst_sphinx.py files, they will be deprecated soon) -Currently we don't have any tests(which would be useful😉) but before submitting you PR make sure that after you ingested some test data its queryable +* Check out our issues, and contribute to /application or /scripts (ignore old ingest_rst.py ingest_rst_sphinx.py files, they will be deprecated soon) +* All new code should be covered with unit tests ([pytest](https://github.com/pytest-dev/pytest)). Please find tests under [/tests](https://github.com/arc53/DocsGPT/tree/main/tests) folder. +* Before submitting your PR make sure that after you ingested some test data it is queryable. ### Workflow: Create a fork, make changes on your forked repository, submit changes in a form of pull request @@ -35,4 +36,4 @@ Create a fork, make changes on your forked repository, submit changes in a form ## Questions / collaboration Please join our [Discord](https://discord.gg/n5BX8dh8rU) don't hesitate, we are very friendly and welcoming to new contributors. -# Thank you so much for considering to contribute to DocsGPT!🙏 +# Thank you so much for considering contributing to DocsGPT!🙏 From 44f353861a2b3d68e625f2538e9491a28ca92e85 Mon Sep 17 00:00:00 2001 From: Anton Larin Date: Mon, 21 Aug 2023 13:48:18 +0200 Subject: [PATCH 2/3] experiment with permissions --- .github/workflows/pytest.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 1dcd666..fee47fa 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -1,13 +1,14 @@ -name: Run python tests with pytest +name: Run Python tests with pytest on: [push, pull_request] +permissions: + pull-requests: write + jobs: pytest_and_coverage: name: Run tests and count coverage - permissions: - contents: read - pull-requests: write + runs-on: ubuntu-latest strategy: matrix: From 47f62a87a7d0d145215793c959b7d5bdedb2fd60 Mon Sep 17 00:00:00 2001 From: Anton Larin Date: Mon, 21 Aug 2023 20:19:37 +0200 Subject: [PATCH 3/3] Revert "experiment with permissions" This reverts commit 44f353861a2b3d68e625f2538e9491a28ca92e85. --- .github/workflows/pytest.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index fee47fa..1dcd666 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -1,14 +1,13 @@ -name: Run Python tests with pytest +name: Run python tests with pytest on: [push, pull_request] -permissions: - pull-requests: write - jobs: pytest_and_coverage: name: Run tests and count coverage - + permissions: + contents: read + pull-requests: write runs-on: ubuntu-latest strategy: matrix: