ansys-grantami-jobqueue 1.0.0rc0__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.
@@ -0,0 +1,12 @@
1
+ # This is the list of PyGranta JobQueue'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,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 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,119 @@
1
+ Metadata-Version: 2.1
2
+ Name: ansys-grantami-jobqueue
3
+ Version: 1.0.0rc0
4
+ Summary: A python wrapper for the Granta MI Job Queue API
5
+ Home-page: https://github.com/ansys/grantami-jobqueue
6
+ License: MIT
7
+ Author: ANSYS, Inc.
8
+ Author-email: pyansys.core@ansys.com
9
+ Maintainer: ANSYS, Inc.
10
+ Maintainer-email: pyansys.core@ansys.com
11
+ Requires-Python: >=3.9,<4.0
12
+ Classifier: Development Status :: 2 - Pre-Alpha
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Dist: ansys-grantami-serverapi-openapi (==3.0.0)
21
+ Requires-Dist: ansys-openapi-common (>=2.0.0,<3.0.0)
22
+ Project-URL: Documentation, https://jobqueue.grantami.docs.pyansys.com
23
+ Project-URL: Repository, https://github.com/ansys/grantami-jobqueue
24
+ Description-Content-Type: text/x-rst
25
+
26
+ |pyansys| |python| |pypi| |GH-CI| |codecov| |MIT| |black|
27
+
28
+ .. |pyansys| image:: https://img.shields.io/badge/Py-Ansys-ffc107.svg?labelColor=black&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABDklEQVQ4jWNgoDfg5mD8vE7q/3bpVyskbW0sMRUwofHD7Dh5OBkZGBgW7/3W2tZpa2tLQEOyOzeEsfumlK2tbVpaGj4N6jIs1lpsDAwMJ278sveMY2BgCA0NFRISwqkhyQ1q/Nyd3zg4OBgYGNjZ2ePi4rB5loGBhZnhxTLJ/9ulv26Q4uVk1NXV/f///////69du4Zdg78lx//t0v+3S88rFISInD59GqIH2esIJ8G9O2/XVwhjzpw5EAam1xkkBJn/bJX+v1365hxxuCAfH9+3b9/+////48cPuNehNsS7cDEzMTAwMMzb+Q2u4dOnT2vWrMHu9ZtzxP9vl/69RVpCkBlZ3N7enoDXBwEAAA+YYitOilMVAAAAAElFTkSuQmCC
29
+ :target: https://docs.pyansys.com/
30
+ :alt: PyAnsys
31
+
32
+ .. |python| image:: https://img.shields.io/pypi/pyversions/ansys-grantami-jobqueue?logo=pypi
33
+ :target: https://pypi.org/project/ansys-grantami-jobqueue/
34
+ :alt: Python
35
+
36
+ .. |pypi| image:: https://img.shields.io/pypi/v/ansys-grantami-jobqueue.svg?logo=python&logoColor=white
37
+ :target: https://pypi.org/project/ansys-grantami-jobqueue
38
+ :alt: PyPI
39
+
40
+ .. |codecov| image:: https://codecov.io/gh/ansys/grantami-jobqueue/branch/main/graph/badge.svg
41
+ :target: https://codecov.io/gh/ansys/grantami-jobqueue
42
+ :alt: Codecov
43
+
44
+ .. |GH-CI| image:: https://github.com/ansys/grantami-jobqueue/actions/workflows/ci_cd.yml/badge.svg
45
+ :target: https://github.com/ansys/grantami-jobqueue/actions/workflows/ci_cd.yml
46
+ :alt: GH-CI
47
+
48
+ .. |MIT| image:: https://img.shields.io/badge/License-MIT-yellow.svg
49
+ :target: https://opensource.org/licenses/MIT
50
+ :alt: MIT
51
+
52
+ .. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat
53
+ :target: https://github.com/psf/black
54
+ :alt: Black
55
+
56
+
57
+ PyGranta JobQueue
58
+ =================
59
+
60
+ ..
61
+ _after-badges
62
+
63
+
64
+ PyGranta JobQueue allows you to import and export correctly formatted Excel and text files to and from
65
+ Granta MI.
66
+
67
+
68
+ Dependencies
69
+ ------------
70
+ .. readme_software_requirements
71
+
72
+ To use PyGranta JobQueue, you must have access to a Granta MI 2024 R2 deployment.
73
+
74
+ The ``ansys.grantami.jobqueue`` package currently supports Python version 3.9 through 3.12.
75
+
76
+ .. readme_software_requirements_end
77
+
78
+
79
+
80
+ Installation
81
+ ------------
82
+ .. readme_installation
83
+
84
+ To install the latest PyGranta JobQueue release from `PyPI <https://pypi.org/project/ansys-grantami-jobqueue/>`_,
85
+ run this command:
86
+
87
+ .. code::
88
+
89
+ pip install ansys-grantami-jobqueue
90
+
91
+ To install a release compatible with a specific version of Granta MI, install the
92
+ `PyGranta <https://grantami.docs.pyansys.com/>`_ metapackage with a requirement specifier:
93
+
94
+ .. code::
95
+
96
+ pip install pygranta==2024.2.0
97
+
98
+ Alternatively, to install the latest release from the `PyGranta JobQueue repository <https://github.com/ansys/grantami-jobqueue>`_,
99
+ run this command:
100
+
101
+ .. code::
102
+
103
+ pip install git:https://github.com/ansys/grantami-jobqueue.git
104
+
105
+
106
+ To install a local *development* version with Git and Poetry, run these commands:
107
+
108
+ .. code::
109
+
110
+ git clone https://github.com/ansys/grantami-jobqueue
111
+ cd grantami-jobqueue
112
+ poetry install
113
+
114
+
115
+ The preceding commands install the package in development mode so that you can modify
116
+ it locally. Your changes are reflected in your Python setup after restarting the Python kernel.
117
+
118
+ .. readme_installation_end
119
+
@@ -0,0 +1,93 @@
1
+ |pyansys| |python| |pypi| |GH-CI| |codecov| |MIT| |black|
2
+
3
+ .. |pyansys| image:: https://img.shields.io/badge/Py-Ansys-ffc107.svg?labelColor=black&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABDklEQVQ4jWNgoDfg5mD8vE7q/3bpVyskbW0sMRUwofHD7Dh5OBkZGBgW7/3W2tZpa2tLQEOyOzeEsfumlK2tbVpaGj4N6jIs1lpsDAwMJ278sveMY2BgCA0NFRISwqkhyQ1q/Nyd3zg4OBgYGNjZ2ePi4rB5loGBhZnhxTLJ/9ulv26Q4uVk1NXV/f///////69du4Zdg78lx//t0v+3S88rFISInD59GqIH2esIJ8G9O2/XVwhjzpw5EAam1xkkBJn/bJX+v1365hxxuCAfH9+3b9/+////48cPuNehNsS7cDEzMTAwMMzb+Q2u4dOnT2vWrMHu9ZtzxP9vl/69RVpCkBlZ3N7enoDXBwEAAA+YYitOilMVAAAAAElFTkSuQmCC
4
+ :target: https://docs.pyansys.com/
5
+ :alt: PyAnsys
6
+
7
+ .. |python| image:: https://img.shields.io/pypi/pyversions/ansys-grantami-jobqueue?logo=pypi
8
+ :target: https://pypi.org/project/ansys-grantami-jobqueue/
9
+ :alt: Python
10
+
11
+ .. |pypi| image:: https://img.shields.io/pypi/v/ansys-grantami-jobqueue.svg?logo=python&logoColor=white
12
+ :target: https://pypi.org/project/ansys-grantami-jobqueue
13
+ :alt: PyPI
14
+
15
+ .. |codecov| image:: https://codecov.io/gh/ansys/grantami-jobqueue/branch/main/graph/badge.svg
16
+ :target: https://codecov.io/gh/ansys/grantami-jobqueue
17
+ :alt: Codecov
18
+
19
+ .. |GH-CI| image:: https://github.com/ansys/grantami-jobqueue/actions/workflows/ci_cd.yml/badge.svg
20
+ :target: https://github.com/ansys/grantami-jobqueue/actions/workflows/ci_cd.yml
21
+ :alt: GH-CI
22
+
23
+ .. |MIT| image:: https://img.shields.io/badge/License-MIT-yellow.svg
24
+ :target: https://opensource.org/licenses/MIT
25
+ :alt: MIT
26
+
27
+ .. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat
28
+ :target: https://github.com/psf/black
29
+ :alt: Black
30
+
31
+
32
+ PyGranta JobQueue
33
+ =================
34
+
35
+ ..
36
+ _after-badges
37
+
38
+
39
+ PyGranta JobQueue allows you to import and export correctly formatted Excel and text files to and from
40
+ Granta MI.
41
+
42
+
43
+ Dependencies
44
+ ------------
45
+ .. readme_software_requirements
46
+
47
+ To use PyGranta JobQueue, you must have access to a Granta MI 2024 R2 deployment.
48
+
49
+ The ``ansys.grantami.jobqueue`` package currently supports Python version 3.9 through 3.12.
50
+
51
+ .. readme_software_requirements_end
52
+
53
+
54
+
55
+ Installation
56
+ ------------
57
+ .. readme_installation
58
+
59
+ To install the latest PyGranta JobQueue release from `PyPI <https://pypi.org/project/ansys-grantami-jobqueue/>`_,
60
+ run this command:
61
+
62
+ .. code::
63
+
64
+ pip install ansys-grantami-jobqueue
65
+
66
+ To install a release compatible with a specific version of Granta MI, install the
67
+ `PyGranta <https://grantami.docs.pyansys.com/>`_ metapackage with a requirement specifier:
68
+
69
+ .. code::
70
+
71
+ pip install pygranta==2024.2.0
72
+
73
+ Alternatively, to install the latest release from the `PyGranta JobQueue repository <https://github.com/ansys/grantami-jobqueue>`_,
74
+ run this command:
75
+
76
+ .. code::
77
+
78
+ pip install git:https://github.com/ansys/grantami-jobqueue.git
79
+
80
+
81
+ To install a local *development* version with Git and Poetry, run these commands:
82
+
83
+ .. code::
84
+
85
+ git clone https://github.com/ansys/grantami-jobqueue
86
+ cd grantami-jobqueue
87
+ poetry install
88
+
89
+
90
+ The preceding commands install the package in development mode so that you can modify
91
+ it locally. Your changes are reflected in your Python setup after restarting the Python kernel.
92
+
93
+ .. readme_installation_end
@@ -0,0 +1,123 @@
1
+ [build-system]
2
+ requires = ["poetry-core>=1.0.0"]
3
+ build-backend = "poetry.core.masonry.api"
4
+
5
+ [tool.poetry]
6
+ # Check https://python-poetry.org/docs/pyproject/ for all available sections
7
+ name = "ansys-grantami-jobqueue"
8
+ version = "1.0.0rc0"
9
+ description = "A python wrapper for the Granta MI Job Queue API"
10
+ license = "MIT"
11
+ authors = ["ANSYS, Inc. <pyansys.core@ansys.com>"]
12
+ maintainers = ["ANSYS, Inc. <pyansys.core@ansys.com>"]
13
+ readme = "README.rst"
14
+ repository = "https://github.com/ansys/grantami-jobqueue"
15
+ documentation = "https://jobqueue.grantami.docs.pyansys.com"
16
+ classifiers = [
17
+ "Development Status :: 2 - Pre-Alpha",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.9",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "License :: OSI Approved :: MIT License",
24
+ "Operating System :: OS Independent",
25
+ ]
26
+ packages = [
27
+ { include = "ansys", from = "src" },
28
+ ]
29
+
30
+ [tool.poetry.dependencies]
31
+ python = ">=3.9,<4.0"
32
+ ansys-openapi-common = "^2.0.0"
33
+ ansys-grantami-serverapi-openapi = "3.0.0"
34
+
35
+ # Optional documentation dependencies
36
+ [tool.poetry.group.doc]
37
+ optional = true
38
+
39
+ [tool.poetry.group.doc.dependencies]
40
+ sphinx = "^7.0.1"
41
+ numpydoc = "^1.4.0"
42
+ ansys-sphinx-theme = "^0.15.0"
43
+ sphinx-copybutton = "^0.5.0"
44
+ jupytext = "^1.14.4"
45
+ nbsphinx = "^0.9.0"
46
+ ipykernel = "^6.21.2" # required by nbsphinx to run notebooks.
47
+ sphinx-jinja = "^2.0.2"
48
+ enum-tools = "^0.12.0"
49
+ sphinx-toolbox = "^3.5.0"
50
+ sphinx-design = "^0.5.0"
51
+ sphinx-autoapi = "^3.1.0a2"
52
+ sphinxcontrib-napoleon = "^0.7.0"
53
+
54
+ [tool.poetry.group.dev.dependencies]
55
+ pytest = "^8.0.2"
56
+ pytest-cov = "^5.0.0"
57
+ requests-mock = "^1.10.0"
58
+ pre-commit = "^3.2.2"
59
+ mypy = "^1.8.0"
60
+
61
+ [tool.black]
62
+ line-length = 100
63
+
64
+ [tool.isort]
65
+ profile = "black"
66
+ force_sort_within_sections = true
67
+ line_length = 100
68
+ default_section = "THIRDPARTY"
69
+ src_paths = ["doc", "src", "tests"]
70
+
71
+ [tool.coverage.run]
72
+ source = ["ansys.grantami"]
73
+
74
+ [tool.coverage.report]
75
+ show_missing = true
76
+
77
+ [tool.pytest.ini_options]
78
+ filterwarnings = "error"
79
+ markers = [
80
+ """integration: test requires a real database (deselect with '-m \"not integration\"')"""
81
+ ]
82
+
83
+ [tool.pydocstyle]
84
+ convention = "numpy"
85
+
86
+ [tool.mypy]
87
+ strict = true
88
+ warn_return_any = true
89
+ warn_unused_configs = true
90
+ warn_redundant_casts = true
91
+ warn_unused_ignores = true
92
+ disallow_untyped_defs = true
93
+ no_implicit_optional = true
94
+ check_untyped_defs = true
95
+ show_error_codes = true
96
+ files = "src"
97
+ explicit_package_bases = true
98
+ mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
99
+ namespace_packages = true
100
+
101
+ [tool.numpydoc_validation]
102
+ checks = [
103
+ "all", # report on all checks, except the below
104
+ "EX01",
105
+ "SA01",
106
+ "ES01",
107
+ ]
108
+
109
+ override_PR02 = [ # numpydoc_validation doesn't support dataclasses
110
+ 'Provides a read\-only configuration of the job queue on the server', # JobQueueProcessingConfiguration
111
+ 'Defines a record to include in an export job', # ExportRecord
112
+ ]
113
+
114
+ override_PR01 = [ # User does not need to instantiate these objects and parameter types are not local to this package
115
+ 'Represents a job on the server', # AsyncJob
116
+ 'Communicates with Granta MI' # JobQueueApiClient
117
+ ]
118
+
119
+ exclude = [ # don't report on objects that match any of these regexes
120
+ '\.__repr__$',
121
+ '\.__new__$',
122
+ '\.__init__$',
123
+ ]
@@ -0,0 +1,53 @@
1
+ # Copyright (C) 2024 ANSYS, Inc. and/or its affiliates.
2
+ # SPDX-License-Identifier: MIT
3
+ #
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.
22
+
23
+ """Python client for Granta MI Server API Job Queue."""
24
+
25
+ import importlib.metadata as importlib_metadata
26
+
27
+ from ._connection import Connection, JobQueueApiClient
28
+ from ._models import (
29
+ AsyncJob,
30
+ ExcelExportJobRequest,
31
+ ExcelImportJobRequest,
32
+ ExportRecord,
33
+ JobQueueProcessingConfiguration,
34
+ JobRequest,
35
+ JobStatus,
36
+ JobType,
37
+ TextImportJobRequest,
38
+ )
39
+
40
+ __all__ = [
41
+ "AsyncJob",
42
+ "Connection",
43
+ "ExcelExportJobRequest",
44
+ "ExcelImportJobRequest",
45
+ "ExportRecord",
46
+ "JobQueueApiClient",
47
+ "JobQueueProcessingConfiguration",
48
+ "JobRequest",
49
+ "JobStatus",
50
+ "JobType",
51
+ "TextImportJobRequest",
52
+ ]
53
+ __version__ = importlib_metadata.version(__name__.replace(".", "-"))