Skip to content

Commit

Permalink
Merge pull request #3 from bouthilx/feature/newalgos
Browse files Browse the repository at this point in the history
Add Bohamiann and DNGO + adapt to new test suite
  • Loading branch information
bouthilx authored Jun 10, 2021
2 parents f71218d + a6419b4 commit f529c7e
Show file tree
Hide file tree
Showing 24 changed files with 2,256 additions and 781 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
toxenv: [black, isort, pylint]
toxenv: [black, isort, pylint, doc8, docs]

steps:
- uses: actions/checkout@v1
Expand All @@ -36,7 +36,7 @@ jobs:
max-parallel: 4
matrix:
platform: [ubuntu-latest]
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9]
env:
PLATFORM: ${{ matrix.platform }}
steps:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: docs

on:
push:
branches:
- master
- develop
release:
types:
[published]
workflow_dispatch:

jobs:

build_docs_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: bash ./scripts/setup_gh.sh
- name: Test with tox
run: tox -vv -e docs
- name: Deploy doc on gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash docs/deploy.sh
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=ungrouped-imports,abstract-class-instantiated,useless-super-delegation,no-member,keyword-arg-before-vararg,unidiomatic-typecheck,redefined-outer-name,fixme,F0401,intern-builtin,wrong-import-position,wrong-import-order, C0415, F0010, R0205, R1705, R1711, R1720, W0106, W0107, W0127, W0706, C0330, C0326
disable=ungrouped-imports,abstract-class-instantiated,useless-super-delegation,no-member,keyword-arg-before-vararg,unidiomatic-typecheck,redefined-outer-name,fixme,F0401,intern-builtin,wrong-import-position,wrong-import-order, C0415, F0010, R0205, R1705, R1711, R1720, W0106, W0107, W0127, W0706, C0330, C0326,invalid-name,too-many-arguments,attribute-defined-outside-init

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ exclude .pylintrc
exclude codecov.yml
exclude .mailmap
exclude scripts/setup_gh.sh
exclude docs/src/_static/stub
prune .github/

# Include src, tests, docs
Expand Down
43 changes: 24 additions & 19 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===============
orion.algo.robo
===============
======================
RoBO Wrapper for Oríon
======================


.. |pypi| image:: https://img.shields.io/pypi/v/orion.algo.robo
Expand Down Expand Up @@ -29,34 +29,37 @@ orion.algo.robo

----

This ``orion.algo`` plugin was generated with `Cookiecutter`_ along with `@Epistimio`_'s `cookiecutter-orion.algo`_ template.

See Orion : https://github.com/Epistimio/orion
This wrapper provides access through `Oríon`_ to several Bayesian optimization algorithms
in the library `RoBO`_.

This ``orion.algo`` plugin was generated with `Cookiecutter`_ along with `@Epistimio`_'s `cookiecutter-orion.algo`_ template.

Installation
------------

The RoBO wrapper is currently only supported on Linux.

Before installing RoBO, make sure you have libeigen and swig installed. On ubuntu, you can install
them with `apt-get`::
Before installing RoBO, make sure you have ``libeigen`` and ``swig`` installed.
On ubuntu, you can install them with ``apt-get``

.. code-block:: console
$ sudo apt-get install libeigen3-dev swig
One of the dependencies of RoBO does not declare its dependencies and therefore we need
to install these dependencies first. The order of dependencies in `requirements.txt` reflects this
order. To install them sequentially, use the following command::
to install these dependencies first. The order of dependencies in ``requirements.txt``
reflects this order. To install them sequentially, use the following command

.. code-block:: console
$ curl -s https://git.io/JLnCA | grep -v "^#" | xargs -n 1 -L 1 pip install
Finally, you can install this package using PyPI::
Finally, you can install this package using PyPI

$ pip install orion.algo.robo
.. code-block:: console
$ pip install orion.algo.robo
Usage
-----
Contribute or Ask
-----------------
Expand All @@ -76,18 +79,20 @@ Citation
--------

If you use this wrapper for your publications, please cite both
`RoBO <https://github.com/automl/RoBO#citing-robo>` and
`Oríon <https://github.com/epistimio/orion#citation>`.

`RoBO <https://github.com/automl/RoBO#citing-robo>`__ and
`Oríon <https://github.com/epistimio/orion#citation>`__. Please also cite
the papers of the algorithms you used, such as DNGO or BOHAMIANN. See
the documentation of the algorithms to find corresponding original papers.

License
-------

Distributed under the terms of the BSD-3-Clause license,
"orion.algo.robo" is free and open source software.
``orion.algo.robo`` is free and open source software.


.. _`Cookiecutter`: https://github.com/audreyr/cookiecutter
.. _`@Epistimio`: https://github.com/Epistimio
.. _`cookiecutter-orion.algo`: https://github.com/Epistimio/cookiecutter-orion.algo
.. _`orion`: https://github.com/Epistimio/orion
.. _`Oríon`: https://github.com/Epistimio/orion
.. _`RoBO`: https://github.com/automl/robo
45 changes: 45 additions & 0 deletions docs/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

################################################################################
# Modified version of
# https://tech.michaelaltfield.net/2020/07/18/sphinx-rtd-github-pages-1/
################################################################################

#####################
# DECLARE VARIABLES #
#####################

pwd
ls -lah
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)

#######################
# Update GitHub Pages #
#######################

git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"

docroot=`mktemp -d`
rsync -av "docs/build/html/" "${docroot}/"

pushd "${docroot}"

# don't bother maintaining history; just generate fresh
git init
git remote add deploy "https://token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git checkout -b gh-pages

# add .nojekyll to the root so that github won't 404 on content added to dirs
# that start with an underscore (_), such as our "_content" dir..
touch .nojekyll

# copy the resulting html pages built from sphinx above to our new git repo
git add .

# commit all the new files
msg="Updating Docs for commit ${GITHUB_SHA} made on `date -d"@${SOURCE_DATE_EPOCH}" --iso-8601=seconds` from ${GITHUB_REF} by ${GITHUB_ACTOR}"
git commit -am "${msg}"

# overwrite the contents of the gh-pages branch on our github.com repo
git push deploy gh-pages --force
5 changes: 5 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sphinx
sphinx_rtd_theme
sphinxcontrib.httpdomain
sphinx-autoapi
numpydoc
Empty file added docs/src/_static/stub
Empty file.
Loading

0 comments on commit f529c7e

Please sign in to comment.