Skip to main content

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_operation()
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_operation()
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sio3pack-1.0.0.dev2.tar.gz (57.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sio3pack-1.0.0.dev2-py3-none-any.whl (73.9 kB view details)

Uploaded Python 3

File details

Details for the file sio3pack-1.0.0.dev2.tar.gz.

File metadata

  • Download URL: sio3pack-1.0.0.dev2.tar.gz
  • Upload date:
  • Size: 57.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sio3pack-1.0.0.dev2.tar.gz
Algorithm Hash digest
SHA256 c5e6a19246bd06543521d6954274845615aef5357665c35f0d1e0a34838c0f1d
MD5 4a91bd7c5e2eab6e31443496076806ac
BLAKE2b-256 4c2c729df12d17c809b6cae0453421fab4de0920eb6aa72d3c73b78d0bdd6467

See more details on using hashes here.

File details

Details for the file sio3pack-1.0.0.dev2-py3-none-any.whl.

File metadata

  • Download URL: sio3pack-1.0.0.dev2-py3-none-any.whl
  • Upload date:
  • Size: 73.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sio3pack-1.0.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b9ffbcf41b0069fdd42e96b815cc775dabb0f58765f309c11acedfec0e73c84
MD5 08895f7894a027c4ae68ee82f73cd209
BLAKE2b-256 e272ec03cd0fedd575549c2400ae4938e58ef7447006677801fbc62fdf7a0bcd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page