From 184442be80af2ed48fd372d60e95c69f64f6e85c Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 8 Aug 2023 16:49:59 +0800 Subject: [PATCH 1/5] Try to fix coverage report path for readthedocs. --- pyproject.toml | 6 +++--- pyproject.toml.jinja | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1ee24b60..153b807f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,12 +43,12 @@ issue = "https://github.com/serious-scaffold/serious-scaffold-python/issues" fail_under = 100 [tool.coverage.run] +include = [ + "src/serious_scaffold/**", +] omit = [ "src/{{ module_name }}/**", ] -source = [ - "serious_scaffold", -] [tool.isort] filter_files = true diff --git a/pyproject.toml.jinja b/pyproject.toml.jinja index f0d894ff..452ac6b6 100644 --- a/pyproject.toml.jinja +++ b/pyproject.toml.jinja @@ -52,14 +52,14 @@ issue = "https://github.com/{{ repo_namespace }}/{{ repo_name }}/issues" fail_under = 100 [tool.coverage.run] +include = [ + "src/{{ module_name }}/**", +] omit = [ {%- if project_name == "Serious Scaffold Python" %} "src/{{ '{{ module_name }}' }}/**", {%- endif %} ] -source = [ - "{{ module_name }}", -] [tool.isort] filter_files = true From 0384f7e2daeb28df7ef9ef80aab2bbec6c44220e Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 8 Aug 2023 17:00:01 +0800 Subject: [PATCH 2/5] Complete for test. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index acf10164..5653b211 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ docs-autobuild: ${PIPRUN} python -m sphinx_autobuild docs ${PUBLIC_DIR} --watch src reports: - ${PIPRUN} python -m mypy tests src --html-report ${PUBLIC_DIR}/reports/mypy + # ${PIPRUN} python -m mypy tests src --html-report ${PUBLIC_DIR}/reports/mypy ${PIPRUN} python -m coverage erase - ${PIPRUN} python -m coverage run -m pytest - ${PIPRUN} python -m coverage html -d ${PUBLIC_DIR}/reports/coverage + ${PIPRUN} python -m coverage run --debug=config,data,trace -m pytest + ${PIPRUN} python -m coverage html --debug=config,data,trace -d ${PUBLIC_DIR}/reports/coverage From 23e9821a16d567e1cf878f4ce35d83939a63c1e7 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 8 Aug 2023 17:16:05 +0800 Subject: [PATCH 3/5] Use editable install. --- .readthedocs.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 534930fe..0a984e0a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -2,18 +2,14 @@ build: jobs: post_build: - make reports + post_install: + - make dev-docs os: ubuntu-22.04 tools: python: '3' formats: - pdf - epub -python: - install: - - extra_requirements: - - docs - method: pip - path: . sphinx: fail_on_warning: true version: 2 From 62d3d9473c1f530a79cd1257d9664b36df5a071a Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 8 Aug 2023 17:20:06 +0800 Subject: [PATCH 4/5] Should work! --- Makefile | 6 +++--- pyproject.toml | 2 +- pyproject.toml.jinja | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5653b211..acf10164 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ docs-autobuild: ${PIPRUN} python -m sphinx_autobuild docs ${PUBLIC_DIR} --watch src reports: - # ${PIPRUN} python -m mypy tests src --html-report ${PUBLIC_DIR}/reports/mypy + ${PIPRUN} python -m mypy tests src --html-report ${PUBLIC_DIR}/reports/mypy ${PIPRUN} python -m coverage erase - ${PIPRUN} python -m coverage run --debug=config,data,trace -m pytest - ${PIPRUN} python -m coverage html --debug=config,data,trace -d ${PUBLIC_DIR}/reports/coverage + ${PIPRUN} python -m coverage run -m pytest + ${PIPRUN} python -m coverage html -d ${PUBLIC_DIR}/reports/coverage diff --git a/pyproject.toml b/pyproject.toml index 153b807f..dd479520 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ fail_under = 100 [tool.coverage.run] include = [ - "src/serious_scaffold/**", + "serious_scaffold", ] omit = [ "src/{{ module_name }}/**", diff --git a/pyproject.toml.jinja b/pyproject.toml.jinja index 452ac6b6..0a8b45f6 100644 --- a/pyproject.toml.jinja +++ b/pyproject.toml.jinja @@ -53,7 +53,7 @@ fail_under = 100 [tool.coverage.run] include = [ - "src/{{ module_name }}/**", + "{{ module_name }}", ] omit = [ {%- if project_name == "Serious Scaffold Python" %} From 8f6f644093f961a2863b5d181b8d5de297e5dda8 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 8 Aug 2023 17:22:19 +0800 Subject: [PATCH 5/5] Again! --- pyproject.toml | 6 +++--- pyproject.toml.jinja | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dd479520..1ee24b60 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,12 +43,12 @@ issue = "https://github.com/serious-scaffold/serious-scaffold-python/issues" fail_under = 100 [tool.coverage.run] -include = [ - "serious_scaffold", -] omit = [ "src/{{ module_name }}/**", ] +source = [ + "serious_scaffold", +] [tool.isort] filter_files = true diff --git a/pyproject.toml.jinja b/pyproject.toml.jinja index 0a8b45f6..f0d894ff 100644 --- a/pyproject.toml.jinja +++ b/pyproject.toml.jinja @@ -52,14 +52,14 @@ issue = "https://github.com/{{ repo_namespace }}/{{ repo_name }}/issues" fail_under = 100 [tool.coverage.run] -include = [ - "{{ module_name }}", -] omit = [ {%- if project_name == "Serious Scaffold Python" %} "src/{{ '{{ module_name }}' }}/**", {%- endif %} ] +source = [ + "{{ module_name }}", +] [tool.isort] filter_files = true