Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] authored Feb 7, 2023
1 parent 74c292b commit b651439
Show file tree
Hide file tree
Showing 58 changed files with 78 additions and 197 deletions.
22 changes: 0 additions & 22 deletions .envs/testenv-linkcheck.yml

This file was deleted.

17 changes: 6 additions & 11 deletions .envs/testenv-linux.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
name: estimagic

channels:
- conda-forge
- nodefaults

dependencies:
- jax
- pygmo
Expand All @@ -14,7 +12,6 @@ dependencies:
- pytest-cov # tests
- pytest-xdist # dev, tests
- statsmodels # dev, tests

- bokeh<=2.4.3 # run, tests
- click # run, tests
- cloudpickle # run, tests
Expand All @@ -26,13 +23,11 @@ dependencies:
- plotly # run, tests
- pybaum >= 0.1.2 # run, tests
- scipy>=1.2.1 # run, tests
- sqlalchemy <2.0 # run, tests


- sqlalchemy <2.0 # run, tests
- pip: # dev, tests, docs
- DFO-LS # dev, tests
- Py-BOBYQA # dev, tests
- fides==0.7.4 # dev, tests
- kaleido # dev, tests
- simoptlib==1.0.1 # dev, tests
- DFO-LS # dev, tests
- Py-BOBYQA # dev, tests
- fides==0.7.4 # dev, tests
- kaleido # dev, tests
- simoptlib==1.0.1 # dev, tests
- -e ../
17 changes: 6 additions & 11 deletions .envs/testenv-others.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
name: estimagic

channels:
- conda-forge
- nodefaults

dependencies:
- cyipopt
- nlopt # dev, tests
Expand All @@ -13,7 +11,6 @@ dependencies:
- pytest-cov # tests
- pytest-xdist # dev, tests
- statsmodels # dev, tests

- bokeh<=2.4.3 # run, tests
- click # run, tests
- cloudpickle # run, tests
Expand All @@ -25,13 +22,11 @@ dependencies:
- plotly # run, tests
- pybaum >= 0.1.2 # run, tests
- scipy>=1.2.1 # run, tests
- sqlalchemy <2.0 # run, tests


- sqlalchemy <2.0 # run, tests
- pip: # dev, tests, docs
- DFO-LS # dev, tests
- Py-BOBYQA # dev, tests
- fides==0.7.4 # dev, tests
- kaleido # dev, tests
- simoptlib==1.0.1 # dev, tests
- DFO-LS # dev, tests
- Py-BOBYQA # dev, tests
- fides==0.7.4 # dev, tests
- kaleido # dev, tests
- simoptlib==1.0.1 # dev, tests
- -e ../
4 changes: 1 addition & 3 deletions .envs/update_envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ def main():
docs_env.append(" - -e ../") # add local installation

# write environments
for name, env in zip(
["linux", "others", "linkcheck"], [test_env_linux, test_env_others, docs_env]
):
for name, env in zip(["linux", "others"], [test_env_linux, test_env_others]):
Path(f".envs/testenv-{name}.yml").write_text("\n".join(env) + "\n")


Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
---
name: main

# Automatically cancel a previous run.
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
push:
branches:
- main
pull_request:
branches:
- '*'

jobs:
run-tests-linux:
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }}
Expand Down Expand Up @@ -47,7 +44,6 @@ jobs:
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}

run-tests-win-and-mac:
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -76,7 +72,6 @@ jobs:
run: |
micromamba activate estimagic
pytest -m "not slow and not jax"
code-in-docs:
name: Run code snippets in documentation
runs-on: ubuntu-latest
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
---
name: PyPI

on: push

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install pypa/build
run: >-
python -m
Expand Down
10 changes: 4 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
- id: check-useless-excludes
# - id: identity # Prints all files passed to pre-commits. Debugging.
- repo: https://github.com/lyz-code/yamlfix
rev: 1.2.0
rev: 1.8.0
hooks:
- id: yamlfix
exclude: tests/optimization/fixtures
Expand All @@ -18,7 +18,6 @@ repos:
language: python
always_run: true
require_serial: true

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand Down Expand Up @@ -53,12 +52,12 @@ repos:
- id: check-docstring-first
exclude: src/estimagic/optimization/algo_options.py
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.28.0
rev: v1.29.0
hooks:
- id: yamllint
exclude: tests/optimization/fixtures
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
language_version: python3.10
Expand All @@ -79,7 +78,7 @@ repos:
- '88'
- --blank
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.230
rev: v0.0.241
hooks:
- id: ruff
# args:
Expand Down Expand Up @@ -131,6 +130,5 @@ repos:
additional_dependencies:
- setuptools-scm
- toml

ci:
autoupdate_schedule: monthly
3 changes: 0 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
---
version: 2

build:
os: ubuntu-22.04
tools:
python: mambaforge-4.10

conda:
environment: docs/rtd_environment.yml

sphinx:
builder: html
configuration: docs/source/conf.py
Expand Down
1 change: 0 additions & 1 deletion .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ yaml-files:
- '*.yaml'
- '*.yml'
- .yamllint

rules:
braces: enable
brackets: enable
Expand Down
2 changes: 0 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
codecov:
notify:
require_ci_to_pass: true

coverage:
precision: 2
round: down
Expand All @@ -14,7 +13,6 @@ coverage:
project:
default:
target: 90%

ignore:
- .tox/**/*
- release.py
Expand Down
4 changes: 0 additions & 4 deletions docs/rtd_environment.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
---
name: estimagic-docs

channels:
- conda-forge
- nodefaults

dependencies:
- python=3.9
- pip
- setuptools_scm
- toml

- black
- sphinx
- sphinxcontrib-bibtex
Expand All @@ -31,7 +28,6 @@ dependencies:
- joblib
- plotly
- ipython

- pip:
- ../
- kaleido
Expand Down
29 changes: 12 additions & 17 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
name: estimagic

channels:
- conda-forge
- nodefaults

dependencies:
- python=3.10 # dev
- cyipopt # dev
Expand All @@ -20,7 +18,6 @@ dependencies:
- setuptools_scm # dev
- statsmodels # dev, tests
- toml # dev

- bokeh<=2.4.3 # run, tests
- click # run, tests
- cloudpickle # run, tests
Expand All @@ -32,24 +29,22 @@ dependencies:
- plotly # run, tests
- pybaum >= 0.1.2 # run, tests
- scipy>=1.2.1 # run, tests
- sqlalchemy <2.0 # run, tests

- sqlalchemy <2.0 # run, tests
- pydata-sphinx-theme>=0.3.0 # docs
- myst-nb # docs
- sphinx # docs
- sphinx-copybutton # docs
- sphinx-panels # docs
- sphinxcontrib-bibtex # docs

- pip: # dev, tests, docs
- DFO-LS # dev, tests
- Py-BOBYQA # dev, tests
- black # dev
- blackcellmagic # dev
- fides==0.7.4 # dev, tests
- gif # dev
- gif[matplotlib] # dev
- kaleido # dev, tests
- pre-commit # dev
- simoptlib==1.0.1 # dev, tests
- -e . # dev
- DFO-LS # dev, tests
- Py-BOBYQA # dev, tests
- black # dev
- blackcellmagic # dev
- fides==0.7.4 # dev, tests
- gif # dev
- gif[matplotlib] # dev
- kaleido # dev, tests
- pre-commit # dev
- simoptlib==1.0.1 # dev, tests
- -e . # dev
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ extend-ignore = [
"S324", # Probable use of insecure hash function.
"COM812", # trailing comma missing, but black takes care of that
"PT007", # wrong type in parametrize, gave false positives
"EXE001", # Shebang is present but file is not executable
"PIE804", # unnecessary dict kwargs


# Things we are not sure we want
Expand All @@ -58,7 +60,12 @@ extend-ignore = [
"C901", # function too complex
"PT011", # pytest raises without match statement
"INP001", # implicit namespace packages without init.
"TRY300", # consider moving this statement to an else block
"TRY",
"PLR",
"TCH",
"RSE",
"SLF",
"PTH123",
# ======================================
]

Expand Down Expand Up @@ -112,5 +119,5 @@ norecursedirs = ["docs", ".envs"]

[tool.yamlfix]
line_length = 88
flow_style_sequence = false
sequence_style = "block_style"
none_representation = "null"
2 changes: 1 addition & 1 deletion src/estimagic/benchmarking/get_benchmark_problems.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def get_benchmark_problems(

if scaling:
scaling_options = scaling_options if scaling_options is not None else {}
scaling_options = {**{"min_scale": 0.1, "max_scale": 10}, **scaling_options}
scaling_options = {"min_scale": 0.1, "max_scale": 10, **scaling_options}
else:
scaling_options = None

Expand Down
1 change: 0 additions & 1 deletion src/estimagic/benchmarking/run_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ def _get_results(names, raw_results, kwargs_list):
results = {}

for name, result, inputs in zip(names, raw_results, kwargs_list):

if isinstance(result, OptimizeResult):
history = result.history
params_history = pd.DataFrame(
Expand Down
Loading

0 comments on commit b651439

Please sign in to comment.