pysq 0.1.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.
- pysq-0.1.0/MANIFEST.in +5 -0
- pysq-0.1.0/PKG-INFO +55 -0
- pysq-0.1.0/README.md +30 -0
- pysq-0.1.0/pyproject.toml +48 -0
- pysq-0.1.0/pysq/__init__.py +74 -0
- pysq-0.1.0/pysq/api.py +641 -0
- pysq-0.1.0/pysq/config.py +95 -0
- pysq-0.1.0/pysq/constants.py +228 -0
- pysq-0.1.0/pysq/dataclasses.py +361 -0
- pysq-0.1.0/pysq/exceptions.py +33 -0
- pysq-0.1.0/pysq/py.typed +0 -0
- pysq-0.1.0/pysq/types.py +478 -0
- pysq-0.1.0/pysq/utils.py +158 -0
- pysq-0.1.0/pysq.egg-info/PKG-INFO +55 -0
- pysq-0.1.0/pysq.egg-info/SOURCES.txt +18 -0
- pysq-0.1.0/pysq.egg-info/dependency_links.txt +1 -0
- pysq-0.1.0/pysq.egg-info/requires.txt +5 -0
- pysq-0.1.0/pysq.egg-info/top_level.txt +1 -0
- pysq-0.1.0/setup.cfg +4 -0
- pysq-0.1.0/setup.py +10 -0
pysq-0.1.0/MANIFEST.in
ADDED
pysq-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pysq
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python SDK for Siroquant API V5
|
|
5
|
+
Author: Siroquant
|
|
6
|
+
License: Proprietary
|
|
7
|
+
Classifier: Development Status :: 4 - Beta
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Requires-Python: >=3.8
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest; extra == "dev"
|
|
23
|
+
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
24
|
+
Requires-Dist: mypy; extra == "dev"
|
|
25
|
+
|
|
26
|
+
# PYSQ - Siroquant SDK for Python
|
|
27
|
+
|
|
28
|
+
Python SDK for the Siroquant V5 API.
|
|
29
|
+
|
|
30
|
+
## Quick Start
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Clone the repository
|
|
34
|
+
git clone https://github.com/Siroquant/pysq.git
|
|
35
|
+
cd pysq
|
|
36
|
+
|
|
37
|
+
# Install the package
|
|
38
|
+
pip install .
|
|
39
|
+
|
|
40
|
+
# Run the example
|
|
41
|
+
python examples/simple_example.py
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Configuration
|
|
45
|
+
|
|
46
|
+
Set paths via environment variables or code:
|
|
47
|
+
|
|
48
|
+
- `SQ_LIB_DIR`: Library directory path
|
|
49
|
+
- `SQ_DLL_PATH`: DLL path (optional, auto-detected)
|
|
50
|
+
|
|
51
|
+
## Requirements
|
|
52
|
+
|
|
53
|
+
- Python 3.8+
|
|
54
|
+
- Windows (x64)
|
|
55
|
+
- Siroquant V5
|
pysq-0.1.0/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# PYSQ - Siroquant SDK for Python
|
|
2
|
+
|
|
3
|
+
Python SDK for the Siroquant V5 API.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Clone the repository
|
|
9
|
+
git clone https://github.com/Siroquant/pysq.git
|
|
10
|
+
cd pysq
|
|
11
|
+
|
|
12
|
+
# Install the package
|
|
13
|
+
pip install .
|
|
14
|
+
|
|
15
|
+
# Run the example
|
|
16
|
+
python examples/simple_example.py
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Configuration
|
|
20
|
+
|
|
21
|
+
Set paths via environment variables or code:
|
|
22
|
+
|
|
23
|
+
- `SQ_LIB_DIR`: Library directory path
|
|
24
|
+
- `SQ_DLL_PATH`: DLL path (optional, auto-detected)
|
|
25
|
+
|
|
26
|
+
## Requirements
|
|
27
|
+
|
|
28
|
+
- Python 3.8+
|
|
29
|
+
- Windows (x64)
|
|
30
|
+
- Siroquant V5
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=45", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pysq"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Python SDK for Siroquant API V5"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = {text = "Proprietary"}
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Siroquant"}
|
|
14
|
+
]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 4 - Beta",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"Intended Audience :: Science/Research",
|
|
19
|
+
"Operating System :: Microsoft :: Windows",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.8",
|
|
22
|
+
"Programming Language :: Python :: 3.9",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
"Topic :: Scientific/Engineering :: Chemistry",
|
|
27
|
+
"Typing :: Typed",
|
|
28
|
+
]
|
|
29
|
+
dependencies = []
|
|
30
|
+
|
|
31
|
+
[project.optional-dependencies]
|
|
32
|
+
dev = ["pytest", "pytest-asyncio", "mypy"]
|
|
33
|
+
|
|
34
|
+
[tool.setuptools]
|
|
35
|
+
packages = ["pysq"]
|
|
36
|
+
|
|
37
|
+
[tool.setuptools.package-data]
|
|
38
|
+
pysq = ["*.dll", "py.typed"]
|
|
39
|
+
|
|
40
|
+
[tool.mypy]
|
|
41
|
+
python_version = "3.8"
|
|
42
|
+
warn_return_any = true
|
|
43
|
+
warn_unused_configs = true
|
|
44
|
+
disallow_untyped_defs = true
|
|
45
|
+
|
|
46
|
+
[tool.pytest.ini_options]
|
|
47
|
+
asyncio_mode = "auto"
|
|
48
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""pysq - Python SDK for Siroquant API V5."""
|
|
2
|
+
|
|
3
|
+
from .api import SQAPI, TaskContext
|
|
4
|
+
from .config import SQAPIConfig
|
|
5
|
+
from .constants import SQErrorCode, SaveTaskFlags, ERROR_MESSAGES, cmaxphases, LIB_NAME
|
|
6
|
+
from .exceptions import (
|
|
7
|
+
SQAPIError,
|
|
8
|
+
SQAPITaskError,
|
|
9
|
+
SQAPIRefinementError,
|
|
10
|
+
SQAPIConfigError
|
|
11
|
+
)
|
|
12
|
+
from .dataclasses import (
|
|
13
|
+
UnitCell,
|
|
14
|
+
UVW,
|
|
15
|
+
TaskInfo,
|
|
16
|
+
PatternInfo,
|
|
17
|
+
RefinementParams,
|
|
18
|
+
RefinementResult,
|
|
19
|
+
PhaseResult,
|
|
20
|
+
SearchMatchResult,
|
|
21
|
+
TraceInfo,
|
|
22
|
+
CrystalliteResult,
|
|
23
|
+
AmorphousResult
|
|
24
|
+
)
|
|
25
|
+
from .utils import (
|
|
26
|
+
validate_task_file,
|
|
27
|
+
validate_pattern_file,
|
|
28
|
+
export_results_to_csv,
|
|
29
|
+
format_error_message
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
# Version: single source from pyproject.toml via importlib.metadata
|
|
33
|
+
try:
|
|
34
|
+
from importlib.metadata import version as _get_version, PackageNotFoundError
|
|
35
|
+
__version__ = _get_version("pysq")
|
|
36
|
+
except (PackageNotFoundError, ImportError):
|
|
37
|
+
__version__ = "0.1.0" # Fallback for development installs
|
|
38
|
+
|
|
39
|
+
__all__ = [
|
|
40
|
+
# Main API
|
|
41
|
+
"SQAPI",
|
|
42
|
+
"TaskContext",
|
|
43
|
+
"SQAPIConfig",
|
|
44
|
+
# Constants
|
|
45
|
+
"SQErrorCode",
|
|
46
|
+
"SaveTaskFlags",
|
|
47
|
+
"ERROR_MESSAGES",
|
|
48
|
+
"cmaxphases",
|
|
49
|
+
"LIB_NAME",
|
|
50
|
+
# Exceptions
|
|
51
|
+
"SQAPIError",
|
|
52
|
+
"SQAPITaskError",
|
|
53
|
+
"SQAPIRefinementError",
|
|
54
|
+
"SQAPIConfigError",
|
|
55
|
+
# Dataclasses
|
|
56
|
+
"UnitCell",
|
|
57
|
+
"UVW",
|
|
58
|
+
"TaskInfo",
|
|
59
|
+
"PatternInfo",
|
|
60
|
+
"RefinementParams",
|
|
61
|
+
"RefinementResult",
|
|
62
|
+
"PhaseResult",
|
|
63
|
+
"SearchMatchResult",
|
|
64
|
+
"TraceInfo",
|
|
65
|
+
"CrystalliteResult",
|
|
66
|
+
"AmorphousResult",
|
|
67
|
+
# Utilities
|
|
68
|
+
"validate_task_file",
|
|
69
|
+
"validate_pattern_file",
|
|
70
|
+
"export_results_to_csv",
|
|
71
|
+
"format_error_message",
|
|
72
|
+
# Version
|
|
73
|
+
"__version__",
|
|
74
|
+
]
|