Sign inSign up

ucamcldtg/equality-checker

By ucamcldtg

Updated 9 months ago

Tiny server for testing equivalence of two symbolic expressions.

Image
3

4.7K

ucamcldtg/equality-checker repository overview

equality-checker

A not-quite-so-tiny-any-more server for testing the equivalence of two algebraic expressions using SymPy.

To use, either docker pull ucamcldtg/equality-checker or list it as an image in a Docker Compose file. Port 5000 of the container will need to be mapped to the port the checker is expected to listen on.

For instance, run:

docker run -d -p 5000:5000 --name equality-checker ucamcldtg/equality-checker

Your server should be running at http://localhost:5000/check. Now make JSON-based POST requests with target and test expression strings, e.g.

{
    "target": "x + 3",
    "test": "3 + x",
    "description": "An optional description for the logs!"
}

which will get a response like:

{
    "equal": "true",
    "equality_type": "exact",
    "parsed_target": "x + 3",
    "parsed_test": "x + 3",
    "target": "x + 3",
    "test": "3 + x"
}

or, if something went wrong, an error like:

{
    "error": "Some error message here",
    ...
}

To see live output:

docker logs -f equality-checker

Tag summary

Content type

Image

Digest

sha256:4488aa0bc

Size

109.9 MB

Last updated

9 months ago

docker pull ucamcldtg/equality-checker