From 94dfff6b79e1f796c601656bb1292588554d27fe Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:08:47 -0700 Subject: [PATCH 1/4] Fix python test workflows --- src/reactpy_django/clean.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reactpy_django/clean.py b/src/reactpy_django/clean.py index a5953adc..93df7be6 100644 --- a/src/reactpy_django/clean.py +++ b/src/reactpy_django/clean.py @@ -87,7 +87,7 @@ def clean_user_data(verbosity: int = 1): start_time = timezone.now() user_model = get_user_model() all_users = user_model.objects.all() - all_user_pks = all_users.values_list(user_model._meta.pk.name, flat=True) # type: ignore + all_user_pks = all_users.values_list(user_model._meta.pk.name, flat=True) # Django doesn't support using QuerySets as an argument with cross-database relations. if user_model.objects.db != UserDataModel.objects.db: From 67f35e17d62b29bbdad0c468453c5e3459c8ce6c Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:46:33 -0700 Subject: [PATCH 2/4] Replace `linkcheckmd` with `linkspector` --- .github/workflows/test-docs.yml | 7 ++++--- requirements/build-docs.txt | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml index 907e1a2c..07fd2a4d 100644 --- a/.github/workflows/test-docs.yml +++ b/.github/workflows/test-docs.yml @@ -20,12 +20,13 @@ jobs: - uses: actions/setup-python@v5 with: python-version: 3.x + - name: Check docs links + uses: umbrelladocs/action-linkspector@v1 + with: + fail_on_error: true - name: Check docs build run: | pip install -r requirements/build-docs.txt - linkcheckMarkdown docs/ -v -r - linkcheckMarkdown README.md -v -r - linkcheckMarkdown CHANGELOG.md -v -r cd docs mkdocs build --strict - name: Check docs examples diff --git a/requirements/build-docs.txt b/requirements/build-docs.txt index f32563ca..a7d5b1cf 100644 --- a/requirements/build-docs.txt +++ b/requirements/build-docs.txt @@ -2,7 +2,6 @@ mkdocs mkdocs-git-revision-date-localized-plugin mkdocs-material==9.4.0 mkdocs-include-markdown-plugin -linkcheckmd mkdocs-spellcheck[all] mkdocs-git-authors-plugin mkdocs-minify-plugin From bfe73ca95db7d5dfcb9af4f32055126e5f62b5b2 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:53:47 -0700 Subject: [PATCH 3/4] add linkspector config file --- .linkspector.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .linkspector.yml diff --git a/.linkspector.yml b/.linkspector.yml new file mode 100644 index 00000000..6c0747e7 --- /dev/null +++ b/.linkspector.yml @@ -0,0 +1,7 @@ +dirs: + - ./docs +files: + - README.md + - CHANGELOG.md +useGitIgnore: true +modifiedFilesOnly: false From 3146e7d3a335a59551bd28a6035a82d31acf7dc9 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:16:39 -0700 Subject: [PATCH 4/4] Change reporter --- .github/workflows/test-docs.yml | 2 ++ .gitignore | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml index 07fd2a4d..3062ebc1 100644 --- a/.github/workflows/test-docs.yml +++ b/.github/workflows/test-docs.yml @@ -23,6 +23,8 @@ jobs: - name: Check docs links uses: umbrelladocs/action-linkspector@v1 with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review fail_on_error: true - name: Check docs build run: | diff --git a/.gitignore b/.gitignore index ffabb7fc..e3cbc599 100644 --- a/.gitignore +++ b/.gitignore @@ -101,6 +101,7 @@ venv.bak/ # mkdocs documentation /site +docs/site # mypy .mypy_cache/