mindbridge-api-python-client 1.6.2__tar.gz → 1.8.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 (72) hide show
  1. mindbridge_api_python_client-1.8.0/.gitignore +186 -0
  2. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/PKG-INFO +12 -18
  3. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/README.md +1 -1
  4. mindbridge_api_python_client-1.8.0/pyproject.toml +195 -0
  5. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/__init__.py +8 -6
  6. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/account_grouping_item.py +5 -2
  7. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/account_groupings.py +4 -3
  8. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/analyses.py +15 -39
  9. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/analysis_item.py +20 -17
  10. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/analysis_period.py +11 -20
  11. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/analysis_source_item.py +8 -13
  12. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/analysis_sources.py +8 -4
  13. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/analysis_type_item.py +4 -1
  14. mindbridge_api_python_client-1.8.0/src/mindbridgeapi/api_token_item.py +85 -0
  15. mindbridge_api_python_client-1.8.0/src/mindbridgeapi/api_tokens.py +142 -0
  16. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/async_result_item.py +8 -5
  17. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/async_results.py +23 -18
  18. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/base_set.py +28 -18
  19. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/chunked_files.py +25 -12
  20. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/common_validators.py +3 -4
  21. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/data_tables.py +10 -23
  22. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/engagement_account_grouping_item.py +4 -1
  23. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/engagement_account_groupings.py +4 -3
  24. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/engagement_item.py +18 -6
  25. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/engagements.py +4 -3
  26. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/exceptions.py +8 -8
  27. mindbridge_api_python_client-1.8.0/src/mindbridgeapi/file_manager.py +325 -0
  28. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/file_manager_item.py +6 -10
  29. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/generated_pydantic_model/model.py +5298 -2615
  30. mindbridge_api_python_client-1.8.0/src/mindbridgeapi/json_tables.py +106 -0
  31. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/library_item.py +4 -1
  32. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/organization_item.py +21 -1
  33. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/organizations.py +36 -0
  34. mindbridge_api_python_client-1.8.0/src/mindbridgeapi/py.typed +0 -0
  35. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/server.py +34 -17
  36. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/task_history_item.py +1 -3
  37. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/task_item.py +5 -2
  38. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/tasks.py +17 -12
  39. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/transaction_id_preview_item.py +1 -3
  40. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/transaction_id_selection.py +1 -1
  41. mindbridge_api_python_client-1.8.0/src/mindbridgeapi/user_item.py +63 -0
  42. mindbridge_api_python_client-1.8.0/src/mindbridgeapi/users.py +151 -0
  43. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/version.py +10 -7
  44. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/virtual_column.py +10 -5
  45. mindbridge_api_python_client-1.6.2/pyproject.toml +0 -206
  46. mindbridge_api_python_client-1.6.2/src/mindbridgeapi/enumerations/analysis_source_type.py +0 -142
  47. mindbridge_api_python_client-1.6.2/src/mindbridgeapi/enumerations/analysis_type.py +0 -36
  48. mindbridge_api_python_client-1.6.2/src/mindbridgeapi/enumerations/deprecated_enum.py +0 -69
  49. mindbridge_api_python_client-1.6.2/src/mindbridgeapi/enumerations/system_library.py +0 -32
  50. mindbridge_api_python_client-1.6.2/src/mindbridgeapi/file_manager.py +0 -186
  51. mindbridge_api_python_client-1.6.2/src/mindbridgeapi/users.py +0 -44
  52. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/LICENSE.txt +0 -0
  53. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/account_group_item.py +0 -0
  54. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/account_groups.py +0 -0
  55. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/account_mapping_item.py +0 -0
  56. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/account_mappings.py +0 -0
  57. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/accounting_period.py +0 -0
  58. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/analysis_result_item.py +0 -0
  59. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/analysis_results.py +0 -0
  60. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/analysis_source_type_item.py +0 -0
  61. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/analysis_source_types.py +0 -0
  62. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/analysis_types.py +0 -0
  63. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/chunked_file_item.py +0 -0
  64. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/chunked_file_part_item.py +0 -0
  65. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/column_mapping.py +0 -0
  66. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/engagement_account_group_item.py +0 -0
  67. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/engagement_account_groups.py +0 -0
  68. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/file_result_item.py +0 -0
  69. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/file_results.py +0 -0
  70. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/libraries.py +0 -0
  71. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/task_histories.py +0 -0
  72. {mindbridge_api_python_client-1.6.2 → mindbridge_api_python_client-1.8.0}/src/mindbridgeapi/transaction_id_previews.py +0 -0
@@ -0,0 +1,186 @@
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
+ docs/_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
+
176
+ # Other IDEs
177
+ .vscode/
178
+ .project
179
+ .pydevproject
180
+ dask-worker-space/
181
+
182
+ # macOS
183
+ .DS_Store
184
+
185
+ # Aider (https://aider.chat/)
186
+ .aider*
@@ -1,30 +1,25 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: mindbridge-api-python-client
3
- Version: 1.6.2
3
+ Version: 1.8.0
4
4
  Summary: Interact with the MindBridge API
5
- License: LicenseRef-Proprietary
5
+ Project-URL: Homepage, https://www.mindbridge.ai
6
+ Author-email: MBAI Support <mbaisupport@mindbridge.ai>
7
+ Maintainer-email: MBAI Support <mbaisupport@mindbridge.ai>
8
+ License-Expression: LicenseRef-Proprietary
9
+ License-File: LICENSE.txt
6
10
  Keywords: MindBridge
7
- Author: MBAI Support
8
- Author-email: mbaisupport@mindbridge.ai
9
- Maintainer: MBAI Support
10
- Maintainer-email: mbaisupport@mindbridge.ai
11
- Requires-Python: >= 3.9
12
11
  Classifier: Development Status :: 4 - Beta
13
- Classifier: Framework :: Pydantic
14
- Classifier: Framework :: Pydantic :: 2
15
- Classifier: Framework :: Pytest
16
- Classifier: License :: Other/Proprietary License
17
12
  Classifier: Operating System :: OS Independent
18
- Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3 :: Only
19
14
  Classifier: Programming Language :: Python :: 3.9
20
15
  Classifier: Programming Language :: Python :: 3.10
21
16
  Classifier: Programming Language :: Python :: 3.11
22
17
  Classifier: Programming Language :: Python :: 3.12
23
18
  Classifier: Programming Language :: Python :: 3.13
24
19
  Classifier: Typing :: Typed
25
- Requires-Dist: pydantic (>=2.5.2,<3.0.0)
26
- Requires-Dist: urllib3 (>=2.3.0,<3.0.0)
27
- Project-URL: Homepage, https://www.mindbridge.ai
20
+ Requires-Python: >=3.9
21
+ Requires-Dist: pydantic>=2.8.1
22
+ Requires-Dist: urllib3>=2.2.2
28
23
  Description-Content-Type: text/markdown
29
24
 
30
25
  <h1 align="center">MindBridge API Python Client</h1>
@@ -43,7 +38,7 @@ python -m pip install mindbridge-api-python-client
43
38
 
44
39
  ## Usage
45
40
  Replace `subdomain.mindbridge.ai` with your MindBridge tenant URL.
46
- ```python
41
+ ```py
47
42
  import getpass
48
43
  import mindbridgeapi as mbapi
49
44
 
@@ -57,4 +52,3 @@ organization = server.organizations.create(organization)
57
52
 
58
53
  # Create engagements, analyses and run them, etc.
59
54
  ```
60
-
@@ -14,7 +14,7 @@ python -m pip install mindbridge-api-python-client
14
14
 
15
15
  ## Usage
16
16
  Replace `subdomain.mindbridge.ai` with your MindBridge tenant URL.
17
- ```python
17
+ ```py
18
18
  import getpass
19
19
  import mindbridgeapi as mbapi
20
20
 
@@ -0,0 +1,195 @@
1
+ [build-system]
2
+ build-backend = "hatchling.build"
3
+ requires = [ "hatchling" ]
4
+
5
+ [project]
6
+ name = "mindbridge-api-python-client"
7
+ description = "Interact with the MindBridge API"
8
+ readme = "README.md"
9
+ keywords = [ "MindBridge" ]
10
+ license = "LicenseRef-Proprietary"
11
+ license-files = [ "LICENSE.txt" ]
12
+ maintainers = [
13
+ { name = "MBAI Support", email = "mbaisupport@mindbridge.ai" },
14
+ ]
15
+ authors = [
16
+ { name = "MBAI Support", email = "mbaisupport@mindbridge.ai" },
17
+ ]
18
+ requires-python = ">=3.9"
19
+ classifiers = [
20
+ "Development Status :: 4 - Beta",
21
+ "Operating System :: OS Independent",
22
+ "Programming Language :: Python :: 3 :: Only",
23
+ "Programming Language :: Python :: 3.9",
24
+ "Programming Language :: Python :: 3.10",
25
+ "Programming Language :: Python :: 3.11",
26
+ "Programming Language :: Python :: 3.12",
27
+ "Programming Language :: Python :: 3.13",
28
+ "Typing :: Typed",
29
+ ]
30
+ dynamic = [ "version" ]
31
+ dependencies = [
32
+ "pydantic>=2.8.1",
33
+ "urllib3>=2.2.2",
34
+ ]
35
+ urls.Homepage = "https://www.mindbridge.ai"
36
+
37
+ [dependency-groups]
38
+ dev = [
39
+ { include-group = "docs" },
40
+ { include-group = "lint" },
41
+ { include-group = "model" },
42
+ { include-group = "test" },
43
+ { include-group = "type" },
44
+ ]
45
+ test = [
46
+ "openpyxl>=3.1.5",
47
+ "pandas>=2.2.3",
48
+ "pytest>=8.1.1",
49
+ "pytest-cov>=6.0.0",
50
+ "pytest-html>=4.1.1",
51
+ "pytest-randomly>=3.15.0",
52
+ { include-group = "model" },
53
+ ]
54
+ type = [
55
+ "mypy>=1.13.0",
56
+ { include-group = "model" },
57
+ ]
58
+ docs = [
59
+ "mkdocs-material>=9.6.4",
60
+ "mkdocstrings-python>=1.15.0",
61
+ ]
62
+ lint = [
63
+ "ruff>=0.10.0",
64
+ ]
65
+ model = [
66
+ "datamodel-code-generator[ruff]>=0.31.0",
67
+ ]
68
+
69
+ [tool.hatch]
70
+ version.path = "src/mindbridgeapi/version.py"
71
+ build.targets.wheel.packages = [ "src/mindbridgeapi" ]
72
+ build.targets.sdist.only-include = [ "src/mindbridgeapi" ]
73
+
74
+ [tool.ruff]
75
+ extend-exclude = [
76
+ ".cci_pycache",
77
+ "src/mindbridgeapi/generated_pydantic_model/model.py",
78
+ ]
79
+
80
+ [tool.ruff.format]
81
+ line-ending = "lf"
82
+ skip-magic-trailing-comma = true
83
+ docstring-code-format = true
84
+
85
+ [tool.ruff.lint]
86
+ select = [ "ALL" ]
87
+ ignore = [
88
+ # flake8-clean-block = "^0.1.2"
89
+ # flake8-encodings = "^0.5.1" https://github.com/astral-sh/ruff/issues/3278
90
+ "ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `...`
91
+ "CPY001", # Missing copyright notice at top of file
92
+ "D1", # Missing docstring...
93
+ "FA", # flake8-future-annotations
94
+ "SLF001", # Private member accessed
95
+ # When using Ruff as a formatter, we recommend avoiding the following lint rules:
96
+ "W191", # tab-indentation (W191)
97
+ "E111", # indentation-with-invalid-multiple (E111)
98
+ "E114", # indentation-with-invalid-multiple-comment (E114)
99
+ "E117", # over-indented (E117)
100
+ "D206", # docstring-tab-indentation (D206)
101
+ "D300", # triple-single-quotes (D300)
102
+ "Q000", # bad-quotes-inline-string (Q000)
103
+ "Q001", # bad-quotes-multiline-string (Q001)
104
+ "Q002", # bad-quotes-docstring (Q002)
105
+ "Q003", # avoidable-escaped-quote (Q003)
106
+ "COM812", # missing-trailing-comma (COM812)
107
+ "COM819", # prohibited-trailing-comma (COM819)
108
+ # multi-line-implicit-string-concatenation (ISC002) if used without ISC001 and flake8-implicit-str-concat.allow-multiline = false
109
+ ]
110
+ per-file-ignores."tests/**.py" = [
111
+ "ANN", # flake8-annotations (ANN)
112
+ "ARG001", # Unused function argument: `...`
113
+ "ARG002", # Unused method argument: `...`
114
+ "DOC", # pydoclint (DOC)
115
+ "PLR6301", # Method `...` could be a function, class method, or static method
116
+ "S101", # Use of `assert` detected
117
+ ]
118
+ flake8-builtins.ignorelist = [ "id", "type" ]
119
+ flake8-tidy-imports.ban-relative-imports = "all"
120
+ isort.combine-as-imports = true
121
+ isort.force-sort-within-sections = true
122
+ isort.no-lines-before = [ "first-party", "future", "local-folder", "standard-library", "third-party" ]
123
+ isort.split-on-trailing-comma = false
124
+ pydocstyle.convention = "google"
125
+
126
+ [tool.pytest.ini_options]
127
+ addopts = [
128
+ "--strict-config",
129
+ "--strict-markers",
130
+ "--cov=mindbridgeapi",
131
+ "--cov=generate_model",
132
+ "--cov=set_circleci_pytest_enviroment_variables",
133
+ "--cov-report=html",
134
+ "--cov-report=term",
135
+ ]
136
+ xfail_strict = true
137
+ filterwarnings = [ "error" ]
138
+ pythonpath = [ "tools" ]
139
+
140
+ [tool.coverage]
141
+ run.branch = true
142
+ run.data_file = ".coverage-reports/.coverage"
143
+ run.omit = [ "src/mindbridgeapi/generated_pydantic_model/*" ]
144
+ report.exclude_also = [
145
+ "if TYPE_CHECKING:",
146
+ 'if __name__ == "__main__":',
147
+ ]
148
+
149
+ [tool.mypy]
150
+ mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
151
+ packages = "mindbridgeapi,tools.generate_model,tools.set_circleci_pytest_enviroment_variables"
152
+ plugins = [ "pydantic.mypy" ]
153
+ strict = true
154
+ no_implicit_optional = true
155
+ show_error_codes = true
156
+
157
+ [tool.uv]
158
+ python-downloads = "never"
159
+ python-preference = "only-system"
160
+
161
+ [tool.pydantic-mypy]
162
+ init_forbid_extra = true
163
+ init_typed = true
164
+ warn_required_dynamic_aliases = true
165
+
166
+ [tool.datamodel-codegen]
167
+ formatters = [ "ruff-format", "ruff-check" ]
168
+ input-file-type = "openapi"
169
+ output-model-type = "pydantic_v2.BaseModel"
170
+ # Typing customization:
171
+ field-constraints = true
172
+ use-annotated = true
173
+ use-standard-collections = true
174
+ use-subclass-enum = true
175
+ # Field customization:
176
+ capitalise-enum-members = true
177
+ force-optional = true
178
+ snake-case-field = true
179
+ # Model customization:
180
+ allow-population-by-field-name = true
181
+ disable-timestamp = true
182
+ output-datetime-class = "AwareDatetime"
183
+ target-python-version = "3.9"
184
+ use-schema-description = true
185
+ # Template customization:
186
+ custom-file-header = """\
187
+ #
188
+ # Copyright MindBridge Analytics Inc. all rights reserved.
189
+ #
190
+ # This material is confidential and may not be copied, distributed,
191
+ # reversed engineered, decompiled or otherwise disseminated without
192
+ # the prior written consent of MindBridge Analytics Inc.
193
+ #"""
194
+ encoding = "utf-8"
195
+ use-double-quotes = true
@@ -12,13 +12,11 @@ from mindbridgeapi.analysis_period import AnalysisPeriod
12
12
  from mindbridgeapi.analysis_source_item import AnalysisSourceItem
13
13
  from mindbridgeapi.analysis_source_type_item import AnalysisSourceTypeItem
14
14
  from mindbridgeapi.analysis_type_item import AnalysisTypeItem
15
+ from mindbridgeapi.api_token_item import ApiTokenItem, ApiTokenPermission
15
16
  from mindbridgeapi.chunked_file_item import ChunkedFileItem
16
17
  from mindbridgeapi.chunked_file_part_item import ChunkedFilePartItem
17
18
  from mindbridgeapi.column_mapping import ColumnMapping
18
19
  from mindbridgeapi.engagement_item import EngagementItem
19
- from mindbridgeapi.enumerations.analysis_source_type import AnalysisSourceType
20
- from mindbridgeapi.enumerations.analysis_type import AnalysisType
21
- from mindbridgeapi.enumerations.system_library import SystemLibrary
22
20
  from mindbridgeapi.file_manager_item import FileManagerItem, FileManagerType
23
21
  from mindbridgeapi.generated_pydantic_model.model import (
24
22
  Frequency,
@@ -33,18 +31,21 @@ from mindbridgeapi.transaction_id_selection import (
33
31
  TransactionIdSelection,
34
32
  TransactionIdType,
35
33
  )
34
+ from mindbridgeapi.user_item import UserItem, UserRole
35
+ from mindbridgeapi.version import VERSION
36
36
  from mindbridgeapi.virtual_column import VirtualColumn, VirtualColumnType
37
37
 
38
+ __version__ = VERSION
38
39
  __all__ = [
39
40
  "AccountingPeriod",
40
41
  "AnalysisEffectiveDateMetricsPeriod",
41
42
  "AnalysisItem",
42
43
  "AnalysisPeriod",
43
44
  "AnalysisSourceItem",
44
- "AnalysisSourceType",
45
45
  "AnalysisSourceTypeItem",
46
- "AnalysisType",
47
46
  "AnalysisTypeItem",
47
+ "ApiTokenItem",
48
+ "ApiTokenPermission",
48
49
  "ChunkedFileItem",
49
50
  "ChunkedFilePartItem",
50
51
  "ColumnMapping",
@@ -55,13 +56,14 @@ __all__ = [
55
56
  "LibraryItem",
56
57
  "OrganizationItem",
57
58
  "Server",
58
- "SystemLibrary",
59
59
  "TargetWorkflowState",
60
60
  "TaskItem",
61
61
  "TaskStatus",
62
62
  "TaskType",
63
63
  "TransactionIdSelection",
64
64
  "TransactionIdType",
65
+ "UserItem",
66
+ "UserRole",
65
67
  "VirtualColumn",
66
68
  "VirtualColumnType",
67
69
  ]
@@ -17,7 +17,7 @@ from mindbridgeapi.common_validators import (
17
17
  from mindbridgeapi.generated_pydantic_model.model import (
18
18
  ApiAccountGroupingRead,
19
19
  ApiAccountGroupingUpdate,
20
- Type7 as _AccountGroupingFileType,
20
+ Type37 as _AccountGroupingFileType,
21
21
  )
22
22
 
23
23
  # Match the type of ApiImportAccountGroupingParamsCreateOnly.type:
@@ -25,10 +25,13 @@ AccountGroupingFileType = _AccountGroupingFileType
25
25
 
26
26
 
27
27
  def _empty_account_groups() -> Generator[AccountGroupItem, None, None]:
28
- """Empty generator function
28
+ """Empty generator function.
29
29
 
30
30
  This returns an empty generator function, it's use is to ensure account_groups is
31
31
  not None for the AccountGroupingItem class
32
+
33
+ Yields:
34
+ AccountGroupItem: Will never yield anything
32
35
  """
33
36
  yield from ()
34
37
 
@@ -69,7 +69,7 @@ class AccountGroupings(BaseSet):
69
69
  def wait_for_export(
70
70
  self, async_result: AsyncResultItem, max_wait_minutes: int = 5
71
71
  ) -> None:
72
- """Wait for the async result for the data table export to complete
72
+ """Wait for the async result for the data table export to complete.
73
73
 
74
74
  Waits, at most the minutes specified, for the async result to be COMPLETE and
75
75
  raises and error if any error
@@ -79,10 +79,11 @@ class AccountGroupings(BaseSet):
79
79
  max_wait_minutes (int): Maximum minutes to wait (default: `5`)
80
80
 
81
81
  Raises:
82
- ValueError: If not a ACCOUNT_GROUPING_EXPORT
82
+ ItemError: If not a ACCOUNT_GROUPING_EXPORT
83
83
  """
84
84
  if async_result.type != AsyncResultType.ACCOUNT_GROUPING_EXPORT:
85
- raise ItemError(f"{async_result.type=}.")
85
+ msg = f"{async_result.type=}."
86
+ raise ItemError(msg)
86
87
 
87
88
  self.async_result_set._wait_for_async_result(
88
89
  async_result=async_result,
@@ -11,7 +11,6 @@ from datetime import date
11
11
  from functools import cached_property
12
12
  import logging
13
13
  from typing import TYPE_CHECKING, Any, Optional
14
- import warnings
15
14
  from mindbridgeapi.analysis_item import AnalysisItem
16
15
  from mindbridgeapi.analysis_results import AnalysisResults
17
16
  from mindbridgeapi.analysis_sources import AnalysisSources
@@ -94,22 +93,8 @@ class Analyses(BaseSet):
94
93
  return self.get_by_id(analysis_id)
95
94
 
96
95
  def wait_for_analysis_sources(
97
- self,
98
- analysis: AnalysisItem,
99
- check_interval_seconds: int = -873, # Depreciated
100
- max_wait_minutes: int = 24 * 60,
96
+ self, analysis: AnalysisItem, max_wait_minutes: int = 24 * 60
101
97
  ) -> AnalysisItem:
102
- if check_interval_seconds != -873:
103
- warnings.warn(
104
- "check_interval_seconds was provided to wait_for_analysis_sources as "
105
- f"{check_interval_seconds}. This will not be referenced as now the "
106
- "check interval will be exponentially increasing to a max interval",
107
- category=DeprecationWarning,
108
- stacklevel=2,
109
- )
110
-
111
- del check_interval_seconds
112
-
113
98
  analysis_id = getattr(analysis, "id", None)
114
99
  if analysis_id is None:
115
100
  raise ItemNotFoundError
@@ -117,11 +102,13 @@ class Analyses(BaseSet):
117
102
  analysis = self.get_by_id(analysis_id)
118
103
 
119
104
  if getattr(analysis, "id", None) != analysis_id:
120
- raise UnexpectedServerError("analysis id was not the same as requested.")
105
+ msg = "analysis id was not the same as requested."
106
+ raise UnexpectedServerError(msg)
121
107
 
122
108
  analysis_sources = list(analysis.analysis_sources)
123
109
  if not analysis_sources:
124
- raise ItemError("Analysis has no analysis sources to wait for.")
110
+ msg = "Analysis has no analysis sources to wait for."
111
+ raise ItemError(msg)
125
112
 
126
113
  # Get the list of async_result ids
127
114
  async_results_to_check = []
@@ -141,10 +128,11 @@ class Analyses(BaseSet):
141
128
  This shouldn't occur as analysis sources are started as soon as they are
142
129
  added to the analysis
143
130
  """
144
- raise UnexpectedServerError(
145
- f"Unable to find {EntityType.ANALYSIS_SOURCE} status for:"
146
- f" {analysis_source.id}."
131
+ msg = (
132
+ f"Unable to find {EntityType.ANALYSIS_SOURCE} status for: "
133
+ f"{analysis_source.id}."
147
134
  )
135
+ raise UnexpectedServerError(msg)
148
136
 
149
137
  async_result = max(
150
138
  async_results_list,
@@ -164,7 +152,7 @@ class Analyses(BaseSet):
164
152
  analysis_status, "preflight_errors", []
165
153
  )
166
154
  if analysis_status_ready:
167
- logger.info(f"Analysis ({analysis_id}) is ready to run")
155
+ logger.info("Analysis (%s) is ready to run", analysis_id)
168
156
  else:
169
157
  err_msg = f"Analysis ({analysis_id}) is not ready to run"
170
158
  if len(analysis_status_preflight_errors) == 0:
@@ -228,32 +216,19 @@ class Analyses(BaseSet):
228
216
  logger.info(log_message)
229
217
 
230
218
  def wait_for_analysis(
231
- self,
232
- analysis: AnalysisItem,
233
- check_interval_seconds: int = -873, # Depreciated
234
- max_wait_minutes: int = 24 * 60,
219
+ self, analysis: AnalysisItem, max_wait_minutes: int = 24 * 60
235
220
  ) -> AnalysisItem:
236
- if check_interval_seconds != -873:
237
- warnings.warn(
238
- "check_interval_seconds was provided to wait_for_analysis as "
239
- f"{check_interval_seconds}. This will not be referenced as now the "
240
- "check interval will be exponentially increasing to a max interval",
241
- category=DeprecationWarning,
242
- stacklevel=2,
243
- )
244
-
245
- del check_interval_seconds
246
-
247
221
  if analysis.id is None:
248
222
  raise ItemNotFoundError
249
223
 
250
224
  self.restart_analysis_results(analysis)
251
225
  analysis_results_list = list(analysis.analysis_results)
252
226
  if not analysis_results_list:
253
- raise ValidationError(
227
+ msg = (
254
228
  f"Unable to find any analysis_results for: {analysis.id}. Possibly the "
255
229
  "analysis has not been started yet?"
256
230
  )
231
+ raise ValidationError(msg)
257
232
 
258
233
  analysis_result = max(
259
234
  analysis_results_list, key=lambda x: getattr(x, "creation_date", date.min)
@@ -270,10 +245,11 @@ class Analyses(BaseSet):
270
245
  )
271
246
  async_results_list = list(async_results)
272
247
  if not async_results_list:
273
- raise ValidationError(
248
+ msg = (
274
249
  f"Unable to find {AsyncResultType.ANALYSIS_RUN} for: {analysis.id}."
275
250
  " Possibly the analysis has not been started yet?"
276
251
  )
252
+ raise ValidationError(msg)
277
253
 
278
254
  async_result = max(
279
255
  async_results_list, key=lambda x: getattr(x, "last_modified_date", date.min)