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.dev3.tar.gz (59.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.dev3-py3-none-any.whl (78.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sio3pack-1.0.0.dev3.tar.gz
  • Upload date:
  • Size: 59.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.dev3.tar.gz
Algorithm Hash digest
SHA256 63e534b31af44773c5da667d29b94f771f7fe870e04aa2496e77d2499d1ae28f
MD5 856cc4f5e822efc71366b9998a1d7b9b
BLAKE2b-256 23c2438f674b15b3eed8ea2989b1215c692df2573d87b2d2985e5d1d3615be09

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sio3pack-1.0.0.dev3-py3-none-any.whl
  • Upload date:
  • Size: 78.4 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.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 17cac3d227da53e35073ba53a209a7cd9d6dd63eb08dc00642ff5385b5010c49
MD5 2595d9ea39bf983bab58ebb9628ba500
BLAKE2b-256 1601c6f19fae2b94066b325a229524fa9e554d073ff774fa1314db53cf0d5f94

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