ansys-tools-common 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. ansys_tools_common-0.2.0/.github/CODEOWNERS +13 -0
  2. ansys_tools_common-0.2.0/.github/dependabot.yml +43 -0
  3. ansys_tools_common-0.2.0/.github/labeler.yml +11 -0
  4. ansys_tools_common-0.2.0/.github/labels.yml +43 -0
  5. ansys_tools_common-0.2.0/.github/workflows/cicd.yml +219 -0
  6. ansys_tools_common-0.2.0/.github/workflows/label.yml +104 -0
  7. ansys_tools_common-0.2.0/.github/workflows/run_mapdl_tests.yml +60 -0
  8. ansys_tools_common-0.2.0/.gitignore +180 -0
  9. ansys_tools_common-0.2.0/.pre-commit-config.yaml +54 -0
  10. ansys_tools_common-0.2.0/AUTHORS +12 -0
  11. ansys_tools_common-0.2.0/CHANGELOG.md +11 -0
  12. ansys_tools_common-0.2.0/CODE_OF_CONDUCT.md +65 -0
  13. ansys_tools_common-0.2.0/CONTRIBUTING.md +76 -0
  14. ansys_tools_common-0.2.0/CONTRIBUTORS.md +7 -0
  15. ansys_tools_common-0.2.0/LICENSE +21 -0
  16. ansys_tools_common-0.2.0/PKG-INFO +111 -0
  17. ansys_tools_common-0.2.0/README.rst +72 -0
  18. ansys_tools_common-0.2.0/SECURITY.md +14 -0
  19. ansys_tools_common-0.2.0/doc/.vale.ini +33 -0
  20. ansys_tools_common-0.2.0/doc/Makefile +36 -0
  21. ansys_tools_common-0.2.0/doc/changelog/template +22 -0
  22. ansys_tools_common-0.2.0/doc/changelog.d/38.added.md +1 -0
  23. ansys_tools_common-0.2.0/doc/changelog.d/45.documentation.md +1 -0
  24. ansys_tools_common-0.2.0/doc/changelog.d/46.documentation.md +1 -0
  25. ansys_tools_common-0.2.0/doc/make.bat +64 -0
  26. ansys_tools_common-0.2.0/doc/source/changelog/template +15 -0
  27. ansys_tools_common-0.2.0/doc/source/changelog.rst +123 -0
  28. ansys_tools_common-0.2.0/doc/source/conf.py +125 -0
  29. ansys_tools_common-0.2.0/doc/source/contributing.rst +110 -0
  30. ansys_tools_common-0.2.0/doc/source/getting_started/index.rst +28 -0
  31. ansys_tools_common-0.2.0/doc/source/index.rst +51 -0
  32. ansys_tools_common-0.2.0/doc/source/user_guide/ansys_downloader.rst +13 -0
  33. ansys_tools_common-0.2.0/doc/source/user_guide/ansys_exceptions.rst +34 -0
  34. ansys_tools_common-0.2.0/doc/source/user_guide/ansys_tools_path.rst +12 -0
  35. ansys_tools_common-0.2.0/doc/source/user_guide/index.rst +67 -0
  36. ansys_tools_common-0.2.0/doc/source/user_guide/launcher/cli.rst +13 -0
  37. ansys_tools_common-0.2.0/doc/source/user_guide/launcher/index.rst +18 -0
  38. ansys_tools_common-0.2.0/doc/source/user_guide/launcher/plugin_creation.rst +348 -0
  39. ansys_tools_common-0.2.0/doc/source/user_guide/launcher/rationale.rst +59 -0
  40. ansys_tools_common-0.2.0/doc/source/user_guide/report.rst +129 -0
  41. ansys_tools_common-0.2.0/doc/source/user_guide/versioning.rst +68 -0
  42. ansys_tools_common-0.2.0/doc/styles/config/vocabularies/ANSYS/accept.txt +14 -0
  43. ansys_tools_common-0.2.0/doc/styles/config/vocabularies/ANSYS/reject.txt +0 -0
  44. ansys_tools_common-0.2.0/pyproject.toml +154 -0
  45. ansys_tools_common-0.2.0/src/ansys/tools/common/__init__.py +26 -0
  46. ansys_tools_common-0.2.0/src/ansys/tools/common/abstractions/__init__.py +25 -0
  47. ansys_tools_common-0.2.0/src/ansys/tools/common/abstractions/connection.py +105 -0
  48. ansys_tools_common-0.2.0/src/ansys/tools/common/abstractions/launcher.py +175 -0
  49. ansys_tools_common-0.2.0/src/ansys/tools/common/example_download.py +213 -0
  50. ansys_tools_common-0.2.0/src/ansys/tools/common/exceptions.py +136 -0
  51. ansys_tools_common-0.2.0/src/ansys/tools/common/launcher/__init__.py +34 -0
  52. ansys_tools_common-0.2.0/src/ansys/tools/common/launcher/_cli.py +279 -0
  53. ansys_tools_common-0.2.0/src/ansys/tools/common/launcher/_plugins.py +115 -0
  54. ansys_tools_common-0.2.0/src/ansys/tools/common/launcher/config.py +266 -0
  55. ansys_tools_common-0.2.0/src/ansys/tools/common/launcher/helpers/__init__.py +27 -0
  56. ansys_tools_common-0.2.0/src/ansys/tools/common/launcher/helpers/grpc.py +54 -0
  57. ansys_tools_common-0.2.0/src/ansys/tools/common/launcher/helpers/ports.py +49 -0
  58. ansys_tools_common-0.2.0/src/ansys/tools/common/launcher/interface.py +193 -0
  59. ansys_tools_common-0.2.0/src/ansys/tools/common/launcher/launch.py +84 -0
  60. ansys_tools_common-0.2.0/src/ansys/tools/common/launcher/product_instance.py +192 -0
  61. ansys_tools_common-0.2.0/src/ansys/tools/common/logger.py +171 -0
  62. ansys_tools_common-0.2.0/src/ansys/tools/common/logger_formatter.py +59 -0
  63. ansys_tools_common-0.2.0/src/ansys/tools/common/path/__init__.py +82 -0
  64. ansys_tools_common-0.2.0/src/ansys/tools/common/path/applications/__init__.py +49 -0
  65. ansys_tools_common-0.2.0/src/ansys/tools/common/path/applications/dyna.py +41 -0
  66. ansys_tools_common-0.2.0/src/ansys/tools/common/path/applications/mapdl.py +43 -0
  67. ansys_tools_common-0.2.0/src/ansys/tools/common/path/applications/mechanical.py +46 -0
  68. ansys_tools_common-0.2.0/src/ansys/tools/common/path/path.py +1336 -0
  69. ansys_tools_common-0.2.0/src/ansys/tools/common/path/save.py +56 -0
  70. ansys_tools_common-0.2.0/src/ansys/tools/common/py.typed +0 -0
  71. ansys_tools_common-0.2.0/src/ansys/tools/common/report.py +255 -0
  72. ansys_tools_common-0.2.0/src/ansys/tools/common/versioning.py +589 -0
  73. ansys_tools_common-0.2.0/tests/conftest.py +89 -0
  74. ansys_tools_common-0.2.0/tests/launcher/cli/__init__.py +22 -0
  75. ansys_tools_common-0.2.0/tests/launcher/cli/common.py +32 -0
  76. ansys_tools_common-0.2.0/tests/launcher/cli/conftest.py +40 -0
  77. ansys_tools_common-0.2.0/tests/launcher/cli/test_multiple_plugins.py +220 -0
  78. ansys_tools_common-0.2.0/tests/launcher/cli/test_single_plugin.py +167 -0
  79. ansys_tools_common-0.2.0/tests/launcher/conftest.py +79 -0
  80. ansys_tools_common-0.2.0/tests/launcher/integration/__init__.py +22 -0
  81. ansys_tools_common-0.2.0/tests/launcher/integration/simple_test_launcher.py +97 -0
  82. ansys_tools_common-0.2.0/tests/launcher/integration/simple_test_server.py +36 -0
  83. ansys_tools_common-0.2.0/tests/launcher/integration/test_simple_launcher.py +92 -0
  84. ansys_tools_common-0.2.0/tests/launcher/pkg_with_entrypoint/poetry.lock +7 -0
  85. ansys_tools_common-0.2.0/tests/launcher/pkg_with_entrypoint/pyproject.toml +21 -0
  86. ansys_tools_common-0.2.0/tests/launcher/pkg_with_entrypoint/src/pkg_with_entrypoint/__init__.py +26 -0
  87. ansys_tools_common-0.2.0/tests/launcher/pkg_with_entrypoint/src/pkg_with_entrypoint/launcher.py +39 -0
  88. ansys_tools_common-0.2.0/tests/launcher/plugins/conftest.py +22 -0
  89. ansys_tools_common-0.2.0/tests/launcher/plugins/test_plugins.py +127 -0
  90. ansys_tools_common-0.2.0/tests/launcher/test_entry_point.py +65 -0
  91. ansys_tools_common-0.2.0/tests/path/integration/test_path_integration.py +86 -0
  92. ansys_tools_common-0.2.0/tests/path/unit/test_metadata.py +47 -0
  93. ansys_tools_common-0.2.0/tests/path/unit/test_misc.py +22 -0
  94. ansys_tools_common-0.2.0/tests/path/unit/test_path.py +623 -0
  95. ansys_tools_common-0.2.0/tests/test_connection.py +89 -0
  96. ansys_tools_common-0.2.0/tests/test_example_download.py +89 -0
  97. ansys_tools_common-0.2.0/tests/test_exceptions.py +104 -0
  98. ansys_tools_common-0.2.0/tests/test_logger.py +197 -0
  99. ansys_tools_common-0.2.0/tests/test_report.py +283 -0
  100. ansys_tools_common-0.2.0/tests/test_versioning.py +313 -0
  101. ansys_tools_common-0.2.0/uv.lock +2361 -0
@@ -0,0 +1,13 @@
1
+ # This is a comment.
2
+ # Each line is a file pattern followed by one or more owners.
3
+
4
+ # These owners will be the default owners for everything in
5
+ # the repo. Unless a later match takes precedence,
6
+ # they will be requested for review when someone opens a pull request.
7
+ * @ansys/ansys-common-tools-maintainers
8
+
9
+ # Local launcher
10
+ /src/ansys/common/tools/launcher/* @greschd
11
+
12
+ # Documentation
13
+ /doc/source/* @PipKat
@@ -0,0 +1,43 @@
1
+ version: 2
2
+ updates:
3
+
4
+ - package-ecosystem: "pip"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "daily"
8
+ cooldown:
9
+ default-days: 5
10
+ include:
11
+ - "*"
12
+ exclude:
13
+ - "ansys-sphinx-theme"
14
+ - "ansys-tools-visualization-interface"
15
+ labels:
16
+ - "maintenance"
17
+ - "dependencies"
18
+ assignees:
19
+ - "pyansys-ci-bot"
20
+ commit-message:
21
+ prefix: "build"
22
+ groups:
23
+ grpc-deps:
24
+ patterns:
25
+ - "grpc*"
26
+
27
+ - package-ecosystem: "github-actions"
28
+ directory: "/"
29
+ schedule:
30
+ interval: "daily"
31
+ cooldown:
32
+ default-days: 5
33
+ include:
34
+ - "*"
35
+ exclude:
36
+ - "ansys/actions/*"
37
+ labels:
38
+ - "maintenance"
39
+ - "dependencies"
40
+ assignees:
41
+ - "pyansys-ci-bot"
42
+ commit-message:
43
+ prefix: "ci"
@@ -0,0 +1,11 @@
1
+ documentation:
2
+ - changed-files:
3
+ - any-glob-to-any-file: [doc/source/**/*, README.md]
4
+
5
+ maintenance:
6
+ - changed-files:
7
+ - any-glob-to-any-file: [.github/**/*, pyproject.toml, tox.ini, .pre-commit-config.yaml]
8
+
9
+ testing:
10
+ - changed-files:
11
+ - any-glob-to-any-file: [tests/*]
@@ -0,0 +1,43 @@
1
+ - name: bug
2
+ description: Something isn't working
3
+ color: d42a34
4
+
5
+ - name: dependencies
6
+ description: Related with project dependencies
7
+ color: ffc0cb
8
+
9
+ - name: documentation
10
+ description: Improvements or additions to documentation
11
+ color: 0677ba
12
+
13
+ - name: enhancement
14
+ description: New features or code improvements
15
+ color: FFD827
16
+
17
+ - name: good first issue
18
+ description: Easy to solve for newcomers
19
+ color: 62ca50
20
+
21
+ - name: maintenance
22
+ description: Package and maintenance related
23
+ color: f78c37
24
+
25
+ - name: release
26
+ description: Anything related to an incoming release
27
+ color: ffffff
28
+
29
+ - name: testing
30
+ description: Anything related to testing
31
+ color: 5802B8
32
+
33
+ - name: graphics
34
+ description: Anything related to graphics
35
+ color: 5903A8
36
+
37
+ - name: triage
38
+ description: Need some assessment
39
+ color: f78a50
40
+
41
+ - name: top priority
42
+ description: Must be fixed promptly
43
+ color: ab8a50
@@ -0,0 +1,219 @@
1
+ name: GitHub CI
2
+
3
+ on:
4
+ pull_request:
5
+ workflow_dispatch:
6
+ push:
7
+ tags:
8
+ - '*'
9
+ branches:
10
+ - main
11
+
12
+ env:
13
+ PACKAGE_NAME: ansys-tools-common
14
+ MAIN_PYTHON_VERSION: 3.13
15
+ DOCUMENTATION_CNAME: tools.docs.pyansys.com
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ jobs:
21
+
22
+ changelog:
23
+ name: Changelog
24
+ runs-on: ubuntu-latest
25
+ permissions:
26
+ contents: write
27
+ pull-requests: write
28
+ steps:
29
+ - name: Create fragment
30
+ if: github.event_name == 'pull_request'
31
+ uses: ansys/actions/doc-changelog@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
32
+ with:
33
+ token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
34
+ bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
35
+ bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
36
+
37
+ - name: Deploy changelog
38
+ if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
39
+ uses: ansys/actions/doc-deploy-changelog@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
40
+ with:
41
+ token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
42
+ bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
43
+ bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
44
+
45
+ vulnerabilities:
46
+ name: Check library vulnerabilities
47
+ runs-on: ubuntu-latest
48
+ steps:
49
+ - uses: ansys/actions/check-vulnerabilities@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
50
+ with:
51
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
52
+ token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
53
+ python-package-name: ${{ env.PACKAGE_NAME }}
54
+ dev-mode: ${{ github.ref != 'refs/heads/main' }}
55
+
56
+ code-style:
57
+ name: Code style
58
+ runs-on: ubuntu-latest
59
+ steps:
60
+ - uses: ansys/actions/code-style@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
61
+ with:
62
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
63
+
64
+ doc-style:
65
+ name: Doc style
66
+ runs-on: ubuntu-latest
67
+ steps:
68
+ - uses: ansys/actions/doc-style@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
69
+ with:
70
+ token: ${{ secrets.GITHUB_TOKEN }}
71
+
72
+ actions-style:
73
+ name: Actions style
74
+ runs-on: ubuntu-latest
75
+ steps:
76
+ - uses: ansys/actions/check-actions-security@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
77
+ with:
78
+ generate-summary: true
79
+ token: ${{ secrets.GITHUB_TOKEN }}
80
+ auditing-level: high
81
+
82
+ wheelhouse:
83
+ name: Wheelhouse / ${{ matrix.os }} / ${{ matrix.python }}
84
+ runs-on: ${{ matrix.os }}
85
+ needs: code-style
86
+ strategy:
87
+ fail-fast: false
88
+ matrix:
89
+ os: [ubuntu-latest, windows-latest, macos-latest]
90
+ python: ['3.10', '3.11', '3.12', '3.13']
91
+ steps:
92
+ - uses: ansys/actions/build-wheelhouse@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
93
+ with:
94
+ library-name: ${{ env.PACKAGE_NAME }}
95
+ operating-system: ${{ matrix.os }}
96
+ python-version: ${{ matrix.python }}
97
+ whitelist-license-check: termcolor # Has MIT license, but it's not recognized
98
+
99
+ tests:
100
+ name: Testing
101
+ runs-on: ubuntu-latest
102
+ needs: wheelhouse
103
+ strategy:
104
+ fail-fast: false
105
+ matrix:
106
+ os: [ubuntu-latest, windows-latest, macos-latest]
107
+ python: ['3.10', '3.11', '3.12', '3.13']
108
+ env:
109
+ ANSYS_LOCAL: false
110
+ ON_UBUNTU: true
111
+ steps:
112
+ - name: Checkout repository
113
+ uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
114
+ with:
115
+ persist-credentials: false
116
+
117
+ - name: Set up uv
118
+ uses: astral-sh/setup-uv@eb1897b8dc4b5d5bfe39a428a8f2304605e0983c # 7.0.0
119
+ with:
120
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
121
+ enable-cache: false
122
+
123
+ - name: Install project dependencies
124
+ run: |
125
+ uv sync --group tests
126
+
127
+ - name: Install test package containing entrypoint
128
+ run: |
129
+ uv pip install tests/launcher/pkg_with_entrypoint
130
+
131
+ - name: Run tests
132
+ run: |
133
+ uv run pytest
134
+
135
+ doc-build:
136
+ name: Build documentation
137
+ needs: doc-style
138
+ runs-on: ubuntu-latest
139
+ steps:
140
+ - uses: ansys/actions/doc-build@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
141
+ with:
142
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
143
+ check-links: false
144
+ group-dependencies-name: doc
145
+
146
+ build-library:
147
+ name: Build library
148
+ runs-on: ubuntu-latest
149
+ needs: [doc-build, tests]
150
+ steps:
151
+ - uses: ansys/actions/build-library@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
152
+ with:
153
+ library-name: ${{ env.PACKAGE_NAME }}
154
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
155
+
156
+ release:
157
+ name: Release project
158
+ if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
159
+ needs: build-library
160
+ runs-on: ubuntu-latest
161
+ environment: release
162
+ permissions:
163
+ id-token: write
164
+ contents: write
165
+ steps:
166
+ - name: Download artifacts
167
+ uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
168
+ with:
169
+ name: ${{ env.PACKAGE_NAME }}-artifacts
170
+ path: ${{ env.PACKAGE_NAME }}-artifacts
171
+
172
+ - name: Release to the public PyPI
173
+ uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
174
+ with:
175
+ repository-url: https://upload.pypi.org/legacy/
176
+ print-hash: true
177
+ packages-dir: ${{ env.PACKAGE_NAME }}-artifacts
178
+ skip-existing: false
179
+
180
+ - name: Release to GitHub
181
+ uses: ansys/actions/release-github@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
182
+ with:
183
+ token: ${{ secrets.GITHUB_TOKEN }}
184
+ library-name: ${{ env.PACKAGE_NAME }}
185
+
186
+ doc-deploy-stable:
187
+ name: Deploy stable docs
188
+ if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
189
+ runs-on: ubuntu-latest
190
+ needs: release
191
+ steps:
192
+ - uses: ansys/actions/doc-deploy-stable@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
193
+ with:
194
+ cname: ${{ env.DOCUMENTATION_CNAME }}
195
+ token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
196
+ bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
197
+ bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
198
+
199
+ automerge-prs:
200
+ name: Automerge PRs (dependabot and pre-commit.ci only)
201
+ runs-on: ubuntu-latest
202
+ needs: [build-library]
203
+ if: github.event_name == 'pull_request'
204
+ permissions:
205
+ contents: write
206
+ pull-requests: write
207
+ steps:
208
+ - name: Automerge PRs
209
+ uses: ansys/actions/hk-automerge-prs@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
210
+ with:
211
+ approver: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
212
+ approver-token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
213
+
214
+ - name: If pre-commit PR, add assignee
215
+ if: startsWith(github.head_ref, 'pre-commit-ci-update-config')
216
+ run: gh pr edit --add-assignee pyansys-ci-bot "$PR_URL"
217
+ env:
218
+ PR_URL: ${{github.event.pull_request.html_url}}
219
+ GH_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
@@ -0,0 +1,104 @@
1
+ name: Labeler
2
+ on:
3
+ pull_request:
4
+ # opened, reopened, and synchronize are default for pull_request
5
+ # edited - when PR title or body is changed
6
+ # labeled - when labels are added to PR
7
+ types: [opened, reopened, synchronize, edited, labeled]
8
+ push:
9
+ branches: [main]
10
+ paths:
11
+ - ../labels.yml
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ permissions: {} # Disable default permissions
18
+
19
+ jobs:
20
+
21
+ label-syncer:
22
+ name: Syncer
23
+ runs-on: ubuntu-latest
24
+ permissions:
25
+ contents: write
26
+ pull-requests: write
27
+ steps:
28
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29
+ with:
30
+ persist-credentials: false
31
+ - uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0
32
+ env:
33
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34
+
35
+ labeler:
36
+ name: Set labels
37
+ needs: [label-syncer]
38
+ permissions:
39
+ contents: read
40
+ pull-requests: write
41
+ runs-on: ubuntu-latest
42
+ steps:
43
+
44
+ # Label based on modified files
45
+ - name: Label based on changed files
46
+ uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
47
+ with:
48
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
49
+ sync-labels: true
50
+
51
+ # Label based on branch name
52
+ - uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
53
+ if: |
54
+ startsWith(github.event.pull_request.head.ref, 'doc') ||
55
+ startsWith(github.event.pull_request.head.ref, 'docs')
56
+ with:
57
+ labels: documentation
58
+ github_token: ${{ secrets.GITHUB_TOKEN }}
59
+
60
+ - uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
61
+ if: |
62
+ startsWith(github.event.pull_request.head.ref, 'maint') ||
63
+ startsWith(github.event.pull_request.head.ref, 'no-ci') ||
64
+ startsWith(github.event.pull_request.head.ref, 'ci')
65
+ with:
66
+ labels: maintenance
67
+ github_token: ${{ secrets.GITHUB_TOKEN }}
68
+
69
+ - uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
70
+ if: startsWith(github.event.pull_request.head.ref, 'feat')
71
+ with:
72
+ github_token: ${{ secrets.GITHUB_TOKEN }}
73
+ labels: |
74
+ enhancement
75
+
76
+ - uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
77
+ if: |
78
+ startsWith(github.event.pull_request.head.ref, 'fix') ||
79
+ startsWith(github.event.pull_request.head.ref, 'patch')
80
+ with:
81
+ github_token: ${{ secrets.GITHUB_TOKEN }}
82
+ labels: bug
83
+
84
+ commenter:
85
+ name: Suggest labels if none assigned
86
+ runs-on: ubuntu-latest
87
+ permissions:
88
+ contents: read
89
+ pull-requests: write
90
+ steps:
91
+ - name: Suggest to add labels
92
+ uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
93
+ # Execute only when no labels have been applied to the pull request
94
+ if: toJSON(github.event.pull_request.labels.*.name) == '{}'
95
+ with:
96
+ issue-number: ${{ github.event.pull_request.number }}
97
+ body: |
98
+ Please add one of the following labels to add this contribution to the Release Notes :point_down:
99
+ - [bug](https://github.com/ansys/ansys-tools-common/pulls?q=label%3Abug+)
100
+ - [documentation](https://github.com/ansys/ansys-tools-common/pulls?q=label%3Adocumentation+)
101
+ - [enhancement](https://github.com/ansys/ansys-tools-common/pulls?q=label%3Aenhancement+)
102
+ - [good first issue](https://github.com/ansys/ansys-tools-common/pulls?q=label%3Agood+first+issue)
103
+ - [maintenance](https://github.com/ansys/ansys-tools-common/pulls?q=label%3Amaintenance+)
104
+ - [release](https://github.com/ansys/ansys-tools-common/pulls?q=label%3Arelease+)
@@ -0,0 +1,60 @@
1
+ name: MAPDL dependent tests for paths tool
2
+
3
+ on:
4
+ pull_request:
5
+ workflow_dispatch:
6
+ push:
7
+ tags:
8
+ - '*'
9
+ branches:
10
+ - main
11
+
12
+ env:
13
+ PACKAGE_NAME: ansys-tools-common
14
+ MAIN_PYTHON_VERSION: 3.13
15
+
16
+ permissions:
17
+ contents: read
18
+ packages: read
19
+
20
+ jobs:
21
+
22
+ build-tests:
23
+ name: Build tests
24
+ runs-on: ubuntu-latest
25
+ container:
26
+ image: ghcr.io/ansys/mapdl:v22.2-ubuntu@sha256:024c587f4a8190e99cc3f08a2dc231583032e784a8ef7d7659f8dd9748116697
27
+ options: -u=0:0 --entrypoint /bin/bash
28
+ credentials:
29
+ username: ${{ secrets.GH_USERNAME }}
30
+ password: ${{ secrets.GH_TOKEN }}
31
+ env:
32
+ ANSYS_LOCAL: true
33
+ ON_UBUNTU: true
34
+
35
+ steps:
36
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
37
+ with:
38
+ persist-credentials: false
39
+
40
+ - name: Set up uv
41
+ uses: astral-sh/setup-uv@eb1897b8dc4b5d5bfe39a428a8f2304605e0983c # 7.0.0
42
+ with:
43
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
44
+ enable-cache: false
45
+
46
+ - name: Install project dependencies
47
+ run: |
48
+ uv sync --group tests
49
+
50
+ - name: Install test package containing entrypoint
51
+ run: |
52
+ uv pip install tests/launcher/pkg_with_entrypoint
53
+
54
+ - name: Run tests
55
+ env:
56
+ PACKAGE_NAMESPACE: ${{ env.PACKAGE_NAMESPACE }}
57
+ run: |
58
+ uv run pytest \
59
+ -vx \
60
+ --cov=${PACKAGE_NAMESPACE} --cov-report=term --cov-report=xml:.cov/coverage.xml --cov-report=html:.cov/html
@@ -0,0 +1,180 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ doc/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+
110
+ # pdm
111
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112
+ #pdm.lock
113
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114
+ # in version control.
115
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116
+ .pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121
+ __pypackages__/
122
+
123
+ # Celery stuff
124
+ celerybeat-schedule
125
+ celerybeat.pid
126
+
127
+ # SageMath parsed files
128
+ *.sage.py
129
+
130
+ # Environments
131
+ .env
132
+ .venv
133
+ env/
134
+ venv/
135
+ ENV/
136
+ env.bak/
137
+ venv.bak/
138
+
139
+ # Spyder project settings
140
+ .spyderproject
141
+ .spyproject
142
+
143
+ # Rope project settings
144
+ .ropeproject
145
+
146
+ # mkdocs documentation
147
+ /site
148
+
149
+ # mypy
150
+ .mypy_cache/
151
+ .dmypy.json
152
+ dmypy.json
153
+
154
+ # Pyre type checker
155
+ .pyre/
156
+
157
+ # pytype static type analyzer
158
+ .pytype/
159
+
160
+ # Cython debug symbols
161
+ cython_debug/
162
+
163
+ # PyCharm
164
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
167
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
+ #.idea/
169
+
170
+ # Ruff stuff:
171
+ .ruff_cache/
172
+
173
+ # PyPI configuration file
174
+ .pypirc
175
+ .vscode
176
+ ._build
177
+
178
+ doc/source/api
179
+ .cov
180
+ not_a_dir