Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat apply ruff #497

Merged
merged 69 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 66 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
724e59b
chore: add ruff
phi-friday Jul 11, 2024
23290a9
chore: init ruff config
phi-friday Jul 11, 2024
536ef27
chore: update ruff pydocstyle config
phi-friday Jul 11, 2024
479f495
chore: update ruff rules
phi-friday Jul 11, 2024
7f47a03
chore: update ruff exclude
phi-friday Jul 11, 2024
393c65d
fix: init format & check(fix)
phi-friday Jul 11, 2024
e16ce00
fix: constraint
phi-friday Jul 11, 2024
5b7eb9f
fix: domain_reduction(without E501)
phi-friday Jul 11, 2024
25ed03c
fix: update ruff rule(TRY -> TRY002)
phi-friday Jul 11, 2024
f8160f6
fix: target_space(without E501)
phi-friday Jul 11, 2024
360d2ba
fix: init tests
phi-friday Jul 11, 2024
d413d01
fix: test_notebooks_run.py
phi-friday Jul 11, 2024
e353169
fix: test_observer
phi-friday Jul 11, 2024
abedcff
fix: test_seq_domain_red
phi-friday Jul 11, 2024
d82650b
fix: test_target_space
phi-friday Jul 11, 2024
15a62e6
fix: E501
phi-friday Jul 11, 2024
ddeb03a
chore: add pre-commit
phi-friday Jul 11, 2024
6754176
chore: update ruff
phi-friday Jul 11, 2024
cf6a5f4
chore: add precommit config
phi-friday Jul 11, 2024
571fe89
feat: add format & lint action
phi-friday Jul 11, 2024
d88d134
test
phi-friday Jul 11, 2024
edf85b2
fix: 3.10 -> 3.9(minimum)
phi-friday Jul 11, 2024
9f7c30a
chore: update ruff config
phi-friday Jul 11, 2024
4153f8b
chore: update ruff config
phi-friday Jul 11, 2024
4737456
revert check docstring(not yet D rule)
phi-friday Jul 11, 2024
b9a9e56
chore: revert pydocstyle
phi-friday Jul 11, 2024
601ac0c
fix: add coverage exclude_lines
phi-friday Jul 11, 2024
3782729
SIM
phi-friday Jul 11, 2024
e2802a1
S
phi-friday Jul 11, 2024
06267c7
DTZ
phi-friday Jul 11, 2024
db588fe
EM
phi-friday Jul 11, 2024
cefe0f8
LOG
phi-friday Jul 11, 2024
af70db1
G
phi-friday Jul 11, 2024
0f80750
PIE
phi-friday Jul 11, 2024
a93405c
Q
phi-friday Jul 11, 2024
069d879
RET
phi-friday Jul 11, 2024
f3176c3
TID
phi-friday Jul 11, 2024
0e08ea6
PTH
phi-friday Jul 11, 2024
1dd2304
F
phi-friday Jul 11, 2024
b23e17f
NPY
phi-friday Jul 11, 2024
6afdd5e
PERF
phi-friday Jul 11, 2024
ff1f055
FURB
phi-friday Jul 11, 2024
4636b9a
RUF
phi-friday Jul 11, 2024
223cc57
D
phi-friday Jul 11, 2024
627f14d
chore: rm pydocstyle action
phi-friday Jul 11, 2024
b012d6c
chore: rm pydocstyle
phi-friday Jul 11, 2024
4f054a3
fix: render path only once
phi-friday Jul 11, 2024
c86d195
ISC
phi-friday Jul 12, 2024
b318e78
fix: pr447
phi-friday Jul 13, 2024
4025a49
init
phi-friday Jul 13, 2024
553eefe
fix: acquisition
phi-friday Jul 13, 2024
b1db8b8
fix: bayesian_optimization
phi-friday Jul 13, 2024
2d7028c
fix: util
phi-friday Jul 13, 2024
74589b5
fix: acquisition
phi-friday Jul 13, 2024
ae1e94b
fix: test_bayesian_optimization
phi-friday Jul 13, 2024
75d74ab
fix: test_constraint
phi-friday Jul 13, 2024
cb2e93b
fix: test_util
phi-friday Jul 13, 2024
edb015c
fix: _update_params
phi-friday Jul 13, 2024
b39fd8f
feat: scripts
phi-friday Jul 13, 2024
e78cc2d
fix: reviews
phi-friday Jul 13, 2024
c3835d3
test: upper_confidence_bound_invalid_kappa_error
phi-friday Jul 13, 2024
980c603
chore: update ruff
phi-friday Jul 14, 2024
1d33643
fix: acquisition
phi-friday Jul 17, 2024
39ea506
fix: util
phi-friday Jul 17, 2024
c477ebc
fix: relative -> absolute
phi-friday Jul 17, 2024
d305c1b
fix: import error
phi-friday Jul 17, 2024
e14c3a9
fix: review
phi-friday Jul 17, 2024
1e48510
fix: review
phi-friday Jul 17, 2024
ed5a224
fix: rm unused func
phi-friday Jul 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/workflows/check_docstrings.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/format_and_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Code format and lint

on:
push:
branches: [ "master" ]
pull_request:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: |
poetry install --with dev
- name: Run pre-commit
run : poetry run pre-commit run --all-files --show-diff-on-failure --color=always
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- hooks:
- id: ruff
name: ruff-lint
repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.2

- hooks:
- id: ruff-format
name: ruff-format
args: [--check]
repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.2
16 changes: 9 additions & 7 deletions bayes_opt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
"""Pure Python implementation of bayesian global optimization with gaussian processes."""
from .bayesian_optimization import BayesianOptimization, Events
from .domain_reduction import SequentialDomainReductionTransformer
from .logger import ScreenLogger, JSONLogger
from .constraint import ConstraintModel
from . import acquisition

from __future__ import annotations
till-m marked this conversation as resolved.
Show resolved Hide resolved

import importlib.metadata
__version__ = importlib.metadata.version('bayesian-optimization')

from bayes_opt import acquisition
from bayes_opt.bayesian_optimization import BayesianOptimization, Events
from bayes_opt.constraint import ConstraintModel
from bayes_opt.domain_reduction import SequentialDomainReductionTransformer
from bayes_opt.logger import JSONLogger, ScreenLogger

__version__ = importlib.metadata.version("bayesian-optimization")


__all__ = [
Expand All @@ -19,4 +22,3 @@
"JSONLogger",
"SequentialDomainReductionTransformer",
]

Loading
Loading