Development Guide

Get Started!

Ready to contribute? Here’s how to set up gym-saturation for local development. Please note this documentation assumes you already have Git installed and ready to go.

  1. Fork the gym-saturation on GitHub.

  2. Clone your fork locally:

    cd git_URL
    git clone git@github.com:YOUR_NAME/gym-saturation.git
    
  3. It’s highly recommended to use a virtual environment for your local development (by the standard means of Python or using Anaconda or anything else):

    python -m venv gym-saturation-env
    source gym-saturation-env/bin/activate
    

    This should change the shell to look something like:

    (gym-saturation-env) $
    
  4. Now you can install all the things you need for development:

    pip install -U pip
    pip install -U setuptools wheel poetry
    poetry install
    # install Vampire binary
    wget https://github.com/vprover/vampire/releases/download/v4.7/vampire4.7.zip -O vampire.zip
    unzip vampire.zip
    # then use vampire_z3_rel_static_HEAD_6295 as an argument or add it to $PATH
    # install iProver binary
    wget https://gitlab.com/api/v4/projects/39846772/jobs/artifacts/2023.04.10/download?job=build-job -O iprover.zip
    unzip iprover.zip
    # then use iproveropt
    # recommended but not necessary
    pre-commit install
    
  5. Create a branch for local development:

    git checkout -b name-of-your-bug-fix-or-feature
    

    Now you can make your changes locally.

  6. When you’re done making changes, check that your changes pass code quality checks.

    pydocstyle gym_saturation
    flake8 gym_saturation
    pylint gym_saturation
    mypy gym_saturation
    
  7. The next step would be to run the test cases. gym-saturation uses pytest and all the existing tests are doctest.

    pytest --cov-report term-missing
    
  8. If your contribution is a bug fix or new feature, you may want to add a test to the existing test suite. If possible, do it by doctest, not a dedicates test case file.

  9. Commit your changes and push your branch to GitHub:

    git add .
    git commit -m "Your detailed description of your changes."
    git push origin name-of-your-bug-fix-or-feature
    
  10. Submit a pull request through the GitHub website.

Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

  1. The pull request should include tests.

  2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add new classes or functions to a relevant file in the doc/api folder. To build the doc locally:

    cd doc
    make html
    
  3. The pull request should work for Python 3.8, 3.9, 3.10 and 3.11. Check https://github.com/inpefess/gym-saturation/pulls and make sure that the CI checks pass for all supported Python versions.