Skip to content

sio2project/SIO3Pack

Repository files navigation

from sio3pack.graph import GraphOperation

SIO3Pack

Example usage

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages