qmenta-core 6.0.0.dev730__tar.gz → 6.0.0.dev731__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
+ .coverage
2
+ *.pyc
3
+ .pytest_cache/
4
+ .mypy_cache/
5
+ .vscode/
6
+ build/
7
+ dist/
8
+ REVISION
9
+ .vscode/
10
+
11
+ # JetBrains IDEs (PyCharm)
12
+ .idea
@@ -1,11 +1,10 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.5
2
2
  Name: qmenta-core
3
- Version: 6.0.0.dev730
3
+ Version: 6.0.0.dev731
4
4
  Summary: QMENTA core library to communicate with the QMENTA platform.
5
- License: Proprietary
6
- Author: QMENTA
7
- Author-email: dev@qmenta.com
8
- Requires-Python: >=3.10,<4.0
5
+ Project-URL: Homepage, https://www.qmenta.com/
6
+ Project-URL: Documentation, https://docs.qmenta.com/core/
7
+ Author-email: QMENTA <dev@qmenta.com>
9
8
  Classifier: Development Status :: 4 - Beta
10
9
  Classifier: Intended Audience :: Developers
11
10
  Classifier: License :: Other/Proprietary License
@@ -14,19 +13,26 @@ Classifier: Programming Language :: Python :: 3.10
14
13
  Classifier: Programming Language :: Python :: 3.11
15
14
  Classifier: Programming Language :: Python :: 3.12
16
15
  Classifier: Programming Language :: Python :: 3.13
17
- Requires-Dist: blinker (>=1.4,<2.0)
18
- Requires-Dist: importlib-metadata (>=6.8.0,<7.0.0)
19
- Requires-Dist: packaging (>=25.0,<26.0)
20
- Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
21
- Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
22
- Requires-Dist: qmenta-anon (>=2.3.0)
23
- Requires-Dist: requests (>=2.31.0,<3.0.0)
24
- Requires-Dist: xdg (>=6.0.0,<7.0.0)
25
- Project-URL: Documentation, https://docs.qmenta.com/core/
26
- Project-URL: Homepage, https://www.qmenta.com/
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Requires-Python: <4,>=3.10
18
+ Requires-Dist: blinker<2,>=1.4
19
+ Requires-Dist: importlib-metadata<7,>=6.8.0
20
+ Requires-Dist: packaging<26,>=25.0
21
+ Requires-Dist: python-dotenv<2,>=1.0.0
22
+ Requires-Dist: pyyaml<7,>=6.0.1
23
+ Requires-Dist: qmenta-anon>=2.4.0
24
+ Requires-Dist: requests<3,>=2.31.0
25
+ Requires-Dist: xdg<7,>=6.0.0
27
26
  Description-Content-Type: text/markdown
28
27
 
29
28
  # QMENTA Core
30
29
  This Python library contains core functionality for communicating with
31
30
  the QMENTA platform.
32
31
 
32
+ ## Development
33
+
34
+ The project is managed with [uv](https://docs.astral.sh/uv/):
35
+
36
+ uv sync
37
+ uv run pytest test
38
+ uv run mypy src
@@ -0,0 +1,11 @@
1
+ # QMENTA Core
2
+ This Python library contains core functionality for communicating with
3
+ the QMENTA platform.
4
+
5
+ ## Development
6
+
7
+ The project is managed with [uv](https://docs.astral.sh/uv/):
8
+
9
+ uv sync
10
+ uv run pytest test
11
+ uv run mypy src
@@ -0,0 +1,77 @@
1
+ [project]
2
+ name = "qmenta-core"
3
+ version = "6.0.0.dev731"
4
+ description = "QMENTA core library to communicate with the QMENTA platform."
5
+ authors = [{ name = "QMENTA", email = "dev@qmenta.com" }]
6
+ requires-python = ">=3.10,<4"
7
+ readme = "README.md"
8
+ classifiers = [
9
+ "Development Status :: 4 - Beta",
10
+ "Intended Audience :: Developers",
11
+ "License :: Other/Proprietary License",
12
+ "Programming Language :: Python :: 3",
13
+ "Programming Language :: Python :: 3.10",
14
+ "Programming Language :: Python :: 3.11",
15
+ "Programming Language :: Python :: 3.12",
16
+ "Programming Language :: Python :: 3.13",
17
+ "Programming Language :: Python :: 3.14",
18
+ ]
19
+ dependencies = [
20
+ "requests>=2.31.0,<3",
21
+ "pyyaml>=6.0.1,<7",
22
+ "qmenta-anon>=2.4.0",
23
+ "importlib-metadata>=6.8.0,<7",
24
+ "xdg>=6.0.0,<7",
25
+ "python-dotenv>=1.0.0,<2",
26
+ "blinker>=1.4,<2",
27
+ "packaging>=25.0,<26",
28
+ ]
29
+
30
+ [project.urls]
31
+ Homepage = "https://www.qmenta.com/"
32
+ Documentation = "https://docs.qmenta.com/core/"
33
+
34
+ [project.scripts]
35
+ qmenta-auth = "qmenta.core.auth:main"
36
+
37
+ [dependency-groups]
38
+ dev = [
39
+ "flake8>=6.1.0,<7",
40
+ "mypy>=1.5.1,<2",
41
+ "pytest>=7.4.0,<8",
42
+ "coverage[toml]>=7.3.0,<8",
43
+ "pytest-cov>=6.1.1,<7",
44
+ "sphinx-rtd-theme>=1.3.0,<2",
45
+ "dom-toml>=0.6.1,<0.7",
46
+ "scriv[toml]>=1.3.1,<2",
47
+ "types-requests>=2.31.0.2,<3",
48
+ ]
49
+
50
+ [tool.hatch.build.targets.sdist]
51
+ include = ["src/qmenta"]
52
+
53
+ [tool.hatch.build.targets.wheel]
54
+ packages = ["src/qmenta"]
55
+
56
+ [build-system]
57
+ requires = ["hatchling"]
58
+ build-backend = "hatchling.build"
59
+
60
+ [tool.coverage.report]
61
+ fail_under = 90
62
+
63
+ [tool.scriv]
64
+ format = "md"
65
+ md_header_level = "2"
66
+ insert_marker = "scriv-insert-here"
67
+
68
+ [tool.mypy]
69
+ mypy_path = "src"
70
+ strict = true
71
+ ignore_missing_imports = true
72
+ disallow_untyped_calls = false
73
+
74
+ [tool.uv]
75
+ exclude-newer = "7 days"
76
+ # First-party package, released by our own pipeline: no cooldown.
77
+ exclude-newer-package = { qmenta-anon = false }
@@ -5,7 +5,7 @@ import requests
5
5
  import sys
6
6
  from getpass import getpass
7
7
  from pathlib import Path
8
- from typing import Optional, Dict
8
+ from typing import Any, Optional, Dict
9
9
  from urllib.parse import urljoin, urlparse
10
10
 
11
11
  from xdg import xdg_data_home
@@ -200,15 +200,15 @@ class Auth:
200
200
  # Raises an exception for 4xx and 5xx status codes
201
201
  response.raise_for_status()
202
202
  # Assuming the response contains JSON data
203
- data: dict = response.json()
203
+ data: Dict[str, Any] = response.json()
204
204
  # Process the data here
205
205
  except requests.exceptions.HTTPError as e:
206
206
  if e.response.status_code == 404:
207
207
  raise ConnectionError("API returned a 404 error: Not Found")
208
208
  else:
209
- raise ConnectionError("API returned an error:", e)
209
+ raise ConnectionError(f"API returned an error: {e}")
210
210
  except InvalidResponseError as e:
211
- raise InvalidResponseError("Invalid Response Error:", e)
211
+ raise InvalidResponseError(f"Invalid Response Error: {e}")
212
212
  except requests.RequestException as e:
213
213
  raise ConnectionError(str(e))
214
214
  except Exception as e:
@@ -33,7 +33,7 @@ class ChooseDataError(ActionFailedError):
33
33
  analysis_id: int
34
34
  ) -> None:
35
35
  self.warning: str = warning
36
- self.data_to_choose: dict = data_to_choose
36
+ self.data_to_choose: Dict[str, List[str]] = data_to_choose
37
37
  self.analysis_id: int = analysis_id
38
38
 
39
39
 
@@ -1,3 +0,0 @@
1
- # QMENTA Core
2
- This Python library contains core functionality for communicating with
3
- the QMENTA platform.
@@ -1,61 +0,0 @@
1
- [tool.poetry]
2
- name = "qmenta-core"
3
- version = "6.0.0.dev730"
4
- description = "QMENTA core library to communicate with the QMENTA platform."
5
- license = "Proprietary"
6
- authors = ["QMENTA <dev@qmenta.com>"]
7
- readme = "README.md"
8
- homepage = "https://www.qmenta.com/"
9
- documentation = "https://docs.qmenta.com/core/"
10
- classifiers=[
11
- "Development Status :: 4 - Beta",
12
- "Intended Audience :: Developers",
13
- ]
14
- packages = [
15
- { include = "qmenta", from = "src" }
16
- ]
17
-
18
- [tool.poetry.scripts]
19
- qmenta-auth = 'qmenta.core.auth:main'
20
-
21
- [tool.poetry.dependencies]
22
- python = "^3.10"
23
- requests = "^2.31.0"
24
- pyyaml = "^6.0.1"
25
- qmenta-anon = ">=2.3.0"
26
- importlib-metadata = "^6.8.0"
27
- xdg = "^6.0.0"
28
- python-dotenv = "^1.0.0"
29
- # We are not requiring the latest blinker 1.6.2 because that is not
30
- # available in Google Colab, see EN-1810.
31
- blinker = "^1.4"
32
- packaging = "^25.0"
33
-
34
- [tool.poetry.group.dev.dependencies]
35
- flake8 = "^6.1.0"
36
- mypy = "^1.5.1"
37
- pytest = "^7.4.0"
38
- coverage = {version = "^7.3.0", extras = ["toml"]}
39
- pytest-cov = "^6.1.1"
40
- sphinx-rtd-theme = "^1.3.0"
41
- dom-toml = "^0.6.1"
42
- scriv = {version = "^1.3.1", extras = ["toml"]}
43
- types-requests = "^2.31.0.2"
44
-
45
- [build-system]
46
- requires = ["poetry-core>=1.0.0"]
47
- build-backend = "poetry.core.masonry.api"
48
-
49
- [tool.coverage.report]
50
- fail_under = 90
51
-
52
- [tool.scriv]
53
- format = "md"
54
- md_header_level = "2"
55
- insert_marker = "scriv-insert-here"
56
-
57
- [tool.mypy]
58
- mypy_path = "src"
59
- strict = true
60
- ignore_missing_imports = true
61
- disallow_untyped_calls = false