ansys-dynamicreporting-core 0.4.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 (116) hide show
  1. ansys-dynamicreporting-core-0.4.0/.ci/pull_adr_image.sh +11 -0
  2. ansys-dynamicreporting-core-0.4.0/.flake8 +40 -0
  3. ansys-dynamicreporting-core-0.4.0/.github/dependabot.yml +11 -0
  4. ansys-dynamicreporting-core-0.4.0/.github/workflows/ci_cd.yml +194 -0
  5. ansys-dynamicreporting-core-0.4.0/.github/workflows/nightly-docs.yml +34 -0
  6. ansys-dynamicreporting-core-0.4.0/.github/workflows/nightly.yml +113 -0
  7. ansys-dynamicreporting-core-0.4.0/.gitignore +72 -0
  8. ansys-dynamicreporting-core-0.4.0/.pre-commit-config.yaml +74 -0
  9. ansys-dynamicreporting-core-0.4.0/AUTHORS +12 -0
  10. ansys-dynamicreporting-core-0.4.0/CHANGELOG.rst +9 -0
  11. ansys-dynamicreporting-core-0.4.0/CONTRIBUTING.rst +14 -0
  12. ansys-dynamicreporting-core-0.4.0/CONTRIBUTORS.md +16 -0
  13. ansys-dynamicreporting-core-0.4.0/LICENSE +21 -0
  14. ansys-dynamicreporting-core-0.4.0/Makefile +53 -0
  15. ansys-dynamicreporting-core-0.4.0/PKG-INFO +237 -0
  16. ansys-dynamicreporting-core-0.4.0/README.rst +205 -0
  17. ansys-dynamicreporting-core-0.4.0/codegen/adr_utils.txt +75 -0
  18. ansys-dynamicreporting-core-0.4.0/codegen/all_scrap_prop.py +129 -0
  19. ansys-dynamicreporting-core-0.4.0/codegen/all_test_prop.xml +1 -0
  20. ansys-dynamicreporting-core-0.4.0/codegen/build_info.py +48 -0
  21. ansys-dynamicreporting-core-0.4.0/codegen/generate.py +6 -0
  22. ansys-dynamicreporting-core-0.4.0/codegen/pyadritem.txt +400 -0
  23. ansys-dynamicreporting-core-0.4.0/codegen/read_prop.py +66 -0
  24. ansys-dynamicreporting-core-0.4.0/codegen/rename_whl.py +18 -0
  25. ansys-dynamicreporting-core-0.4.0/doc/.vale.ini +28 -0
  26. ansys-dynamicreporting-core-0.4.0/doc/Makefile +32 -0
  27. ansys-dynamicreporting-core-0.4.0/doc/make.bat +53 -0
  28. ansys-dynamicreporting-core-0.4.0/doc/source/_static/00_complete_report_0.png +0 -0
  29. ansys-dynamicreporting-core-0.4.0/doc/source/_static/00_create_db_0.png +0 -0
  30. ansys-dynamicreporting-core-0.4.0/doc/source/_static/00_create_db_1.png +0 -0
  31. ansys-dynamicreporting-core-0.4.0/doc/source/_static/00_create_db_2.png +0 -0
  32. ansys-dynamicreporting-core-0.4.0/doc/source/_static/01_connect_0.png +0 -0
  33. ansys-dynamicreporting-core-0.4.0/doc/source/_static/01_connect_1.png +0 -0
  34. ansys-dynamicreporting-core-0.4.0/doc/source/_static/01_connect_3.png +0 -0
  35. ansys-dynamicreporting-core-0.4.0/doc/source/_static/README.md +1 -0
  36. ansys-dynamicreporting-core-0.4.0/doc/source/_static/all_items.png +0 -0
  37. ansys-dynamicreporting-core-0.4.0/doc/source/_static/default_thumb.png +0 -0
  38. ansys-dynamicreporting-core-0.4.0/doc/source/_static/img_item.PNG +0 -0
  39. ansys-dynamicreporting-core-0.4.0/doc/source/_static/text_img.PNG +0 -0
  40. ansys-dynamicreporting-core-0.4.0/doc/source/_static/text_img_after.PNG +0 -0
  41. ansys-dynamicreporting-core-0.4.0/doc/source/_templates/README.md +1 -0
  42. ansys-dynamicreporting-core-0.4.0/doc/source/class_documentation.rst +38 -0
  43. ansys-dynamicreporting-core-0.4.0/doc/source/conf.py +143 -0
  44. ansys-dynamicreporting-core-0.4.0/doc/source/contributing.rst +39 -0
  45. ansys-dynamicreporting-core-0.4.0/doc/source/examples_source/00-basic/00-create_db.py +128 -0
  46. ansys-dynamicreporting-core-0.4.0/doc/source/examples_source/00-basic/01-connect.py +104 -0
  47. ansys-dynamicreporting-core-0.4.0/doc/source/examples_source/00-basic/README.txt +8 -0
  48. ansys-dynamicreporting-core-0.4.0/doc/source/examples_source/25-intermediate/00-tagging.py +83 -0
  49. ansys-dynamicreporting-core-0.4.0/doc/source/examples_source/25-intermediate/01-queries.py +92 -0
  50. ansys-dynamicreporting-core-0.4.0/doc/source/examples_source/25-intermediate/README.txt +8 -0
  51. ansys-dynamicreporting-core-0.4.0/doc/source/examples_source/50-advanced/00-complete_report.py +365 -0
  52. ansys-dynamicreporting-core-0.4.0/doc/source/examples_source/50-advanced/README.txt +8 -0
  53. ansys-dynamicreporting-core-0.4.0/doc/source/examples_source/README.txt +5 -0
  54. ansys-dynamicreporting-core-0.4.0/doc/source/gettingstarted/index.rst +153 -0
  55. ansys-dynamicreporting-core-0.4.0/doc/source/index.rst +64 -0
  56. ansys-dynamicreporting-core-0.4.0/doc/source/userguide/index.rst +209 -0
  57. ansys-dynamicreporting-core-0.4.0/doc/styles/.gitignore +4 -0
  58. ansys-dynamicreporting-core-0.4.0/doc/styles/Vocab/ANSYS/accept.txt +10 -0
  59. ansys-dynamicreporting-core-0.4.0/doc/styles/Vocab/ANSYS/reject.txt +0 -0
  60. ansys-dynamicreporting-core-0.4.0/pyproject.toml +152 -0
  61. ansys-dynamicreporting-core-0.4.0/setup.cfg +4 -0
  62. ansys-dynamicreporting-core-0.4.0/setup.py +10 -0
  63. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/__init__.py +19 -0
  64. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/adr_item.py +621 -0
  65. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/adr_report.py +193 -0
  66. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/adr_service.py +985 -0
  67. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/adr_utils.py +130 -0
  68. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/build_info.py +5 -0
  69. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/constants.py +3 -0
  70. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/docker_support.py +455 -0
  71. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/exceptions.py +44 -0
  72. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/utils/__init__.py +5 -0
  73. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/utils/encoders.py +69 -0
  74. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/utils/exceptions.py +49 -0
  75. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/utils/extremely_ugly_hacks.py +179 -0
  76. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/utils/filelock.py +478 -0
  77. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/utils/geofile_processing.py +216 -0
  78. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/utils/report_download_html.py +484 -0
  79. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/utils/report_download_pdf.py +124 -0
  80. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/utils/report_objects.py +3338 -0
  81. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/utils/report_remote_server.py +1677 -0
  82. ansys-dynamicreporting-core-0.4.0/src/ansys/dynamicreporting/core/utils/report_utils.py +741 -0
  83. ansys-dynamicreporting-core-0.4.0/src/ansys_dynamicreporting_core.egg-info/PKG-INFO +237 -0
  84. ansys-dynamicreporting-core-0.4.0/src/ansys_dynamicreporting_core.egg-info/SOURCES.txt +114 -0
  85. ansys-dynamicreporting-core-0.4.0/src/ansys_dynamicreporting_core.egg-info/dependency_links.txt +1 -0
  86. ansys-dynamicreporting-core-0.4.0/src/ansys_dynamicreporting_core.egg-info/requires.txt +44 -0
  87. ansys-dynamicreporting-core-0.4.0/src/ansys_dynamicreporting_core.egg-info/top_level.txt +1 -0
  88. ansys-dynamicreporting-core-0.4.0/test_cleanup.py +39 -0
  89. ansys-dynamicreporting-core-0.4.0/tests/__init__.py +0 -0
  90. ansys-dynamicreporting-core-0.4.0/tests/conftest.py +88 -0
  91. ansys-dynamicreporting-core-0.4.0/tests/test_data/aa_00_0_alpha1.png +0 -0
  92. ansys-dynamicreporting-core-0.4.0/tests/test_data/aa_00_0_u.png +0 -0
  93. ansys-dynamicreporting-core-0.4.0/tests/test_data/aa_00_1_alpha1.png +0 -0
  94. ansys-dynamicreporting-core-0.4.0/tests/test_data/ami.evsn +0 -0
  95. ansys-dynamicreporting-core-0.4.0/tests/test_data/dam_break.ens +0 -0
  96. ansys-dynamicreporting-core-0.4.0/tests/test_data/dam_break.mp4 +0 -0
  97. ansys-dynamicreporting-core-0.4.0/tests/test_data/flow2d.csf +0 -0
  98. ansys-dynamicreporting-core-0.4.0/tests/test_data/query_db/db.sqlite3 +0 -0
  99. ansys-dynamicreporting-core-0.4.0/tests/test_data/query_db/media/73a1885c-089d-11ed-9389-747827182a82_image.png +0 -0
  100. ansys-dynamicreporting-core-0.4.0/tests/test_data/query_db/media/810b9cba-089e-11ed-812e-747827182a82_image.png +0 -0
  101. ansys-dynamicreporting-core-0.4.0/tests/test_data/query_db/media/csf_conversion_version +1 -0
  102. ansys-dynamicreporting-core-0.4.0/tests/test_data/query_db/view_report.nexdb +1 -0
  103. ansys-dynamicreporting-core-0.4.0/tests/test_data/scenes/proxy.png +0 -0
  104. ansys-dynamicreporting-core-0.4.0/tests/test_data/scenes/scene.avz +0 -0
  105. ansys-dynamicreporting-core-0.4.0/tests/test_data/viewer_test.scdoc +0 -0
  106. ansys-dynamicreporting-core-0.4.0/tests/test_download_html.py +63 -0
  107. ansys-dynamicreporting-core-0.4.0/tests/test_encoders.py +40 -0
  108. ansys-dynamicreporting-core-0.4.0/tests/test_filelock.py +113 -0
  109. ansys-dynamicreporting-core-0.4.0/tests/test_geofile_processing.py +101 -0
  110. ansys-dynamicreporting-core-0.4.0/tests/test_hacks.py +45 -0
  111. ansys-dynamicreporting-core-0.4.0/tests/test_item.py +309 -0
  112. ansys-dynamicreporting-core-0.4.0/tests/test_report.py +93 -0
  113. ansys-dynamicreporting-core-0.4.0/tests/test_report_objects.py +1674 -0
  114. ansys-dynamicreporting-core-0.4.0/tests/test_report_remote_server.py +366 -0
  115. ansys-dynamicreporting-core-0.4.0/tests/test_report_utils.py +202 -0
  116. ansys-dynamicreporting-core-0.4.0/tests/test_service.py +339 -0
@@ -0,0 +1,11 @@
1
+ #!/bin/sh
2
+ set -ex
3
+
4
+ # Image name
5
+ _IMAGE_NAME="ghcr.io/ansys-internal/nexus_dev"
6
+
7
+ # Pull Ansys Dynamic Reporting image based on tag
8
+ docker pull $_IMAGE_NAME
9
+
10
+ # Remove all dangling images
11
+ docker image prune -f
@@ -0,0 +1,40 @@
1
+ [flake8]
2
+ exclude = venv, __init__.py, doc/_build
3
+ select = B,B9,C,D,DAR,E,F,N,RST,S,W
4
+ count = True
5
+ max-complexity = 10
6
+ max-line-length = 100
7
+ statistics = True
8
+ ignore =
9
+ # Whitespace before ':'.
10
+ E203,
11
+ # Line too long (82 > 79 characters).
12
+ E501,
13
+ # Line break occurred before a binary operator.
14
+ W503,
15
+ # Invalid escape sequence
16
+ W605,
17
+ # undefined name name
18
+ F821,
19
+ # Function is too complex
20
+ C901,
21
+ # https://docs.python.org/3/tutorial/errors.html#exception-chaining for details
22
+ B904,
23
+ # camelcase imported as lowercase
24
+ N813
25
+ # Data class should either be immutable or use __slots__ to save memory
26
+ B903
27
+ # class name should use CapWords convention
28
+ N801
29
+ # function name should be lowercase
30
+ N802
31
+ # exception name should be named with an Error suffix
32
+ N818
33
+ # line too long
34
+ B950
35
+ # Module imported but unused
36
+ F401
37
+ # manually surrounded by quotes, consider using the `!r` conversion flag
38
+ B907
39
+ # zip() without an explicit strict= parameter set.
40
+ B905
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "pip" # See documentation for possible values
4
+ directory: "/" # Location of package manifests
5
+ schedule:
6
+ interval: "daily"
7
+
8
+ - package-ecosystem: "github-actions"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "daily"
@@ -0,0 +1,194 @@
1
+ name: CI-CD
2
+
3
+ # run only on main branch. This avoids duplicated actions on PRs
4
+ on:
5
+ workflow_dispatch:
6
+ pull_request:
7
+ branches:
8
+ - main
9
+ - release/*
10
+ push:
11
+ tags:
12
+ - "v*"
13
+ branches:
14
+ - main
15
+ - release/*
16
+
17
+ concurrency:
18
+ group: ${{ github.workflow }}-${{ github.ref }}
19
+ cancel-in-progress: true
20
+
21
+ env:
22
+ DOCUMENTATION_CNAME: 'dynamicreporting.docs.pyansys.com'
23
+ MAIN_PYTHON_VERSION: '3.10'
24
+ PACKAGE_NAME: 'ansys-dynamicreporting-core'
25
+ PACKAGE_NAMESPACE: 'ansys.dynamicreporting.core'
26
+
27
+ jobs:
28
+ style:
29
+ name: Code style
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - name: PyAnsys code style checks
33
+ uses: ansys/actions/code-style@v4
34
+ with:
35
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
36
+
37
+ docs-style:
38
+ name: Documentation style check
39
+ runs-on: ubuntu-latest
40
+ steps:
41
+ - name: PyAnsys documentation style checks
42
+ uses: ansys/actions/doc-style@v4
43
+ with:
44
+ token: ${{ secrets.GITHUB_TOKEN }}
45
+
46
+ smoke-tests:
47
+ name: Build and smoke tests
48
+ runs-on: ${{ matrix.os }}
49
+ needs: [style]
50
+ strategy:
51
+ fail-fast: false
52
+ matrix:
53
+ os: [ubuntu-latest, windows-latest, macos-latest]
54
+ python-version: ['3.8', '3.9', '3.10', '3.11']
55
+ should-release:
56
+ - ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
57
+ exclude:
58
+ - should-release: false
59
+ os: macos-latest
60
+ steps:
61
+ - name: Build wheelhouse and perform smoke test
62
+ uses: ansys/actions/build-wheelhouse@v4
63
+ with:
64
+ library-name: ${{ env.PACKAGE_NAME }}
65
+ library-namespace: ${{ env.PACKAGE_NAMESPACE }}
66
+ operating-system: ${{ matrix.os }}
67
+ python-version: ${{ matrix.python-version }}
68
+
69
+ test:
70
+ name: Testing
71
+ needs: [smoke-tests]
72
+ runs-on: ${{ matrix.os }}
73
+ strategy:
74
+ matrix:
75
+ os: [ ubuntu-latest ]
76
+ python-version: [ '3.8', '3.9', '3.10', '3.11' ]
77
+
78
+ steps:
79
+ - uses: actions/checkout@v3
80
+
81
+ - name: Login to GitHub Container Registry
82
+ uses: docker/login-action@v2
83
+ with:
84
+ registry: ghcr.io
85
+ username: ${{ github.repository_owner }}
86
+ password: ${{ secrets.GITHUB_TOKEN }}
87
+
88
+ - name: Pull Docker container
89
+ run: make pull-docker
90
+
91
+ - name: Run pytest
92
+ uses: ansys/actions/tests-pytest@v4
93
+ env:
94
+ ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER )}}
95
+ with:
96
+ checkout: false
97
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
98
+ pytest-extra-args: -rvx --setup-show --cov=ansys.dynamicreporting --cov-report html:coverage-html --cov-report term --cov-report xml:coverage.xml
99
+
100
+ - name: Upload coverage report
101
+ if: env.MAIN_PYTHON_VERSION == matrix.python-version
102
+ uses: actions/upload-artifact@v3
103
+ with:
104
+ name: coverage.xml
105
+ path: coverage.xml
106
+ retention-days: 60
107
+ if-no-files-found: error
108
+
109
+ - name: Upload coverage to Codecov
110
+ if: env.MAIN_PYTHON_VERSION == matrix.python-version
111
+ uses: codecov/codecov-action@v3
112
+
113
+ docs:
114
+ name: Build docs
115
+ runs-on: ubuntu-latest
116
+ needs: [docs-style]
117
+ steps:
118
+ - name: Run Ansys documentation building action
119
+ uses: ansys/actions/doc-build@v4
120
+ with:
121
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
122
+
123
+ package:
124
+ name: Package library
125
+ needs: [test, docs]
126
+ runs-on: ubuntu-latest
127
+ steps:
128
+ - name: Build library source and wheel artifacts
129
+ uses: ansys/actions/build-library@v4
130
+ with:
131
+ library-name: ${{ env.PACKAGE_NAME }}
132
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
133
+
134
+ release:
135
+ name: Release project
136
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
137
+ needs: [package]
138
+ runs-on: ubuntu-latest
139
+ steps:
140
+ - name: Release to the public PyPI repository
141
+ uses: ansys/actions/release-pypi-public@v4
142
+ with:
143
+ library-name: ${{ env.PACKAGE_NAME }}
144
+ twine-username: "__token__"
145
+ twine-token: ${{ secrets.PYPI_TOKEN }}
146
+
147
+ - name: Release to GitHub
148
+ uses: ansys/actions/release-github@v4
149
+ if: ${{ !env.ACT }}
150
+ with:
151
+ library-name: ${{ env.PACKAGE_NAME }}
152
+
153
+ upload_dev_docs:
154
+ name: Upload dev documentation
155
+ if: github.ref == 'refs/heads/main'
156
+ runs-on: ubuntu-latest
157
+ needs: [package]
158
+ steps:
159
+ - name: Deploy the latest documentation
160
+ uses: ansys/actions/doc-deploy-dev@v4
161
+ if: ${{ !env.ACT }}
162
+ with:
163
+ cname: ${{ env.DOCUMENTATION_CNAME }}
164
+ token: ${{ secrets.GITHUB_TOKEN }}
165
+
166
+ upload_docs_release:
167
+ name: Upload release documentation
168
+ if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
169
+ runs-on: ubuntu-latest
170
+ needs: [release]
171
+ steps:
172
+ - name: Deploy the stable documentation
173
+ uses: ansys/actions/doc-deploy-stable@v4
174
+ if: ${{ !env.ACT }}
175
+ with:
176
+ cname: ${{ env.DOCUMENTATION_CNAME }}
177
+ token: ${{ secrets.GITHUB_TOKEN }}
178
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
179
+
180
+ build-failure:
181
+ name: Teams notify on failure
182
+ if: failure() && (github.event_name == 'pull_request' || github.ref == 'refs/heads/main' || github.ref_type == 'tag')
183
+ needs: [ style, test, docs-style ]
184
+ runs-on: ubuntu-latest
185
+ steps:
186
+ - uses: actions/checkout@v3
187
+ - name: Microsoft Teams Notification
188
+ uses: jdcargile/ms-teams-notification@v1.3
189
+ with:
190
+ github-token: ${{ github.token }} # this will use the runner's token.
191
+ ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
192
+ notification-summary: GitHub CI failure - ${{ github.event.pull_request.title }}
193
+ notification-color: dc3545
194
+ timezone: America/New_York
@@ -0,0 +1,34 @@
1
+ name: Nightly Documentation Build
2
+
3
+ on:
4
+ schedule: # UTC at 0400 - 12am EDT
5
+ - cron: '0 4 * * *'
6
+ workflow_dispatch:
7
+
8
+ env:
9
+ DOCUMENTATION_CNAME: 'dynamicreporting.docs.pyansys.com'
10
+ MAIN_PYTHON_VERSION: '3.10'
11
+
12
+ concurrency:
13
+ group: ${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ jobs:
17
+ docs_build:
18
+ name: Build docs
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Run Ansys documentation building action
22
+ uses: ansys/actions/doc-build@v4
23
+ with:
24
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
25
+
26
+ docs_upload:
27
+ needs: docs_build
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - name: Deploy development documentation
31
+ uses: ansys/actions/doc-deploy-dev@v4
32
+ with:
33
+ cname: ${{ env.DOCUMENTATION_CNAME }}
34
+ token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,113 @@
1
+ name: Nightly Build and Test
2
+
3
+ on:
4
+ schedule: # UTC at 0300 - 11pm EDT
5
+ - cron: '0 3 * * *'
6
+ workflow_dispatch:
7
+
8
+ env:
9
+ MAIN_PYTHON_VERSION: '3.10'
10
+ PACKAGE_NAME: 'ansys-dynamicreporting-core'
11
+ PACKAGE_NAMESPACE: 'ansys.dynamicreporting.core'
12
+
13
+
14
+ jobs:
15
+
16
+ style:
17
+ name: Code style
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - name: PyAnsys code style checks
21
+ uses: ansys/actions/code-style@v4
22
+ with:
23
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
24
+
25
+ smoke-tests:
26
+ name: Build and smoke tests
27
+ runs-on: ${{ matrix.os }}
28
+ needs: [style]
29
+ strategy:
30
+ fail-fast: false
31
+ matrix:
32
+ os: [ubuntu-latest, windows-latest]
33
+ python-version: ['3.8', '3.9', '3.10', '3.11']
34
+ steps:
35
+ - name: Build wheelhouse and perform smoke test
36
+ uses: ansys/actions/build-wheelhouse@v4
37
+ with:
38
+ library-name: ${{ env.PACKAGE_NAME }}
39
+ library-namespace: ${{ env.PACKAGE_NAMESPACE }}
40
+ operating-system: ${{ matrix.os }}
41
+ python-version: ${{ matrix.python-version }}
42
+
43
+ nightly_test:
44
+ name: Testing
45
+ needs: [smoke-tests]
46
+ runs-on: ${{ matrix.os }}
47
+ strategy:
48
+ matrix:
49
+ os: [ ubuntu-latest ]
50
+ python-version: [ '3.8', '3.9', '3.10', '3.11' ]
51
+
52
+ steps:
53
+ - uses: actions/checkout@v3
54
+ with:
55
+ ref: 'refs/heads/main'
56
+
57
+ - name: Login to GitHub Container Registry
58
+ uses: docker/login-action@v2
59
+ with:
60
+ registry: ghcr.io
61
+ username: ${{ github.repository_owner }}
62
+ password: ${{ secrets.GITHUB_TOKEN }}
63
+
64
+ - name: Pull Docker container
65
+ run: make pull-docker
66
+
67
+ - name: Run pytest
68
+ uses: ansys/actions/tests-pytest@v4
69
+ env:
70
+ ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER )}}
71
+ with:
72
+ checkout: false
73
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
74
+ pytest-extra-args: -rvx --setup-show --cov=ansys.dynamicreporting --cov-report html:coverage-html --cov-report term --cov-report xml:coverage.xml
75
+
76
+ nightly_and_upload:
77
+ name: nightly_and_upload
78
+ runs-on: ubuntu-latest
79
+ steps:
80
+ - name: Build library source and wheel artifacts
81
+ uses: ansys/actions/build-library@v4
82
+ with:
83
+ library-name: ${{ env.PACKAGE_NAME }}
84
+ python-version: ${{ env.MAIN_PYTHON_VERSION }}
85
+
86
+ - name: Rename wheel
87
+ run: |
88
+ python codegen/rename_whl.py
89
+ rm -rf dist/*.tar.gz
90
+
91
+ - name: Upload to Azure PyPi
92
+ if: ${{ !env.ACT }}
93
+ run: twine upload --verbose dist/*
94
+ env:
95
+ TWINE_USERNAME: "__token__"
96
+ TWINE_PASSWORD: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
97
+ TWINE_REPOSITORY_URL: ${{ secrets.PRIVATE_PYPI_URL }}
98
+
99
+ build-failure:
100
+ name: Teams notify on failure
101
+ if: failure()
102
+ needs: [ nightly_test, nightly_and_upload]
103
+ runs-on: ubuntu-latest
104
+ steps:
105
+ - uses: actions/checkout@v3
106
+ - name: Microsoft Teams Notification
107
+ uses: jdcargile/ms-teams-notification@v1.3
108
+ with:
109
+ github-token: ${{ github.token }}
110
+ ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
111
+ notification-summary: Nightly failure
112
+ notification-color: dc3545
113
+ timezone: America/New_York
@@ -0,0 +1,72 @@
1
+ # This is an example .gitignore and may need to be adapted per
2
+ # project.
3
+
4
+ # Compiled source #
5
+ ###################
6
+ *.pyc
7
+ *.pyd
8
+ *.c
9
+ *.cpp
10
+ *.so
11
+ *.o
12
+ *.cache
13
+ .pytest_cache/
14
+
15
+ # OS generated files #
16
+ ######################
17
+ .fuse_hidden*
18
+ *~
19
+ *swp
20
+ .DS_Store
21
+
22
+ # emacs
23
+ flycheck*
24
+
25
+ # Old files #
26
+ _old/
27
+
28
+ # Pip generated folders #
29
+ #########################
30
+ *.egg-info/
31
+ build/
32
+ dist/
33
+ .venv
34
+
35
+ # build intermediate products
36
+ src/ansys/dynamicreporting/core/adr_item.py
37
+ src/ansys/dynamicreporting/core/adr_utils.py
38
+ src/ansys/dynamicreporting/core/build_info.py
39
+
40
+ # autogenerated docs
41
+ _autosummary
42
+ doc/source/examples
43
+
44
+ # Unit test / coverage reports
45
+ htmlcov/
46
+ .tox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ test-output.xml
52
+ coverage.xml
53
+ coverage-html
54
+ *.cover
55
+ .hypothesis/
56
+ .pytest_cache/
57
+
58
+
59
+ \#*
60
+ .\#*
61
+ /.ipynb_checkpoints
62
+
63
+ # PyCharm
64
+ .idea/
65
+ venv/
66
+ *.bak
67
+
68
+ # VSCode
69
+ .vscode
70
+
71
+ # Ignore Sphinx files
72
+ doc/_build
@@ -0,0 +1,74 @@
1
+ repos:
2
+
3
+ - repo: https://github.com/psf/black
4
+ rev: 23.3.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
5
+ hooks:
6
+ - id: black
7
+
8
+ - repo: https://github.com/adamchainz/blacken-docs
9
+ rev: 1.13.0
10
+ hooks:
11
+ - id: blacken-docs
12
+ additional_dependencies: [ black==23.3.0 ]
13
+
14
+ - repo: https://github.com/pycqa/isort
15
+ rev: 5.11.5
16
+ hooks:
17
+ - id: isort
18
+
19
+ - repo: https://github.com/PyCQA/flake8
20
+ rev: 5.0.4
21
+ hooks:
22
+ - id: flake8
23
+
24
+ - repo: https://github.com/codespell-project/codespell
25
+ rev: v2.2.4
26
+ hooks:
27
+ - id: codespell
28
+ args: ["--toml", "pyproject.toml"]
29
+ additional_dependencies: [ "tomli" ]
30
+
31
+ - repo: https://github.com/python-jsonschema/check-jsonschema
32
+ rev: 0.22.0
33
+ hooks:
34
+ - id: check-github-workflows
35
+
36
+ # TO BE ACTIVATED EVENTUALLY - EXISTING ERRORS SHOULD BE SOLVED
37
+ #
38
+ # - repo: https://github.com/PyCQA/bandit
39
+ # rev: 1.7.5
40
+ # hooks:
41
+ # - id: bandit
42
+ # args: [ "-c", "pyproject.toml"]
43
+ # additional_dependencies: [ "bandit[toml]" ]
44
+
45
+ - repo: https://github.com/asottile/pyupgrade
46
+ rev: v3.3.2
47
+ hooks:
48
+ - id: pyupgrade
49
+ args: [ --py37-plus ]
50
+
51
+ - repo: https://github.com/pre-commit/pre-commit-hooks
52
+ rev: v4.4.0
53
+ hooks:
54
+ - id: check-added-large-files
55
+ - id: check-yaml
56
+ - id: check-case-conflict
57
+ - id: debug-statements
58
+ - id: check-merge-conflict
59
+ - id: trailing-whitespace
60
+
61
+ - repo: https://github.com/PyCQA/docformatter
62
+ rev: v1.6.3
63
+ hooks:
64
+ - id: docformatter
65
+ additional_dependencies: [ "tomli" ]
66
+
67
+ # TO BE ACTIVATED EVENTUALLY - FORCES PROPER DOCSTRINGS
68
+ #
69
+ # - repo: https://github.com/pycqa/pydocstyle
70
+ # rev: 6.3.0
71
+ # hooks:
72
+ # - id: pydocstyle
73
+ # additional_dependencies: [ "tomli" ]
74
+ # exclude: "tests/"
@@ -0,0 +1,12 @@
1
+ # This is the list of PyDynamicReporting's significant contributors.
2
+ #
3
+ # This file does not necessarily list everyone who has contributed code.
4
+ #
5
+ # For contributions made under a Corporate CLA, the organization is
6
+ # added to this file.
7
+ #
8
+ # If you have contributed to the repository and wish to be added to this file
9
+ # please submit a request.
10
+ #
11
+ #
12
+ ANSYS, Inc.
@@ -0,0 +1,9 @@
1
+ =======
2
+ History
3
+ =======
4
+
5
+
6
+ 0.1.0 (01-01-1970)
7
+ ------------------
8
+
9
+ * First release on PyPI.
@@ -0,0 +1,14 @@
1
+ Contributing
2
+ ############
3
+
4
+ We absolutely welcome any code contributions and we hope that this
5
+ guide will facilitate an understanding of the ``pydynamicreporting`` code
6
+ repository. It is important to note that while the ``pydynamicreporting``
7
+ software package is maintained by ANSYS and any submissions will be
8
+ reviewed thoroughly before merging, we still seek to foster a community
9
+ that can support user questions and develop new features to make this
10
+ software a useful tool for all users. As such, we welcome and encourage
11
+ any questions or submissions to this repository.
12
+
13
+ Please reference the `PyAnsys Developer's Guide <https://dev.docs.pyansys.com/>`_ for the full documentation
14
+ regarding contributing to the ``pydynamicreporting`` project.
@@ -0,0 +1,16 @@
1
+ # Contributors
2
+
3
+ ## Project Lead
4
+
5
+ * [Marina Galvagni](https://github.com/margalva)
6
+
7
+ ## Individual Contributors
8
+
9
+ * [Chris Garrison](https://github.com/chrisg564)
10
+ * [Cyrille Defranoux](https://github.com/cdan6)
11
+ * [Germán Martínez Ayuso](https://github.com/germa89)
12
+ * [Maxime Rey](https://github.com/MaxJPRey)
13
+ * [Mike Krogh](https://github.com/mfkrogh)
14
+ * [Randy Frank](https://github.com/randallfrank)
15
+ * [Roberto Pastor](https://github.com/RobPasMue)
16
+ * [Visesh Rajendraprasad](https://github.com/viseshrp)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 ANSYS, Inc. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,53 @@
1
+ CODESPELL_DIRS ?= ./pydynamicreporting
2
+ CODESPELL_SKIP ?= "*.pyc,*.xml,*.txt,*.gif,*.png,*.jpg,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,*.ipynb,flycheck*,./.git/*,./.hypothesis/*,*.yml,./docs/build/*,./docs/images/*,./dist/*,*~,.hypothesis*,./docs/source/examples/*,*cover,*.dat,*.mac,\#*,PKG-INFO,*.mypy_cache/*,*.xml,*.aedt,*.svg"
3
+ CODESPELL_IGNORE ?= "ignore_words.txt"
4
+
5
+ doctest: codespell
6
+
7
+ codespell:
8
+ echo "Running codespell"
9
+ codespell $(CODESPELL_DIRS) -S $(CODESPELL_SKIP) # -I $(CODESPELL_IGNORE)
10
+
11
+ build:
12
+ python -m build --wheel
13
+ python codegen/rename_whl.py
14
+ rm -rf build
15
+
16
+ build-nightly: build
17
+
18
+ install:
19
+ pip uninstall ansys-dynamicreporting-core -y
20
+ pip install dist/*.whl
21
+
22
+ install-dev:
23
+ python -m pip install --upgrade pip
24
+ pip uninstall ansys-dynamicreporting-core -y
25
+ pip install -e .[dev]
26
+
27
+ pull-docker:
28
+ bash .ci/pull_adr_image.sh
29
+
30
+ test:
31
+ pytest -rvx --setup-show --cov=ansys.dynamicreporting.core \
32
+ --cov-report html:coverage-html \
33
+ --cov-report term \
34
+ --cov-report xml:coverage.xml
35
+
36
+ smoketest:
37
+ python -c "from ansys.dynamicreporting.core import __version__; print(__version__)"
38
+ python -c "from ansys.dynamicreporting.core import Service"
39
+
40
+ clean:
41
+ rm -rf dist build
42
+ rm -f src/ansys/dynamicreporting/core/adr_item.py
43
+ rm -f src/ansys/dynamicreporting/core/adr_utils.py
44
+ rm -f src/ansys/dynamicreporting/core/build_info.py
45
+ rm -rf **/*.egg-info
46
+ rm -rf coverage-html
47
+ rm -rf .pytest_cache
48
+ find . -name \*.pyc -delete
49
+
50
+ test_clean:
51
+ python test_cleanup.py
52
+
53
+ all: clean build install