diff --git a/.travis.yml b/.travis.yml index 4bb7dda8..53276bc1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,16 +5,16 @@ python: - "3.8" env: - DEP=[all] - - DEP= + - DEP=[dev] branches: only: - master jobs: exclude: - python: "3.6" - env: DEP= + env: DEP=[dev] - python: "3.7" - env: DEP= + env: DEP=[dev] before_install: - wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh - chmod +x miniconda.sh @@ -24,16 +24,16 @@ before_install: - source activate myenv - pip install --upgrade pip install: - - pip install pytest pytest-cov coveralls - - pip install flake8 black - - pip install mypy - pip install -e .$DEP + - pip install pytest-cov coveralls script: - black --check . - flake8 --config=.flake8 . - mypy cgp - if [ "$DEP" = "[all]" ]; then - cd docs && make html && cd ../ || exit 1; + make -C docs/ html || exit 1; + touch docs/_build/html/.nojekyll + fi - pytest --cov=cgp - if [ "$DEP" = "[all]" -a $TRAVIS_PYTHON_VERSION = 3.8 ]; then @@ -43,3 +43,14 @@ script: fi after_success: - coveralls +deploy: + provider: pages:git + skip_cleanup: true + verbose: true + token: $GITHUB_TOKEN + edge: true + local_dir: ./docs/_build/html/ + keep_history: true + on: + python: 3.8 + condition: $DEP = "[all]" \ No newline at end of file diff --git a/README.rst b/README.rst index 0cafd7b4..92428464 100644 --- a/README.rst +++ b/README.rst @@ -21,6 +21,8 @@ :target: https://github.com/psf/black .. image:: https://coveralls.io/repos/github/Happy-Algorithms-League/python-gp/badge.svg?branch=master :target: https://coveralls.io/github/Happy-Algorithms-League/python-gp?branch=master +.. image:: https://readthedocs.org/projects/ansicolortags/badge/?version=latest + :target: https://happy-algorithms-league.github.io/hal-cgp/ Cartesian genetic programming (CGP) in pure Python. @@ -43,8 +45,6 @@ Figure from Jordan, Schmidt, Senn & Petrovici, "Evolving to learn: discovering i .. long-description-end -A simple example of CGP applied to a symbolic regression problem can be found in `examples/example_evo_regression.py`. - .. installation-start ============ Installation @@ -79,11 +79,14 @@ The adventurous can install the most recent development version directly from ou .. installation-end -.. basic-usage-start =========== Basic usage =========== +For detailed documentation, please refer to `https://happy-algorithms-league.github.io/hal-cgp/ `_. Here we only provide a preview. + +.. basic-usage-start + Follow these steps to solve a basic regression problem: 1. Define an objective function. diff --git a/docs/basic_usage.rst b/docs/basic_usage.rst new file mode 100644 index 00000000..05190834 --- /dev/null +++ b/docs/basic_usage.rst @@ -0,0 +1,7 @@ +=========== +Basic usage +=========== + +.. include:: ../README.rst + :start-after: basic-usage-start + :end-before: basic-usage-end