Skip to content

Commit

Permalink
Merge pull request #980 from notoraptor/release-0.2.5rc
Browse files Browse the repository at this point in the history
Release 0.2.5rc
  • Loading branch information
bouthilx authored Aug 3, 2022
2 parents c702066 + 6e32f9c commit 38f2fed
Show file tree
Hide file tree
Showing 345 changed files with 9,043 additions and 6,753 deletions.
117 changes: 108 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,23 @@ on:
workflow_dispatch:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install pre-commit
- run: pre-commit --version
- run: pre-commit install
- run: pre-commit run --all-files
pretest:
runs-on: ubuntu-latest
strategy:
matrix:
toxenv: [black, isort, pylint, doc8, docs]
toxenv: [pylint, doc8, docs]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
Expand All @@ -31,8 +40,46 @@ jobs:
pip install tox tox-gh-actions
- name: Run pre-tests with Tox
run: tox -e ${{ matrix.toxenv }}
test:

test-dashboard-build:
needs: pretest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: 16
- name: Compile Dashboard
run: |
cd dashboard/src
yarn
yarn build
rm -rf ../build
mv build ..
cd ../../
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[test]
- name: Get gecko driver
run: |
wget https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz
tar -xvf geckodriver-v0.31.0-linux64.tar.gz
export PATH=$PATH:$(pwd)
- name: Launch backend
run: orion serve -c .github/workflows/orion/orion_config.yaml &
- name: Launch frontend
run: orion frontend &
- name: Test frontend
run: pytest tests/functional/serving/test_frontend.py

test:
needs: [pre-commit, pretest]
runs-on: ${{ matrix.platform }}
strategy:
max-parallel: 4
Expand Down Expand Up @@ -63,7 +110,7 @@ jobs:
fail_ci_if_error: false

test-long-algos:
needs: pretest
needs: [pre-commit, pretest]
runs-on: ${{ matrix.platform }}
strategy:
matrix:
Expand Down Expand Up @@ -97,7 +144,7 @@ jobs:
fail_ci_if_error: false

test_no_extras:
needs: pretest
needs: [pre-commit, pretest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand All @@ -120,7 +167,7 @@ jobs:
name: codecov-umbrella
fail_ci_if_error: false
mongodb:
needs: pretest
needs: [pre-commit, pretest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -149,7 +196,7 @@ jobs:
name: codecov-umbrella
fail_ci_if_error: false
backward-compatibility:
needs: pretest
needs: [pre-commit, pretest]
runs-on: ubuntu-latest
strategy:
max-parallel: 2
Expand Down Expand Up @@ -184,7 +231,7 @@ jobs:
name: codecov-umbrella
fail_ci_if_error: false
pypi:
needs: [test, backward-compatibility, test-long-algos]
needs: [test, backward-compatibility, test-long-algos, mongodb, test_no_extras, test-dashboard-build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand All @@ -200,6 +247,58 @@ jobs:
run: tox -e packaging
- name: Build
run: tox -e build
- name: Test dashboard build deployment on normal install
run: |
# Get package path
export ORION_PACKAGE=$( realpath `find dist/ -type f` )
echo Package path: ${ORION_PACKAGE}
# Move to another folder (to prevent any confusion at installation with repo folder)
cd ~
echo Normal install
pip install ${ORION_PACKAGE}
# Get prefix
export ORION_PREFIX=$( python -c "import sys; print(sys.prefix);" )
echo Check if dashboard build is installed
if ( [ -d "${ORION_PREFIX}/orion-dashboard" ] ); then true; else false; fi
if ( [ -f "${ORION_PREFIX}/orion-dashboard/build/index.html" ] ); then true; else false; fi
if ( ls ${ORION_PREFIX}/orion-dashboard/build/static/js/main.*.js ); then true; else false; fi
echo Check if frontend script can find dashboard build
python -c "from orion.core.cli.frontend import get_dashboard_build_path; get_dashboard_build_path();"
echo Clean-up
pip uninstall -y orion
echo Check if dashboard build is correctly removed
# NB: It seems orion-dashboard build is not deleted,
# but it should be empty after uninstall
if ( [ -f "${ORION_PREFIX}/orion-dashboard/build/index.html" ] ); then false; fi
if ( ls ${ORION_PREFIX}/orion-dashboard/build/static/js/main.*.js ); then false; fi
echo End
cd -
- name: Test dashboard build deployment on user install
run: |
# Get package path
export ORION_PACKAGE=$( realpath `find dist/ -type f` )
echo Package path: ${ORION_PACKAGE}
# Move to another folder (to prevent any confusion at installation with repo folder)
cd ~
echo User install
pip install --user ${ORION_PACKAGE}
# Get prefix
export ORION_PREFIX=$( python -c "import site; print(site.USER_BASE);" )
echo Check if dashboard build is installed
if ( [ -d "${ORION_PREFIX}/orion-dashboard" ] ); then true; else false; fi
if ( [ -f "${ORION_PREFIX}/orion-dashboard/build/index.html" ] ); then true; else false; fi
if ( ls ${ORION_PREFIX}/orion-dashboard/build/static/js/main.*.js ); then true; else false; fi
echo Check if frontend script can find dashboard build
python -c "from orion.core.cli.frontend import get_dashboard_build_path; get_dashboard_build_path();"
echo Clean-up
pip uninstall -y orion
echo Check if dashboard build is correctly removed
# NB: In user install case, it seems folder orion-dashboard itself is not deleted,
# but it should be empty after uninstall
if ( [ -f "${ORION_PREFIX}/orion-dashboard/build/index.html" ] ); then false; fi
if ( ls ${ORION_PREFIX}/orion-dashboard/build/static/js/main.*.js ); then false; fi
echo End
cd -
- name: Publish distribution 📦 to Test PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
Expand All @@ -214,7 +313,7 @@ jobs:
user: __token__
password: ${{ secrets.pypi_password }}
conda:
needs: [test, backward-compatibility, test-long-algos]
needs: [test, backward-compatibility, test-long-algos, test-dashboard-build]
runs-on: ubuntu-latest
env:
ANACONDA_TOKEN: ${{ secrets.anaconda_token }}
Expand Down
Binary file modified .github/workflows/orion/db_dashboard_full.pkl
Binary file not shown.
4 changes: 3 additions & 1 deletion .github/workflows/orion/orion_config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
storage:
database:
host: '../../.github/workflows/orion/db_dashboard_full.pkl'
host: '.github/workflows/orion/db_dashboard_full.pkl'
type: 'pickleddb'

gunicorn:
bind: '127.0.0.1:8000'
workers: 4
threads: 2

frontends_uri: ["http://localhost:3000", "http://127.0.0.1:3000"]
19 changes: 10 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
---
repos:
- repo: https://github.com/python/black
rev: 22.3.0
rev: 22.6.0
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
args:
- --ignore-words-list=nd,reacher,thist,ths,hist
args: ["--skip", "*.html,*.ipynb,dashboard/src/.yarn/**,dashboard/build/**,dashboard/src/src/__tests__/**", "--ignore-words-list=hist,wont"]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
Expand All @@ -26,7 +25,7 @@ repos:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
rev: v2.34.0
hooks:
- id: pyupgrade
args: ["--py37-plus"]
Expand All @@ -36,8 +35,10 @@ repos:
- id: autoflake
args: ["--in-place", "--expand-star-imports", "--remove-all-unused-imports", "--ignore-init-module-imports"]

- repo: https://github.com/PyCQA/doc8
rev: 0.8.1
hooks:
- id: doc8
args: ["--max-line-length=100", "--file-encoding=utf-8"]
# BUG: Appears not to not always work properly! Enable locally if you want, but the CI will use
# the tox variant for now.
# - repo: https://github.com/PyCQA/doc8
# rev: 0.8.1
# hooks:
# - id: doc8
# args: ["--max-line-length=100", "--file-encoding=utf-8"]
40 changes: 2 additions & 38 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ 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=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,no-self-use,
C0415, F0010, R0205, R1705, R1711, R1720, W0106, W0107, W0127, W0706, C0330, C0326, W1203, E1136
disable=abstract-class-instantiated,useless-super-delegation,no-member,keyword-arg-before-vararg,unidiomatic-typecheck,redefined-outer-name,fixme,F0401,wrong-import-position,wrong-import-order,
C0415, F0010, R0205, R1705, R1711, R1720, W0106, W0107, W0127, W0706, W1203, E1136

# 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 Expand Up @@ -128,12 +128,6 @@ max-line-length=100
# Maximum number of lines in a module
max-module-lines=750

# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,dict-separator

# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
Expand Down Expand Up @@ -215,46 +209,28 @@ notes=FIXME,XXX,TODO

[BASIC]

# Naming hint for argument names
argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Regular expression matching correct argument names
argument-rgx=^(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Naming hint for attribute names
attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Regular expression matching correct attribute names
attr-rgx=^(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Bad variable names which should always be refused, separated by a comma
bad-names=foo,bar,baz,toto,tutu,tata,lalala,alalal

# Naming hint for class attribute names
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$

# Regular expression matching correct class attribute names
class-attribute-rgx=^([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$

# Naming hint for class names
class-name-hint=[A-Z_][a-zA-Z0-9]+$

# Regular expression matching correct class names
class-rgx=^[A-Z_][a-zA-Z0-9]+$

# Naming hint for constant names
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$

# Regular expression matching correct constant names
const-rgx=^(([A-Z_][A-Z0-9_]*)|(__.*__)|([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$

# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1

# Naming hint for function names
function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Regular expression matching correct function names
function-rgx=^(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

Expand All @@ -264,21 +240,12 @@ good-names=i,j,k,v,ex,Run,_,f,e
# Include a hint for the correct naming format with invalid-name
include-naming-hint=no

# Naming hint for inline iteration names
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$

# Regular expression matching correct inline iteration names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$

# Naming hint for method names
method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Regular expression matching correct method names
method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Naming hint for module names
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

# Regular expression matching correct module names
module-rgx=^(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

Expand All @@ -294,9 +261,6 @@ no-docstring-rgx=^_
# to this list to register other decorators that produce valid properties.
property-classes=abc.abstractproperty

# Naming hint for variable names
variable-name-hint=(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$

# Regular expression matching correct variable names
variable-rgx=^(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributing to Oríon
Hi there 👋. Thank you for considering contributing to Oríon 🎉. We're excited to have you here!

We present the guidelines for contributing to the project. They are not hard rules, use your best judgment, and feel free to propose changes to this document in a pull request. If you havn't already, it's a good idea to quickly pass through our [code of conduct](https://github.com/Epistimio/orion/blob/develop/CODE_OF_CONDUCT.md) to ensure everyone has a good time.
We present the guidelines for contributing to the project. They are not hard rules, use your best judgment, and feel free to propose changes to this document in a pull request. If you haven't already, it's a good idea to quickly pass through our [code of conduct](https://github.com/Epistimio/orion/blob/develop/CODE_OF_CONDUCT.md) to ensure everyone has a good time.

## Where do I go from here?
If you have a question, found a bug or have a feature request, you're welcome to open a new issue at https://github.com/Epistimio/orion/issues. It's generally best if you get confirmation of your bug or approval for your feature request before starting to code.
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ prune docs/build
prune docs/src/reference
recursive-include src *.py
recursive-include tests *.py *.yaml *.json *.txt *.yml *.in LICENSE
recursive-include dashboard/build *
include tests/requirements.txt
include .pre-commit-config.yaml
include CITATION.bib
Expand Down
Loading

0 comments on commit 38f2fed

Please sign in to comment.