Skip to content

Commit 38f2fed

Browse files
authored
Merge pull request #980 from notoraptor/release-0.2.5rc
Release 0.2.5rc
2 parents c702066 + 6e32f9c commit 38f2fed

File tree

345 files changed

+9043
-6753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

345 files changed

+9043
-6753
lines changed

.github/workflows/build.yml

Lines changed: 108 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,23 @@ on:
1313
workflow_dispatch:
1414

1515
jobs:
16+
pre-commit:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: actions/setup-python@v2
21+
- run: pip install pre-commit
22+
- run: pre-commit --version
23+
- run: pre-commit install
24+
- run: pre-commit run --all-files
1625
pretest:
1726
runs-on: ubuntu-latest
1827
strategy:
1928
matrix:
20-
toxenv: [black, isort, pylint, doc8, docs]
29+
toxenv: [pylint, doc8, docs]
2130

2231
steps:
23-
- uses: actions/checkout@v1
32+
- uses: actions/checkout@v2
2433
- name: Set up Python 3.9
2534
uses: actions/setup-python@v2
2635
with:
@@ -31,8 +40,46 @@ jobs:
3140
pip install tox tox-gh-actions
3241
- name: Run pre-tests with Tox
3342
run: tox -e ${{ matrix.toxenv }}
34-
test:
43+
44+
test-dashboard-build:
3545
needs: pretest
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/checkout@v2
49+
- name: Use Node.js ${{ matrix.node-version }}
50+
uses: actions/setup-node@v2
51+
with:
52+
node-version: 16
53+
- name: Compile Dashboard
54+
run: |
55+
cd dashboard/src
56+
yarn
57+
yarn build
58+
rm -rf ../build
59+
mv build ..
60+
cd ../../
61+
- name: Set up Python 3.9
62+
uses: actions/setup-python@v2
63+
with:
64+
python-version: 3.9
65+
- name: Install dependencies
66+
run: |
67+
python -m pip install --upgrade pip
68+
pip install -e .[test]
69+
- name: Get gecko driver
70+
run: |
71+
wget https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz
72+
tar -xvf geckodriver-v0.31.0-linux64.tar.gz
73+
export PATH=$PATH:$(pwd)
74+
- name: Launch backend
75+
run: orion serve -c .github/workflows/orion/orion_config.yaml &
76+
- name: Launch frontend
77+
run: orion frontend &
78+
- name: Test frontend
79+
run: pytest tests/functional/serving/test_frontend.py
80+
81+
test:
82+
needs: [pre-commit, pretest]
3683
runs-on: ${{ matrix.platform }}
3784
strategy:
3885
max-parallel: 4
@@ -63,7 +110,7 @@ jobs:
63110
fail_ci_if_error: false
64111

65112
test-long-algos:
66-
needs: pretest
113+
needs: [pre-commit, pretest]
67114
runs-on: ${{ matrix.platform }}
68115
strategy:
69116
matrix:
@@ -97,7 +144,7 @@ jobs:
97144
fail_ci_if_error: false
98145

99146
test_no_extras:
100-
needs: pretest
147+
needs: [pre-commit, pretest]
101148
runs-on: ubuntu-latest
102149
steps:
103150
- uses: actions/checkout@v1
@@ -120,7 +167,7 @@ jobs:
120167
name: codecov-umbrella
121168
fail_ci_if_error: false
122169
mongodb:
123-
needs: pretest
170+
needs: [pre-commit, pretest]
124171
runs-on: ubuntu-latest
125172
steps:
126173
- uses: actions/checkout@v1
@@ -149,7 +196,7 @@ jobs:
149196
name: codecov-umbrella
150197
fail_ci_if_error: false
151198
backward-compatibility:
152-
needs: pretest
199+
needs: [pre-commit, pretest]
153200
runs-on: ubuntu-latest
154201
strategy:
155202
max-parallel: 2
@@ -184,7 +231,7 @@ jobs:
184231
name: codecov-umbrella
185232
fail_ci_if_error: false
186233
pypi:
187-
needs: [test, backward-compatibility, test-long-algos]
234+
needs: [test, backward-compatibility, test-long-algos, mongodb, test_no_extras, test-dashboard-build]
188235
runs-on: ubuntu-latest
189236
steps:
190237
- uses: actions/checkout@v1
@@ -200,6 +247,58 @@ jobs:
200247
run: tox -e packaging
201248
- name: Build
202249
run: tox -e build
250+
- name: Test dashboard build deployment on normal install
251+
run: |
252+
# Get package path
253+
export ORION_PACKAGE=$( realpath `find dist/ -type f` )
254+
echo Package path: ${ORION_PACKAGE}
255+
# Move to another folder (to prevent any confusion at installation with repo folder)
256+
cd ~
257+
echo Normal install
258+
pip install ${ORION_PACKAGE}
259+
# Get prefix
260+
export ORION_PREFIX=$( python -c "import sys; print(sys.prefix);" )
261+
echo Check if dashboard build is installed
262+
if ( [ -d "${ORION_PREFIX}/orion-dashboard" ] ); then true; else false; fi
263+
if ( [ -f "${ORION_PREFIX}/orion-dashboard/build/index.html" ] ); then true; else false; fi
264+
if ( ls ${ORION_PREFIX}/orion-dashboard/build/static/js/main.*.js ); then true; else false; fi
265+
echo Check if frontend script can find dashboard build
266+
python -c "from orion.core.cli.frontend import get_dashboard_build_path; get_dashboard_build_path();"
267+
echo Clean-up
268+
pip uninstall -y orion
269+
echo Check if dashboard build is correctly removed
270+
# NB: It seems orion-dashboard build is not deleted,
271+
# but it should be empty after uninstall
272+
if ( [ -f "${ORION_PREFIX}/orion-dashboard/build/index.html" ] ); then false; fi
273+
if ( ls ${ORION_PREFIX}/orion-dashboard/build/static/js/main.*.js ); then false; fi
274+
echo End
275+
cd -
276+
- name: Test dashboard build deployment on user install
277+
run: |
278+
# Get package path
279+
export ORION_PACKAGE=$( realpath `find dist/ -type f` )
280+
echo Package path: ${ORION_PACKAGE}
281+
# Move to another folder (to prevent any confusion at installation with repo folder)
282+
cd ~
283+
echo User install
284+
pip install --user ${ORION_PACKAGE}
285+
# Get prefix
286+
export ORION_PREFIX=$( python -c "import site; print(site.USER_BASE);" )
287+
echo Check if dashboard build is installed
288+
if ( [ -d "${ORION_PREFIX}/orion-dashboard" ] ); then true; else false; fi
289+
if ( [ -f "${ORION_PREFIX}/orion-dashboard/build/index.html" ] ); then true; else false; fi
290+
if ( ls ${ORION_PREFIX}/orion-dashboard/build/static/js/main.*.js ); then true; else false; fi
291+
echo Check if frontend script can find dashboard build
292+
python -c "from orion.core.cli.frontend import get_dashboard_build_path; get_dashboard_build_path();"
293+
echo Clean-up
294+
pip uninstall -y orion
295+
echo Check if dashboard build is correctly removed
296+
# NB: In user install case, it seems folder orion-dashboard itself is not deleted,
297+
# but it should be empty after uninstall
298+
if ( [ -f "${ORION_PREFIX}/orion-dashboard/build/index.html" ] ); then false; fi
299+
if ( ls ${ORION_PREFIX}/orion-dashboard/build/static/js/main.*.js ); then false; fi
300+
echo End
301+
cd -
203302
- name: Publish distribution 📦 to Test PyPI
204303
if: startsWith(github.ref, 'refs/tags')
205304
uses: pypa/gh-action-pypi-publish@master
@@ -214,7 +313,7 @@ jobs:
214313
user: __token__
215314
password: ${{ secrets.pypi_password }}
216315
conda:
217-
needs: [test, backward-compatibility, test-long-algos]
316+
needs: [test, backward-compatibility, test-long-algos, test-dashboard-build]
218317
runs-on: ubuntu-latest
219318
env:
220319
ANACONDA_TOKEN: ${{ secrets.anaconda_token }}
179 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
storage:
22
database:
3-
host: '../../.github/workflows/orion/db_dashboard_full.pkl'
3+
host: '.github/workflows/orion/db_dashboard_full.pkl'
44
type: 'pickleddb'
55

66
gunicorn:
77
bind: '127.0.0.1:8000'
88
workers: 4
99
threads: 2
10+
11+
frontends_uri: ["http://localhost:3000", "http://127.0.0.1:3000"]

.pre-commit-config.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
---
22
repos:
33
- repo: https://github.com/python/black
4-
rev: 22.3.0
4+
rev: 22.6.0
55
hooks:
66
- id: black
77
- repo: https://github.com/codespell-project/codespell
88
rev: v2.1.0
99
hooks:
1010
- id: codespell
11-
args:
12-
- --ignore-words-list=nd,reacher,thist,ths,hist
11+
args: ["--skip", "*.html,*.ipynb,dashboard/src/.yarn/**,dashboard/build/**,dashboard/src/src/__tests__/**", "--ignore-words-list=hist,wont"]
1312
- repo: https://gitlab.com/pycqa/flake8
1413
rev: 3.9.2
1514
hooks:
@@ -26,7 +25,7 @@ repos:
2625
- id: isort
2726
args: ["--profile", "black"]
2827
- repo: https://github.com/asottile/pyupgrade
29-
rev: v2.31.0
28+
rev: v2.34.0
3029
hooks:
3130
- id: pyupgrade
3231
args: ["--py37-plus"]
@@ -36,8 +35,10 @@ repos:
3635
- id: autoflake
3736
args: ["--in-place", "--expand-star-imports", "--remove-all-unused-imports", "--ignore-init-module-imports"]
3837

39-
- repo: https://github.com/PyCQA/doc8
40-
rev: 0.8.1
41-
hooks:
42-
- id: doc8
43-
args: ["--max-line-length=100", "--file-encoding=utf-8"]
38+
# BUG: Appears not to not always work properly! Enable locally if you want, but the CI will use
39+
# the tox variant for now.
40+
# - repo: https://github.com/PyCQA/doc8
41+
# rev: 0.8.1
42+
# hooks:
43+
# - id: doc8
44+
# args: ["--max-line-length=100", "--file-encoding=utf-8"]

.pylintrc

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ confidence=
5151
# --enable=similarities". If you want to run only the classes checker, but have
5252
# no Warning level messages displayed, use"--disable=all --enable=classes
5353
# --disable=W"
54-
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,
55-
C0415, F0010, R0205, R1705, R1711, R1720, W0106, W0107, W0127, W0706, C0330, C0326, W1203, E1136
54+
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,
55+
C0415, F0010, R0205, R1705, R1711, R1720, W0106, W0107, W0127, W0706, W1203, E1136
5656

5757
# Enable the message, report, category or checker with the given id(s). You can
5858
# either give multiple identifier separated by comma (,) or put this option
@@ -128,12 +128,6 @@ max-line-length=100
128128
# Maximum number of lines in a module
129129
max-module-lines=750
130130

131-
# List of optional constructs for which whitespace checking is disabled. `dict-
132-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
133-
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
134-
# `empty-line` allows space-only lines.
135-
no-space-check=trailing-comma,dict-separator
136-
137131
# Allow the body of a class to be on the same line as the declaration if body
138132
# contains single statement.
139133
single-line-class-stmt=no
@@ -215,46 +209,28 @@ notes=FIXME,XXX,TODO
215209

216210
[BASIC]
217211

218-
# Naming hint for argument names
219-
argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
220-
221212
# Regular expression matching correct argument names
222213
argument-rgx=^(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
223214

224-
# Naming hint for attribute names
225-
attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
226-
227215
# Regular expression matching correct attribute names
228216
attr-rgx=^(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
229217

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

233-
# Naming hint for class attribute names
234-
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
235-
236221
# Regular expression matching correct class attribute names
237222
class-attribute-rgx=^([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
238223

239-
# Naming hint for class names
240-
class-name-hint=[A-Z_][a-zA-Z0-9]+$
241-
242224
# Regular expression matching correct class names
243225
class-rgx=^[A-Z_][a-zA-Z0-9]+$
244226

245-
# Naming hint for constant names
246-
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
247-
248227
# Regular expression matching correct constant names
249228
const-rgx=^(([A-Z_][A-Z0-9_]*)|(__.*__)|([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$
250229

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

255-
# Naming hint for function names
256-
function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
257-
258234
# Regular expression matching correct function names
259235
function-rgx=^(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
260236

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

267-
# Naming hint for inline iteration names
268-
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
269-
270243
# Regular expression matching correct inline iteration names
271244
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
272245

273-
# Naming hint for method names
274-
method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
275-
276246
# Regular expression matching correct method names
277247
method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
278248

279-
# Naming hint for module names
280-
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
281-
282249
# Regular expression matching correct module names
283250
module-rgx=^(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
284251

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

297-
# Naming hint for variable names
298-
variable-name-hint=(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$
299-
300264
# Regular expression matching correct variable names
301265
variable-rgx=^(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$
302266

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Contributing to Oríon
22
Hi there 👋. Thank you for considering contributing to Oríon 🎉. We're excited to have you here!
33

4-
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.
4+
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.
55

66
## Where do I go from here?
77
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.

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ prune docs/build
2828
prune docs/src/reference
2929
recursive-include src *.py
3030
recursive-include tests *.py *.yaml *.json *.txt *.yml *.in LICENSE
31+
recursive-include dashboard/build *
3132
include tests/requirements.txt
3233
include .pre-commit-config.yaml
3334
include CITATION.bib

0 commit comments

Comments
 (0)