Library for interacting with packages
Project description
from sio3pack.graph import GraphOperation
SIO3Pack
Prerequisites
- Python 3.9 or higher
- pip
- Linux or macOS operating system
- Django 4.2.x (for Django support)
Instalation
pip install sio3pack
Example usage (in python)
In OIOIOI
# Package unpacking
import sio3pack, sio3workers
from django.conf import settings
package = sio3pack.from_file(path_to_package, django_settings=settings)
graph_op: GraphOperation = package.get_unpack_graph()
results = sioworkers.run(graph_op)
graph_op.return_results(results)
package.save_to_db(problem_id=1)
Locally (for example sinol-make)
import sio3pack, sio3workers.local
package = sio3pack.from_file(path_to_package)
graph_op: GraphOperation = package.get_unpack_graph()
results = sio3workers.local.run(graph_op)
graph_op.return_results(results)
Development
Test without django support
Install the package in editable mode and make sure that django and
pytest-django are not installed.
pip install -e ".[tests]"
pip uninstall django pytest-django
Then follow the instructions in General testing information.
Test with django support
Install the package in editable mode along with Django dependencies:
pip install -e ".[django,tests,django_tests]"
Then follow the instructions in General testing information.
General testing information
Run the tests with pytest in the root directory of
the repository.
pytest -v
To run tests in parallel, use the following command.
pytest -v -n auto
To run coverage tests, use the following command.
pytest -v --cov=sio3pack --cov-report=html
The coverage report will be generated in the file htmlcov/index.html.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sio3pack-1.0.0.dev1.tar.gz.
File metadata
- Download URL: sio3pack-1.0.0.dev1.tar.gz
- Upload date:
- Size: 31.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67d2056790aa1493fc26a077e67ecbba42a9d7dd908b85a9325113f7f5b88156
|
|
| MD5 |
2d5259f35d1f0545ccc9158237225457
|
|
| BLAKE2b-256 |
dfab863c8733c7721d68a3fa91e776da0b5980d4b7425753bfa86cfcd56a1d86
|
File details
Details for the file sio3pack-1.0.0.dev1-py3-none-any.whl.
File metadata
- Download URL: sio3pack-1.0.0.dev1-py3-none-any.whl
- Upload date:
- Size: 38.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6258151c7c955f4c2f3dce72dab2a9c4bccf4fefe74bcf4b29703d0aead99d56
|
|
| MD5 |
e8dd5a33cf16d465e04aee96037a25f2
|
|
| BLAKE2b-256 |
00a653ffa556bf44af7f8967bace337c2b0b6e0961dcd243ae3ee8439d323d78
|