Skip to content

Commit

Permalink
Use requirements instead of extra_requires
Browse files Browse the repository at this point in the history
  • Loading branch information
c-bata committed Feb 10, 2021
1 parent 7db177d commit 5f8cbc8
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 22 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- 'cmaes/**.py'
- 'benchmark/*.py'
- 'benchmark/runner.sh'
- 'requirements-bench.txt'
jobs:
benchmark-six-hump-camel:
name: Run kurobako benchmark
Expand All @@ -19,7 +20,7 @@ jobs:
architecture: 'x64'
- run: pip install -U pip setuptools
- run: python setup.py develop
- run: pip install --progress-bar off -e '.[benchmark]'
- run: pip install --progress-bar off -r requirements-bench.txt
- run: pip install --progress-bar off -U git+https://github.com/sile/kurobako-py
- run: pip install --progress-bar off -U git+https://github.com/optuna/optuna.git
- name: Cache kurobako CLI
Expand Down Expand Up @@ -111,7 +112,7 @@ jobs:
architecture: 'x64'
- run: pip install -U pip setuptools
- run: python setup.py develop
- run: pip install --progress-bar off -e '.[benchmark]'
- run: pip install --progress-bar off -r requirements-bench.txt
- run: pip install --progress-bar off -U git+https://github.com/sile/kurobako-py
- run: pip install --progress-bar off -U git+https://github.com/optuna/optuna.git
- name: Cache kurobako CLI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install dependencies
run: |
pip install -U pip setuptools
pip install --progress-bar off optuna
pip install --progress-bar off optuna 'numpy<1.20.0'
pip install --progress-bar off -U .
- run: python examples/quadratic_function.py
- run: python examples/ipop_cmaes.py
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install --progress-bar off .[lint]
python -m pip install --upgrade pip setuptools 'numpy<1.20.0'
pip install --progress-bar off -r requirements-dev.txt
- run: flake8 . --show-source --statistics
- run: black --check .
- run: mypy cmaes
Expand All @@ -37,6 +37,6 @@ jobs:
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install --upgrade pip setuptools 'numpy<1.20.0'
pip install --progress-bar off .
- run: python -m unittest
3 changes: 3 additions & 0 deletions requirements-bench.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kurobako
cma
optuna
15 changes: 15 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# install_requires
numpy<1.20.0

# visualization
matplotlib
scipy

# lint
mypy
flake8
black

# release
wheel
twine
16 changes: 0 additions & 16 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,6 @@ setup_requires =
install_requires =
numpy

[options.extras_require]
benchmark =
kurobako
cma
optuna
visualization =
matplotlib
scipy
lint =
mypy
flake8
black
release =
wheel
twine

[options.packages.find]
exclude =
tests
Expand Down

0 comments on commit 5f8cbc8

Please sign in to comment.