problm-solver 1.5.1__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,156 @@
1
+ Metadata-Version: 2.3
2
+ Name: problm-solver
3
+ Version: 1.5.1
4
+ Summary: A python library built on top of llama.cpp which generates and performs statistical analysis on language model outputs.
5
+ Author: Clio
6
+ Author-email: Clio <d.k.johnson@lancaster.ac.uk>
7
+ Requires-Dist: fsspec
8
+ Requires-Dist: huggingface-hub
9
+ Requires-Dist: llama-cpp-python
10
+ Requires-Dist: numpy
11
+ Requires-Dist: pandas>=3.0.3
12
+ Requires-Dist: tqdm>=4.67.3
13
+ Requires-Dist: poethepoet
14
+ Requires-Python: >=3.13, <4.0
15
+ Project-URL: homepage, https://github.com/muse-writes/probLM-solver
16
+ Project-URL: source, https://github.com/muse-writes/probLM-solver
17
+ Project-URL: changelog, https://github.com/muse-writes/probLM-solver/blob/main/CHANGELOG.md
18
+ Project-URL: releasenotes, https://github.com/muse-writes/probLM-solver/releases
19
+ Project-URL: documentation, https://muse-writes.github.io/probLM-solver
20
+ Project-URL: issues, https://github.com/muse-writes/probLM-solver/issues
21
+ Description-Content-Type: text/markdown
22
+
23
+ [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE3IDE2VjdsLTYgNU0yIDlWOGwxLTFoMWw0IDMgOC04aDFsNCAyIDEgMXYxNGwtMSAxLTQgMmgtMWwtOC04LTQgM0gzbC0xLTF2LTFsMy0zIi8+PC9zdmc+)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/muse-writes/probLM-solver) [![Open in GitHub Codespaces](https://img.shields.io/static/v1?label=GitHub%20Codespaces&message=Open&color=blue&logo=github)](https://github.com/codespaces/new/muse-writes/probLM-solver) [![Documentation](https://img.shields.io/static/v1?label=Documentation&message=View&color=blue&logo=readme&logoColor=white)](https://muse-writes.github.io/probLM-solver)
24
+
25
+ # probLM-solver
26
+
27
+ A python library and CLI app built on top of llama.cpp which can generate and modify language model outputs based on internal probabilities. Included are utilities for generating large numbers of LLM outputs for performing statistical analysis, as well as outputting and modifying token-by-token conditional probabilities for a given output.
28
+
29
+ Of particular importance is the ability to define sampling functions for token generation, based off of the answer's power distribution, via iteratively sampling branches of future tokens.
30
+
31
+ This library is currently in active development, so expect large changes.
32
+
33
+ ## Usage
34
+
35
+ ### Bare Metal
36
+
37
+ This project is managed with uv, ensure you have Python, pip, and uv installed. To create and activate the virtual environment, run:
38
+
39
+ ```sh
40
+ uv sync --python 3.13 --no-dev
41
+ source .venv/bin/activate
42
+ ```
43
+
44
+ To install this package as a library, if you have cloned the repository, run:
45
+
46
+ ```sh
47
+ python3 -m pip install /path/to/repository
48
+ ```
49
+
50
+ else, if you only desire the library, run:
51
+
52
+ ```sh
53
+ pip install git+https://github.com/muse-writes/probLM-solver
54
+ ```
55
+
56
+ ### Conda
57
+
58
+ An `environment.yml` is provided for conda users (Miniforge, Miniconda, or Anaconda). To create and activate the environment, run:
59
+
60
+ ```sh
61
+ conda env create -f environment.yml
62
+ conda activate problm-solver
63
+ ```
64
+
65
+ If you have an NVIDIA GPU and want hardware-accelerated inference, reinstall `llama-cpp-python` with CUDA support after activating the environment:
66
+
67
+ ```sh
68
+ CMAKE_ARGS="-DGGML_CUDA=on" pip install "llama-cpp-python>=0.3.23" --force-reinstall
69
+ ```
70
+
71
+ On the HEC, and other HPC systems which use Nvidia L40(S) and H200 GPUs, oftentimes the login node won't have native GPUs, so use the command:
72
+
73
+ ```sh
74
+ CMAKE_ARGS="-DGGML_CUDA=on -DGGML_NATIVE=off -DCMAKE_CUDA_ARCHITECTURES=89;90 pip install --force-reinstall --no-cache-dir "llama-cpp-python>=0.3.23"
75
+ ```
76
+
77
+ For complete and custom installation of `llama-cpp-python`, see [llama.cpp build docs](https://github.com/ggml-org/llama.cpp/blob/master/docs/build.md#cuda).
78
+
79
+ ### Docker
80
+
81
+ The CLI itself can be run in a docker container for testing the program.
82
+
83
+ To serve this app, run:
84
+
85
+ ```sh
86
+ docker-compose run app --build
87
+ ```
88
+
89
+ Within the Dev Container this is equivalent to:
90
+
91
+ ```sh
92
+ poe serve
93
+ ```
94
+
95
+ ## Contributing
96
+
97
+ <details>
98
+ <summary>Prerequisites</summary>
99
+
100
+ 1. [Generate an SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key) and [add the SSH key to your GitHub account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account).
101
+ 1. Configure SSH to automatically load your SSH keys:
102
+
103
+ ```sh
104
+ cat << EOF >> ~/.ssh/config
105
+
106
+ Host *
107
+ AddKeysToAgent yes
108
+ IgnoreUnknown UseKeychain
109
+ UseKeychain yes
110
+ ForwardAgent yes
111
+ EOF
112
+ ```
113
+
114
+ 1. [Install Docker Desktop](https://www.docker.com/get-started).
115
+ 1. [Install VS Code](https://code.visualstudio.com/) and [VS Code's Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). Alternatively, install [PyCharm](https://www.jetbrains.com/pycharm/download/).
116
+ 1. _Optional:_ install a [Nerd Font](https://www.nerdfonts.com/font-downloads) such as [FiraCode Nerd Font](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode) and [configure VS Code](https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions) or [PyCharm](https://github.com/tonsky/FiraCode/wiki/Intellij-products-instructions) to use it.
117
+
118
+ </details>
119
+
120
+ <details open>
121
+ <summary>Development environments</summary>
122
+
123
+ The following development environments are supported:
124
+
125
+ 1. ⭐️ _GitHub Codespaces_: click on [Open in GitHub Codespaces](https://github.com/codespaces/new/muse-writes/probLM-solver) to start developing in your browser.
126
+ 1. ⭐️ _VS Code Dev Container (with container volume)_: click on [Open in Dev Containers](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/muse-writes/probLM-solver) to clone this repository in a container volume and create a Dev Container with VS Code.
127
+ 1. ⭐️ _uv_: clone this repository and run the following from root of the repository:
128
+
129
+ ```sh
130
+ # Create and install a virtual environment
131
+ uv sync --python 3.13 --all-extras
132
+
133
+ # Activate the virtual environment
134
+ source .venv/bin/activate
135
+
136
+ # Install the pre-commit hooks
137
+ pre-commit install --install-hooks
138
+ ```
139
+
140
+ 1. _VS Code Dev Container_: clone this repository, open it with VS Code, and run <kbd>Ctrl/⌘</kbd> + <kbd>⇧</kbd> + <kbd>P</kbd> → _Dev Containers: Reopen in Container_.
141
+ 1. _PyCharm Dev Container_: clone this repository, open it with PyCharm, [create a Dev Container with Mount Sources](https://www.jetbrains.com/help/pycharm/start-dev-container-inside-ide.html), and [configure an existing Python interpreter](https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#widget) at `/opt/venv/bin/python`.
142
+
143
+ </details>
144
+
145
+ <details open>
146
+ <summary>Developing</summary>
147
+
148
+ - This project follows the [Conventional Commits](https://www.conventionalcommits.org/) standard to automate [Semantic Versioning](https://semver.org/) and [Keep A Changelog](https://keepachangelog.com/) with [Commitizen](https://github.com/commitizen-tools/commitizen).
149
+ - Run `poe` from within the development environment to print a list of [Poe the Poet](https://github.com/nat-n/poethepoet) tasks available to run on this project.
150
+ - Run `uv add {package}` from within the development environment to install a run time dependency and add it to `pyproject.toml` and `uv.lock`. Add `--dev` to install a development dependency.
151
+ - Run `uv sync --upgrade` from within the development environment to upgrade all dependencies to the latest versions allowed by `pyproject.toml`. Add `--only-dev` to upgrade the development dependencies only.
152
+ - Run `cz bump` to bump the app's version, update the `CHANGELOG.md`, and create a git tag. Then push the changes and the git tag with `git push origin main --tags`.
153
+ - Run `poe mutmut` to analyse test coverage via mutation.
154
+ - The library can be installed in editable mode using `python -m pip install -e .`.
155
+
156
+ </details>
@@ -0,0 +1,134 @@
1
+ [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE3IDE2VjdsLTYgNU0yIDlWOGwxLTFoMWw0IDMgOC04aDFsNCAyIDEgMXYxNGwtMSAxLTQgMmgtMWwtOC04LTQgM0gzbC0xLTF2LTFsMy0zIi8+PC9zdmc+)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/muse-writes/probLM-solver) [![Open in GitHub Codespaces](https://img.shields.io/static/v1?label=GitHub%20Codespaces&message=Open&color=blue&logo=github)](https://github.com/codespaces/new/muse-writes/probLM-solver) [![Documentation](https://img.shields.io/static/v1?label=Documentation&message=View&color=blue&logo=readme&logoColor=white)](https://muse-writes.github.io/probLM-solver)
2
+
3
+ # probLM-solver
4
+
5
+ A python library and CLI app built on top of llama.cpp which can generate and modify language model outputs based on internal probabilities. Included are utilities for generating large numbers of LLM outputs for performing statistical analysis, as well as outputting and modifying token-by-token conditional probabilities for a given output.
6
+
7
+ Of particular importance is the ability to define sampling functions for token generation, based off of the answer's power distribution, via iteratively sampling branches of future tokens.
8
+
9
+ This library is currently in active development, so expect large changes.
10
+
11
+ ## Usage
12
+
13
+ ### Bare Metal
14
+
15
+ This project is managed with uv, ensure you have Python, pip, and uv installed. To create and activate the virtual environment, run:
16
+
17
+ ```sh
18
+ uv sync --python 3.13 --no-dev
19
+ source .venv/bin/activate
20
+ ```
21
+
22
+ To install this package as a library, if you have cloned the repository, run:
23
+
24
+ ```sh
25
+ python3 -m pip install /path/to/repository
26
+ ```
27
+
28
+ else, if you only desire the library, run:
29
+
30
+ ```sh
31
+ pip install git+https://github.com/muse-writes/probLM-solver
32
+ ```
33
+
34
+ ### Conda
35
+
36
+ An `environment.yml` is provided for conda users (Miniforge, Miniconda, or Anaconda). To create and activate the environment, run:
37
+
38
+ ```sh
39
+ conda env create -f environment.yml
40
+ conda activate problm-solver
41
+ ```
42
+
43
+ If you have an NVIDIA GPU and want hardware-accelerated inference, reinstall `llama-cpp-python` with CUDA support after activating the environment:
44
+
45
+ ```sh
46
+ CMAKE_ARGS="-DGGML_CUDA=on" pip install "llama-cpp-python>=0.3.23" --force-reinstall
47
+ ```
48
+
49
+ On the HEC, and other HPC systems which use Nvidia L40(S) and H200 GPUs, oftentimes the login node won't have native GPUs, so use the command:
50
+
51
+ ```sh
52
+ CMAKE_ARGS="-DGGML_CUDA=on -DGGML_NATIVE=off -DCMAKE_CUDA_ARCHITECTURES=89;90 pip install --force-reinstall --no-cache-dir "llama-cpp-python>=0.3.23"
53
+ ```
54
+
55
+ For complete and custom installation of `llama-cpp-python`, see [llama.cpp build docs](https://github.com/ggml-org/llama.cpp/blob/master/docs/build.md#cuda).
56
+
57
+ ### Docker
58
+
59
+ The CLI itself can be run in a docker container for testing the program.
60
+
61
+ To serve this app, run:
62
+
63
+ ```sh
64
+ docker-compose run app --build
65
+ ```
66
+
67
+ Within the Dev Container this is equivalent to:
68
+
69
+ ```sh
70
+ poe serve
71
+ ```
72
+
73
+ ## Contributing
74
+
75
+ <details>
76
+ <summary>Prerequisites</summary>
77
+
78
+ 1. [Generate an SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key) and [add the SSH key to your GitHub account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account).
79
+ 1. Configure SSH to automatically load your SSH keys:
80
+
81
+ ```sh
82
+ cat << EOF >> ~/.ssh/config
83
+
84
+ Host *
85
+ AddKeysToAgent yes
86
+ IgnoreUnknown UseKeychain
87
+ UseKeychain yes
88
+ ForwardAgent yes
89
+ EOF
90
+ ```
91
+
92
+ 1. [Install Docker Desktop](https://www.docker.com/get-started).
93
+ 1. [Install VS Code](https://code.visualstudio.com/) and [VS Code's Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). Alternatively, install [PyCharm](https://www.jetbrains.com/pycharm/download/).
94
+ 1. _Optional:_ install a [Nerd Font](https://www.nerdfonts.com/font-downloads) such as [FiraCode Nerd Font](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode) and [configure VS Code](https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions) or [PyCharm](https://github.com/tonsky/FiraCode/wiki/Intellij-products-instructions) to use it.
95
+
96
+ </details>
97
+
98
+ <details open>
99
+ <summary>Development environments</summary>
100
+
101
+ The following development environments are supported:
102
+
103
+ 1. ⭐️ _GitHub Codespaces_: click on [Open in GitHub Codespaces](https://github.com/codespaces/new/muse-writes/probLM-solver) to start developing in your browser.
104
+ 1. ⭐️ _VS Code Dev Container (with container volume)_: click on [Open in Dev Containers](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/muse-writes/probLM-solver) to clone this repository in a container volume and create a Dev Container with VS Code.
105
+ 1. ⭐️ _uv_: clone this repository and run the following from root of the repository:
106
+
107
+ ```sh
108
+ # Create and install a virtual environment
109
+ uv sync --python 3.13 --all-extras
110
+
111
+ # Activate the virtual environment
112
+ source .venv/bin/activate
113
+
114
+ # Install the pre-commit hooks
115
+ pre-commit install --install-hooks
116
+ ```
117
+
118
+ 1. _VS Code Dev Container_: clone this repository, open it with VS Code, and run <kbd>Ctrl/⌘</kbd> + <kbd>⇧</kbd> + <kbd>P</kbd> → _Dev Containers: Reopen in Container_.
119
+ 1. _PyCharm Dev Container_: clone this repository, open it with PyCharm, [create a Dev Container with Mount Sources](https://www.jetbrains.com/help/pycharm/start-dev-container-inside-ide.html), and [configure an existing Python interpreter](https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#widget) at `/opt/venv/bin/python`.
120
+
121
+ </details>
122
+
123
+ <details open>
124
+ <summary>Developing</summary>
125
+
126
+ - This project follows the [Conventional Commits](https://www.conventionalcommits.org/) standard to automate [Semantic Versioning](https://semver.org/) and [Keep A Changelog](https://keepachangelog.com/) with [Commitizen](https://github.com/commitizen-tools/commitizen).
127
+ - Run `poe` from within the development environment to print a list of [Poe the Poet](https://github.com/nat-n/poethepoet) tasks available to run on this project.
128
+ - Run `uv add {package}` from within the development environment to install a run time dependency and add it to `pyproject.toml` and `uv.lock`. Add `--dev` to install a development dependency.
129
+ - Run `uv sync --upgrade` from within the development environment to upgrade all dependencies to the latest versions allowed by `pyproject.toml`. Add `--only-dev` to upgrade the development dependencies only.
130
+ - Run `cz bump` to bump the app's version, update the `CHANGELOG.md`, and create a git tag. Then push the changes and the git tag with `git push origin main --tags`.
131
+ - Run `poe mutmut` to analyse test coverage via mutation.
132
+ - The library can be installed in editable mode using `python -m pip install -e .`.
133
+
134
+ </details>
@@ -0,0 +1,187 @@
1
+ [build-system] # https://docs.astral.sh/uv/concepts/build-backend/
2
+ requires = ["uv_build>=0.9.18,<0.10.0"]
3
+ build-backend = "uv_build"
4
+
5
+ [project] # https://packaging.python.org/en/latest/specifications/pyproject-toml/
6
+ name = "problm-solver"
7
+ version = "1.5.1"
8
+ description = "A python library built on top of llama.cpp which generates and performs statistical analysis on language model outputs."
9
+ readme = "README.md"
10
+ authors = [
11
+ { name = "Clio", email = "d.k.johnson@lancaster.ac.uk" },
12
+ ]
13
+ requires-python = ">=3.13,<4.0"
14
+ dependencies = [
15
+ "fsspec",
16
+ "huggingface_hub",
17
+ "llama-cpp-python",
18
+ "numpy",
19
+ "pandas >= 3.0.3",
20
+ "tqdm >= 4.67.3",
21
+ "poethepoet",
22
+ ]
23
+
24
+ [project.scripts]
25
+ problm-solver = "problm_solver.cli:main"
26
+
27
+ [project.urls] # https://packaging.python.org/en/latest/specifications/well-known-project-urls/#well-known-labels
28
+ homepage = "https://github.com/muse-writes/probLM-solver"
29
+ source = "https://github.com/muse-writes/probLM-solver"
30
+ changelog = "https://github.com/muse-writes/probLM-solver/blob/main/CHANGELOG.md"
31
+ releasenotes = "https://github.com/muse-writes/probLM-solver/releases"
32
+ documentation = "https://muse-writes.github.io/probLM-solver"
33
+ issues = "https://github.com/muse-writes/probLM-solver/issues"
34
+
35
+ [dependency-groups] # https://docs.astral.sh/uv/concepts/projects/dependencies/#development-dependencies
36
+ dev = [
37
+ "codespell (>=2.4.1)",
38
+ "commitizen (>=4.3.0)",
39
+ "coverage[toml] (>=7.6.10)",
40
+ "ipykernel (>=6.29.4)",
41
+ "ipython (>=8.18.0)",
42
+ "ipywidgets (>=8.1.2)",
43
+ "pre-commit (>=4.0.1)",
44
+ "pytest (>=8.3.4)",
45
+ "pytest-mock (>=3.14.0)",
46
+ "pytest-xdist (>=3.6.1)",
47
+ "ruff (>=0.9.2)",
48
+ "tqdm (>= 4.67.3)",
49
+ "ty (>=0.0.6)",
50
+ "typeguard (>=4.4.1)",
51
+ "sphinx (>=9.1.0)",
52
+ "sphinx-autodoc-typehints (>=3.10.2)",
53
+ "shibuya (>=2026.1.9)",
54
+ "mutmut>=3.5.0",
55
+ ]
56
+
57
+ [tool.codespell] # https://github.com/codespell-project/codespell
58
+ builtin = "en-GB_to_en-US,clear,code,rare"
59
+ check-filenames = true
60
+ skip = "./*_cache/,./.venv,./reports"
61
+
62
+ [tool.commitizen] # https://commitizen-tools.github.io/commitizen/config/
63
+ bump_message = "bump: v$current_version → v$new_version"
64
+ tag_format = "v$version"
65
+ update_changelog_on_bump = true
66
+ version_provider = "uv"
67
+
68
+ [tool.coverage.report] # https://coverage.readthedocs.io/en/latest/config.html#report
69
+ fail_under = 50
70
+ precision = 1
71
+ show_missing = true
72
+ skip_covered = true
73
+
74
+ [tool.coverage.run] # https://coverage.readthedocs.io/en/latest/config.html#run
75
+ branch = true
76
+ command_line = "--module pytest"
77
+ data_file = "reports/.coverage"
78
+ source = ["src"]
79
+
80
+ [tool.coverage.xml] # https://coverage.readthedocs.io/en/latest/config.html#xml
81
+ output = "reports/coverage.xml"
82
+
83
+ [tool.pytest.ini_options] # https://docs.pytest.org/en/latest/reference/reference.html#ini-options-ref
84
+ addopts = "--color=yes --doctest-modules --exitfirst --failed-first --strict-config --strict-markers --verbosity=2 --junitxml=reports/pytest.xml"
85
+ filterwarnings = ["error", "ignore::DeprecationWarning"]
86
+ testpaths = ["src", "tests"]
87
+ xfail_strict = true
88
+
89
+ [tool.ruff] # https://docs.astral.sh/ruff/settings/
90
+ fix = true
91
+ line-length = 100
92
+ src = ["src", "tests"]
93
+ target-version = "py313"
94
+
95
+ [tool.ruff.format]
96
+ docstring-code-format = true
97
+ skip-magic-trailing-comma = true
98
+
99
+ [tool.ruff.lint]
100
+ select = ["ALL"]
101
+ ignore = ["CPY", "FIX", "ARG001", "COM812", "D203", "D213", "E501", "PD008", "PD009", "RET504", "S101", "TD003", "PTH"]
102
+ unfixable = ["ERA001", "F401", "F841", "T201", "T203"]
103
+
104
+ [tool.ruff.lint.flake8-annotations]
105
+ allow-star-arg-any = true
106
+
107
+ [tool.ruff.lint.flake8-tidy-imports]
108
+ ban-relative-imports = "all"
109
+
110
+ [tool.ruff.lint.flake8-quotes]
111
+ inline-quotes = "single"
112
+ multiline-quotes = "single"
113
+
114
+ [tool.ruff.lint.isort]
115
+ split-on-trailing-comma = false
116
+
117
+ [tool.ruff.lint.pycodestyle]
118
+ max-doc-length = 100
119
+
120
+ [tool.ruff.lint.pydocstyle]
121
+ convention = "pep257"
122
+
123
+ [tool.ty.rules]
124
+ unused-ignore-comment = "warn"
125
+
126
+ [tool.mutmut]
127
+ source_paths = ["src/"]
128
+ pytest_add_cli_args_test_selection = ["tests/"]
129
+
130
+ [tool.ty.terminal]
131
+ error-on-warning = true
132
+
133
+ [tool.poe.executor] # https://github.com/nat-n/poethepoet
134
+ type = "virtualenv"
135
+
136
+ [tool.poe.tasks]
137
+
138
+ [tool.poe.tasks.docs]
139
+ help = "Build or serve the documentation"
140
+ shell = """
141
+ if [ $serve ]
142
+ then {
143
+ xdg-open docs/_build/html/index.html
144
+ } else {
145
+ cd docs
146
+ make html
147
+ } fi
148
+ """
149
+
150
+ [[tool.poe.tasks.docs.args]]
151
+ help = "Serve the documentation locally with live reload"
152
+ type = "boolean"
153
+ name = "serve"
154
+ options = ["--serve"]
155
+
156
+ [tool.poe.tasks.serve]
157
+ help = "Serve the app"
158
+ cmd = "problm-solver"
159
+
160
+ [tool.poe.tasks.lint]
161
+ help = "Lint this app"
162
+ cmd = """
163
+ pre-commit run
164
+ --all-files
165
+ --color always
166
+ """
167
+
168
+ [tool.poe.tasks.mutmut]
169
+ help = "Run mutation tests"
170
+ env = { PYTEST_ADDOPTS = "--color=yes --strict-config --strict-markers -q" }
171
+ cmd = "mutmut run"
172
+
173
+ [tool.poe.tasks.conda]
174
+ help = "Create the conda environment."
175
+ cmd = "conda env create -f environment.yml"
176
+
177
+ [tool.poe.tasks.test]
178
+ help = "Test this app"
179
+
180
+ [[tool.poe.tasks.test.sequence]]
181
+ cmd = "coverage run"
182
+
183
+ [[tool.poe.tasks.test.sequence]]
184
+ cmd = "coverage report"
185
+
186
+ [[tool.poe.tasks.test.sequence]]
187
+ cmd = "coverage xml"
@@ -0,0 +1,9 @@
1
+ """probLM-solver."""
2
+
3
+ from problm_solver.random import RandomManager
4
+
5
+ PSRandom = RandomManager
6
+
7
+ __all__ = [
8
+ 'PSRandom'
9
+ ]