From 526ad03d1c91451d37c2a975a2130cbeca363f2d Mon Sep 17 00:00:00 2001 From: "Felipe N. Schuch" Date: Wed, 15 May 2024 18:59:35 -0300 Subject: [PATCH 1/5] ci: fix sonarcloud --- .github/workflows/ci.yaml | 14 +++++++------- .gitignore | 1 + docs/_config.yml | 1 - hatch.toml | 6 +----- sonar-project.properties | 4 +++- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f3d9959..a6829ff 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,9 +25,13 @@ concurrency: jobs: test: strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + exclude: + - os: macos-latest + python-version: "3.8" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -63,8 +67,10 @@ jobs: merge-multiple: true - name: Set project version run: | + REF=${{ github.ref }} if [[ "${{ github.ref_type }}" == "tag" ]]; then - echo "sonar.projectVersion=${{ github.ref }}" >> sonar-project.properties + TAG_NAME=${REF#refs/tags/} + echo "sonar.projectVersion=$TAG_NAME" >> sonar-project.properties fi - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master @@ -116,9 +122,3 @@ jobs: - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - - - uses: ncipollo/release-action@v1 - with: - draft: true - skipIfReleaseExists: true - generateReleaseNotes: true diff --git a/.gitignore b/.gitignore index aee3d38..db8e4e2 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ htmlcov/ .cache nosetests.xml coverage.xml +coverage.*.xml *.cover *.py,cover .hypothesis/ diff --git a/docs/_config.yml b/docs/_config.yml index f1a4ea5..683476b 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -41,7 +41,6 @@ html: launch_buttons: notebook_interface: "jupyterlab" binderhub_url: "https://mybinder.org" - colab_url: "https://colab.research.google.com" sphinx: extra_extensions: diff --git a/hatch.toml b/hatch.toml index 04d9d46..b863790 100644 --- a/hatch.toml +++ b/hatch.toml @@ -22,7 +22,7 @@ check = "pre-commit run {args} --all-files" type = "check mypy {args}" lint = "check ruff {args}" format = "check ruff-format {args}" -test = "pytest --cov --cov-report=term {args}" +test = "pytest --cov --cov-report=term --cov=xcompact3d_toolbox --cov=tests {args}" test-no-cov = "test --no-cov {args}" qa = ["check", "test", "echo '✅ QA passed'"] @@ -71,7 +71,3 @@ check = "towncrier check {args}" [envs.hatch-static-analysis] config-path = "ruff_defaults.toml" - -[dirs.env] -virtual = ".venv" -pip-compile = ".venv" diff --git a/sonar-project.properties b/sonar-project.properties index e44a7f7..ac6fa92 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,6 @@ sonar.organization=fschuch sonar.projectKey=fschuch_xcompact3d_toolbox - +sonar.python.version=3.8, 3.9, 3.10, 3.11, 3.12 +sonar.sources=xcompact3d_toolbox +sonar.tests=tests sonar.python.coverage.reportPaths=coverage.*.xml From e37cc04e72967396ead5fd4c8c147cff761aae07 Mon Sep 17 00:00:00 2001 From: "Felipe N. Schuch" Date: Wed, 22 May 2024 20:11:32 -0300 Subject: [PATCH 2/5] wip --- hatch.toml | 1 + pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hatch.toml b/hatch.toml index b863790..9fc2869 100644 --- a/hatch.toml +++ b/hatch.toml @@ -61,6 +61,7 @@ serve = ["config", "sphinx-autobuild docs build/_build/html --ignore='**/data/*' [envs.changelog] description = "Changelog handler" +detached = true dependencies = ["towncrier"] [envs.changelog.scripts] diff --git a/pyproject.toml b/pyproject.toml index 4d8f0d4..aaefc3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ minversion = "8.0" [tool.coverage.run] branch = true -relative_files = true +relative_files = false source = ["xcompact3d_toolbox", "tests"] omit = ["xcompact3d_toolbox/_version.py"] From b4f6fdbe079ee4a0781d144904c6b7f80dd266ce Mon Sep 17 00:00:00 2001 From: "Felipe N. Schuch" Date: Wed, 22 May 2024 20:18:05 -0300 Subject: [PATCH 3/5] wip --- pyproject.toml | 2 +- sonar-project.properties | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aaefc3f..4d8f0d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ minversion = "8.0" [tool.coverage.run] branch = true -relative_files = false +relative_files = true source = ["xcompact3d_toolbox", "tests"] omit = ["xcompact3d_toolbox/_version.py"] diff --git a/sonar-project.properties b/sonar-project.properties index ac6fa92..ddeffbb 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,6 +1,4 @@ sonar.organization=fschuch sonar.projectKey=fschuch_xcompact3d_toolbox sonar.python.version=3.8, 3.9, 3.10, 3.11, 3.12 -sonar.sources=xcompact3d_toolbox -sonar.tests=tests sonar.python.coverage.reportPaths=coverage.*.xml From 3c44d15c704309db5d446b6db25577fe00cc31a4 Mon Sep 17 00:00:00 2001 From: "Felipe N. Schuch" Date: Wed, 22 May 2024 20:28:50 -0300 Subject: [PATCH 4/5] wip --- pyproject.toml | 2 +- sonar-project.properties | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4d8f0d4..66208ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ minversion = "8.0" branch = true relative_files = true source = ["xcompact3d_toolbox", "tests"] -omit = ["xcompact3d_toolbox/_version.py"] +omit = ["xcompact3d_toolbox/_version.py", "**/__init__.py"] [tool.coverage.report] show_missing = true diff --git a/sonar-project.properties b/sonar-project.properties index ddeffbb..ac6fa92 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,6 @@ sonar.organization=fschuch sonar.projectKey=fschuch_xcompact3d_toolbox sonar.python.version=3.8, 3.9, 3.10, 3.11, 3.12 +sonar.sources=xcompact3d_toolbox +sonar.tests=tests sonar.python.coverage.reportPaths=coverage.*.xml From 6c9878c30595201cf21002c232cb54f596745095 Mon Sep 17 00:00:00 2001 From: "Felipe N. Schuch" Date: Wed, 22 May 2024 20:39:13 -0300 Subject: [PATCH 5/5] wip --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index db8e4e2..aee3d38 100644 --- a/.gitignore +++ b/.gitignore @@ -45,7 +45,6 @@ htmlcov/ .cache nosetests.xml coverage.xml -coverage.*.xml *.cover *.py,cover .hypothesis/