From e53e6e18e1ad62c84909d70985f1b7898ac4f01d Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Thu, 13 Apr 2023 17:30:10 +0200 Subject: [PATCH 1/6] FEAT: pre-commit hooks --- .pre-commit-config.yaml | 2 ++ doc/source/getting_started.rst | 2 +- doc/source/links.rst | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 79a2b5eb..affc74c9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,6 +33,8 @@ repos: hooks: - id: check-merge-conflict - id: debug-statements + - id: check-yaml + - id: trailing-whitespace # this validates our github workflow files - repo: https://github.com/python-jsonschema/check-jsonschema diff --git a/doc/source/getting_started.rst b/doc/source/getting_started.rst index d157d5d1..56e3735f 100644 --- a/doc/source/getting_started.rst +++ b/doc/source/getting_started.rst @@ -47,7 +47,7 @@ Before installing ``pyansys`` in user mode, ensure that you have the latest version of `pip `_ with: .. code:: bash - + python -m pip install -U pip Then, install ``pyansys`` with: diff --git a/doc/source/links.rst b/doc/source/links.rst index 203b93a4..08fd51e8 100644 --- a/doc/source/links.rst +++ b/doc/source/links.rst @@ -61,7 +61,7 @@ .. _What_is_the_Windows_Subsystem_for_Linux: https://docs.microsoft.com/en-us/windows/wsl/about .. _open_port_windows_10: https://answers.microsoft.com/en-us/windows/forum/all/how-to-open-port-in-windows-10-firewall/f38f67c8-23e8-459d-9552-c1b94cca579a/ .. _disabling_firewall_on_wsl: https://github.com/cascadium/wsl-windows-toolbar-launcher#firewall-rules -.. _article_good_unit_test: https://stackoverflow.com/questions/61400/what-makes-a-good-unit-test +.. _article_good_unit_test: https://stackoverflow.com/questions/61400/what-makes-a-good-unit-test .. _vscode_attach_to_container: https://code.visualstudio.com/docs/devcontainers/attach-container .. _ubuntu_firewall: https://ubuntu.com/server/docs/security-firewall From f0937241474be5851c276e12bcdea8aaa2ecaca9 Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Thu, 13 Apr 2023 17:30:29 +0200 Subject: [PATCH 2/6] FEAT: upload dependencies as a list --- .github/workflows/ci-build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index ad19d871..4de53cd8 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -113,6 +113,18 @@ jobs: python-version: ${{ matrix.python-version }} target: "all" + - name: List dependencies (pip freeze) + run: | + pip freeze > all-deps-${{ runner.os }}-${{ matrix.python-version }}.txt + cat all-deps-${{ runner.os }}-${{ matrix.python-version }}.txt + + - name: Upload dependencies list + uses: actions/upload-artifact@v3 + with: + name: all-deps-${{ runner.os }}-${{ matrix.python-version }}.txt + path: all-deps-${{ runner.os }}-${{ matrix.python-version }}.txt + retention-days: 7 + docs-build: name: Building Documentation runs-on: ubuntu-latest From 02e8c45d07e82a8e5d0791ccabf5a404976ef9e8 Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Thu, 13 Apr 2023 17:42:37 +0200 Subject: [PATCH 3/6] WIP: attempt to upload all deps (dry-run) --- .github/workflows/ci-build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 4de53cd8..1240b219 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -157,7 +157,7 @@ jobs: release: name: Release project - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') needs: [package, smoke-tests-extras, wheelhouse-all] runs-on: ubuntu-latest steps: @@ -167,8 +167,11 @@ jobs: library-name: ${{ env.PACKAGE_NAME }} twine-username: __token__ twine-token: ${{ secrets.PYPI_TOKEN }} + dry-run: true - name: Release to GitHub uses: pyansys/actions/release-github@v4 with: library-name: ${{ env.PACKAGE_NAME }} + additional-artifacts: 'all-deps-*' + dry-run: true From c8fa953a7624d083a7920be2eb16b6212ec774d1 Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:04:58 +0200 Subject: [PATCH 4/6] FIX: Specifically providing artifact names --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 1240b219..f6a5e1d8 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -173,5 +173,5 @@ jobs: uses: pyansys/actions/release-github@v4 with: library-name: ${{ env.PACKAGE_NAME }} - additional-artifacts: 'all-deps-*' + additional-artifacts: 'all-deps-Linux-3.8.txt all-deps-Linux-3.9.txt all-deps-Linux-3.10.txt all-deps-Linux-3.11.txt all-deps-Windows-3.8.txt all-deps-Windows-3.9.txt all-deps-Windows-3.10.txt all-deps-Windows-3.11.txt all-deps-macOS-3.8.txt all-deps-macOS-3.9.txt all-deps-macOS-3.10.txt all-deps-macOS-3.11.txt' dry-run: true From bbeb75627bd832290b91deec446ab53bcf8e1177 Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:09:36 +0200 Subject: [PATCH 5/6] FEAT: removing dry run --- .github/workflows/ci-build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index f6a5e1d8..2517f6f8 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -157,7 +157,7 @@ jobs: release: name: Release project - # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + if: github.event_name == 'push' && contains(github.ref, 'refs/tags') needs: [package, smoke-tests-extras, wheelhouse-all] runs-on: ubuntu-latest steps: @@ -167,11 +167,9 @@ jobs: library-name: ${{ env.PACKAGE_NAME }} twine-username: __token__ twine-token: ${{ secrets.PYPI_TOKEN }} - dry-run: true - name: Release to GitHub uses: pyansys/actions/release-github@v4 with: library-name: ${{ env.PACKAGE_NAME }} additional-artifacts: 'all-deps-Linux-3.8.txt all-deps-Linux-3.9.txt all-deps-Linux-3.10.txt all-deps-Linux-3.11.txt all-deps-Windows-3.8.txt all-deps-Windows-3.9.txt all-deps-Windows-3.10.txt all-deps-Windows-3.11.txt all-deps-macOS-3.8.txt all-deps-macOS-3.9.txt all-deps-macOS-3.10.txt all-deps-macOS-3.11.txt' - dry-run: true From 0534add4735f9e8df15e4d5a3c4d6d0f6c82dcec Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:17:20 +0200 Subject: [PATCH 6/6] FEAT: moving artifact (without .txt) --- .github/workflows/ci-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 2517f6f8..cb219f47 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -121,7 +121,7 @@ jobs: - name: Upload dependencies list uses: actions/upload-artifact@v3 with: - name: all-deps-${{ runner.os }}-${{ matrix.python-version }}.txt + name: all-deps-${{ runner.os }}-${{ matrix.python-version }} path: all-deps-${{ runner.os }}-${{ matrix.python-version }}.txt retention-days: 7 @@ -172,4 +172,4 @@ jobs: uses: pyansys/actions/release-github@v4 with: library-name: ${{ env.PACKAGE_NAME }} - additional-artifacts: 'all-deps-Linux-3.8.txt all-deps-Linux-3.9.txt all-deps-Linux-3.10.txt all-deps-Linux-3.11.txt all-deps-Windows-3.8.txt all-deps-Windows-3.9.txt all-deps-Windows-3.10.txt all-deps-Windows-3.11.txt all-deps-macOS-3.8.txt all-deps-macOS-3.9.txt all-deps-macOS-3.10.txt all-deps-macOS-3.11.txt' + additional-artifacts: 'all-deps-Linux-3.8 all-deps-Linux-3.9 all-deps-Linux-3.10 all-deps-Linux-3.11 all-deps-Windows-3.8 all-deps-Windows-3.9 all-deps-Windows-3.10 all-deps-Windows-3.11 all-deps-macOS-3.8 all-deps-macOS-3.9 all-deps-macOS-3.10 all-deps-macOS-3.11'