Skip to content

Commit

Permalink
Docs (#785)
Browse files Browse the repository at this point in the history
* Added SMAC theme
* Updated docs
* Updated examples

Co-authored-by: Carolin Benjamins <benjamins@tnt.uni-hannover.de>
Co-authored-by: dengdifan <33290713+dengdifan@users.noreply.github.com>
Co-authored-by: Difan Deng <deng@dengster.tnt.uni-hannover.de>
Co-authored-by: dengdifan <difandeng@gmail.com>
Co-authored-by: Tim Ruhkopf <timruhkopf@gmail.com>
  • Loading branch information
6 people authored Oct 20, 2021
1 parent 5e243e0 commit 7652960
Show file tree
Hide file tree
Showing 206 changed files with 12,397 additions and 5,185 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-18.04
strategy:
matrix:
python-version: [3.8]
python-version: [3.9]
fail-fast: false

steps:
Expand All @@ -28,26 +28,26 @@ jobs:
run: |
# Activate anaconda so default python is from conda
export PATH="$CONDA/envs/testenv/bin:$PATH"
cd examples/quickstart/spear_qcp
cd examples/commandline
bash run_SMAC.sh
- name: Spear QCP ROAR
timeout-minutes: 20
run: |
# Activate anaconda so default python is from conda
export PATH="$CONDA/envs/testenv/bin:$PATH"
cd examples/quickstart/spear_qcp
cd examples/commandline
bash run_ROAR.sh
- name: Spear QCP Successive halving
timeout-minutes: 20
run: |
# Activate anaconda so default python is from conda
export PATH="$CONDA/envs/testenv/bin:$PATH"
cd examples/quickstart/spear_qcp
python SMAC4AC_SH_spear_qcp.py
cd examples/python
python spear_mf_instances.py
- name: Branin from the command line
timeout-minutes: 20
run: |
# Activate anaconda so default python is from conda
export PATH="$CONDA/envs/testenv/bin:$PATH"
cd examples/quickstart/branin
python ../../../scripts/smac --scenario scenario.txt
cd examples/commandline
python ../../scripts/smac.py --scenario branin/scenario.txt
2 changes: 1 addition & 1 deletion .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9
- name: Build dist
run: |
python setup.py sdist
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,37 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9

- name: Install dependencies
run: |
pip install -e .[all]
pip install bs4
- name: Make docs
run: |
cd doc
cd docs
make buildapi
make html
- name: Pull latest gh-pages
if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push'
run: |
cd ..
git clone https://github.com/automl/SMAC3.git --branch gh-pages --single-branch gh-pages
- name: Copy new doc into gh-pages
- name: Copy new docs into gh-pages
if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push'
run: |
branch_name=${GITHUB_REF##*/}
cd ../gh-pages
rm -rf $branch_name
cp -r ../SMAC3/doc/build/html $branch_name
cp -r ../SMAC3/docs/html $branch_name
- name: Push to gh-pages
if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push'
run: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: examples

on: [push, pull_request]

jobs:
ubuntu:

runs-on: ubuntu-18.04
strategy:
matrix:
python-version: [3.9]
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Conda Install test dependencies
run: |
# Miniconda is available in $CONDA env var
$CONDA/bin/conda create -n testenv --yes pip wheel gxx_linux-64 gcc_linux-64 swig python=${{ matrix.python-version }}
$CONDA/envs/testenv/bin/python3 -m pip install --upgrade pip
$CONDA/envs/testenv/bin/pip3 install -e .[all]
3 changes: 3 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Install pre-commit
run: |
pip install pre-commit
pre-commit install
- name: Run pre-commit
run: |
pre-commit run --all-files
17 changes: 11 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ dist
runhistory.json
target_algo_runs.json

# Example outputs
examples/*restored
examples/*restore_me

# Other
.tox
.pypirc
Expand All @@ -24,18 +28,19 @@ target_algo_runs.json
.html/
.mypy_cache/
.DS_Store
docs/html

#eclipse files
.pydevproject
.project

# generated by doc
doc/main_options.rst
doc/scenario_options.rst
doc/smac_options.rst
doc/apidoc
doc/examples
doc/quickstart
docs/main_options*
docs/scenario_options*
docs/smac_options*
docs/html
docs/apidoc
docs/pages/examples

# Generated from running Sphinx-Gallery
*smac3-output_*
Expand Down
12 changes: 1 addition & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,10 @@ repos:
rev: v0.761
hooks:
- id: mypy
# We would like to have the following options set,
# but for now we have to use the ones above to get started
# --ignore-missing-imports --strict"
# --disallow-any-unimported"
# --disallow-any-expr"
# --disallow-any-decorated"
# --disallow-any-explicit"
# --disallow-any-generics"
# Add the following once the scenario is removed from the main code or typed
# https://mypy.readthedocs.io/en/stable/command_line.html#configuring-warnings
# --warn-unused-ignores"
args: [--show-error-codes, --ignore-missing-imports, --disallow-untyped-decorators, --disallow-incomplete-defs, --disallow-untyped-defs, --follow-imports, skip]
name: mypy SMAC
files: smac/.*

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
hooks:
Expand Down
14 changes: 7 additions & 7 deletions .github/CONTRIBUTING.md → CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
### Contributing to SMAC3
# Contributing to SMAC3

You are interested in developing a new feature or have found a bug? Awesome, feel welcome and read this guide in order to find out how to best report your ideas so that we can include them as quickly as possible.

### General Notes
## General Notes
We are always happy to read about your experiences and ideas on how to improve SMAC3. We use the issue tracker as our main communication platform, so please open an issue to

* report bugs (label as `bug`)
Expand All @@ -12,7 +12,7 @@ We are always happy to read about your experiences and ideas on how to improve S

NOTE: Before working on a new feature please first create an issue. If the relevant issue already exists, please comment that issue to let us know that you are going to work on it. Through that, we can ensure that there is no duplicated effort.

### New Features
## New Features

If you are looking for feature that does not yet exist in SMAC3, we are happy to hear about it. Open an issue on our [issues list on GitHub](https://github.com/automl/SMAC3/issues), and describe
- the feature you would like to see
Expand All @@ -21,7 +21,7 @@ If you are looking for feature that does not yet exist in SMAC3, we are happy to

If you already know how to implement the feature, please create a pull request. Please see the [Pull request](#pull-requests) section, to read further details on pull requests.

### <a name="report-bugs"></a> Report Bugs
## <a name="report-bugs"></a> Report Bugs

Open an issue in our [issue list on GitHub](https://github.com/automl/SMAC3/issues).

Expand All @@ -37,12 +37,12 @@ If you found a bug, please provide us the following information:
- Any information about your setup that could be helpful to resolve the bug (such as installed python packages)
- Feel free, to add a screenshot showing the issue, if it helps.

### Work on New Features
## Work on New Features

To work on new features, create a fork of the original repository and implement the feature there. When you are happy with the final result you can create a pull request which we will review.
A good tutorial on how to do this is in the Github Guide: [Fork a repo](https://help.github.com/articles/fork-a-repo/).

### <a name="pull-requests"></a> Pull Requests
## <a name="pull-requests"></a> Pull Requests

The target branch for your pull request has to be the development branch. If you have not worked with pull requests, please take a look at [how to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) or read more about it in the official github documentation <https://help.github.com/articles/about-pull-requests/>

Expand All @@ -56,6 +56,6 @@ If you know how to fix a bug or implement your own feature, follow this small gu

We try to react as fast as possible to your pull request.

### Reporting Security Issues
## Reporting Security Issues

If you find security related issues, vulnerabilities or bugs including sensitive information, please do *not* report this to the issue tracker, or elsewhere public. Instead, please let us know via security@automl.org
21 changes: 7 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,16 @@
test:
pytest -v --cov=smac test --durations=20

.PHONY: doc
.PHONY: docs
doc:
make -C doc clean
make -C doc buildapi
make -C doc html-noplot
make -C doc linkcheck

.PHONY: doc-with-examples
doc-with-examples:
make -C doc clean
make -C doc buildapi
make -C doc html
make -C doc linkcheck
make -C docs clean
make -C docs buildapi
make -C docs html

.PHONY: clean
clean: clean-data
make -C doc clean
clean:
clean-data
make -C docs clean

.PHONY: clean-data
clean-data:
Expand Down
Loading

0 comments on commit 7652960

Please sign in to comment.