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

Bump peaceiris/actions-gh-pages from 3 to 4 #74

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
poetry run sphinx-build -b html docs/source docs/build/html

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html
19 changes: 10 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -16,33 +16,34 @@ repos:
- id: detect-private-key
- id: forbid-new-submodules
- id: check-docstring-first
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
hooks:
- id: reorder-python-imports
#- repo: https://github.com/asottile/reorder-python-imports
#rev: v3.14.0
#hooks:
#- id: reorder-python-imports
# removed until blank line conflict with ruff-format is resolved
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.15
rev: v0.9.2
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.8.0'
rev: 'v1.14.1'
hooks:
- id: mypy
args: [--strict, --ignore-missing-imports, --allow-untyped-decorators, --allow-subclassing-any]
exclude: "^examples/blueprint_example"

- repo: https://github.com/econchick/interrogate
rev: 1.5.0
rev: 1.7.0
hooks:
- id: interrogate
args: [--verbose, --ignore-init-method, --ignore-init-module, --fail-under=100]
# --ignore-init-module seems not to work as intended, so adding __init__.py to excludes as well
exclude: "^docs|__init__.py"
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
rev: eb1df347edd128b30cd3368dddc3aa65edcfac38 # Don't autoupdate until https://github.com/PyCQA/docformatter/issues/293 is fixed
hooks:
- id: docformatter
args: [--in-place, --black]
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

For more details, refer to the [documentation](https://surfquantum.github.io/yotse/).

## (upcoming)
## [1.0.1] - 2025-01-16
* added `dependabot` to update `github-actions`
* added [zenodo](https://zenodo.org/) DOI
* fixed for `bayesian-optimization >= 2.0.0`
* updated dependencies

## [1.0.0] - 2024-01-31
* separated optimizations in blackbox and analytical (where the function is known).
Expand Down
1 change: 1 addition & 0 deletions examples/blueprint_example/src/example_blueprint_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
executor class tailored for the NlBlueprint team and utility functions for pre-
submission setup and post-run cleanup.
"""

import os
import shutil
from typing import Any
Expand Down
1 change: 1 addition & 0 deletions examples/blueprint_example/src/processing_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
the cost function defined in total_cost and writes it, together with the optimization
parameters to a csv file in a format that can be read by smart-stopos and use to
generate new sets of parameters."""

import os
import pickle
from argparse import ArgumentParser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
saved, how many runs per data point to simulate, the name of the saved file and whether
the simulation results should be plotted.
"""

import copy
import os
import pickle
Expand Down
1 change: 1 addition & 0 deletions examples/run_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
If the `main`-method takes an argument `no_output` this will be passed as `True`
to avoid creating plots etc.
"""

import importlib
import inspect
import os
Expand Down
1 change: 1 addition & 0 deletions examples/wobbly_function/analyse_function_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

csv_output.csv.
"""

import csv
import os
from argparse import ArgumentParser
Expand Down
5 changes: 3 additions & 2 deletions examples/wobbly_function/example_wobbly_bayesian.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""This module demonstrates the process for a blackbox bayesian optimization using the
Yotse framework."""
from bayes_opt import UtilityFunction

from bayes_opt.acquisition import UpperConfidenceBound

from examples.wobbly_function.example_wobbly_main import remove_files_after_run
from examples.wobbly_function.example_wobbly_main import wobbly_pre
Expand All @@ -27,7 +28,7 @@ def main() -> None:
name="bayesopt",
blackbox_optimization=True,
opt_parameters={
"utility_function": UtilityFunction(kind="ucb", kappa=2.5, xi=0.0),
"utility_function": UpperConfidenceBound(kappa=2.5),
"n_iter": 10,
},
is_active=True,
Expand Down
1 change: 1 addition & 0 deletions examples/wobbly_function/example_wobbly_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
It leverages genetic algorithms for the optimization process, handles file management,
and cleans up after execution, showcasing a very basic use-case.
"""

import os
import shutil
from typing import Any
Expand Down
1 change: 1 addition & 0 deletions examples/wobbly_function/example_wobbly_param_switching.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""This module demonstrates the process for parameter switching during optimization
using the Yotse framework."""

from examples.wobbly_function.example_wobbly_main import remove_files_after_run
from examples.wobbly_function.example_wobbly_main import wobbly_pre
from yotse.execution import Executor
Expand Down
7 changes: 4 additions & 3 deletions examples/wobbly_function/example_wobbly_resume.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
It initializes the optimization process, runs for a few generations, and then showcases
how to resume the process from where it left off.
"""

from examples.wobbly_function.example_wobbly_main import remove_files_after_run
from examples.wobbly_function.example_wobbly_main import wobbly_pre
from yotse.execution import Executor
Expand All @@ -27,9 +28,9 @@ def main() -> None:

# write resume parameter to experiment
resume_experiment = wobbly_pre()
resume_experiment.system_setup.cmdline_arguments[
"--resume"
] = stop_resume_example.aux_dir
resume_experiment.system_setup.cmdline_arguments["--resume"] = (
stop_resume_example.aux_dir
)

resume_example = Executor(experiment=resume_experiment)
for i in range(
Expand Down
1 change: 1 addition & 0 deletions examples/wobbly_function/example_wobbly_whitebox.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""This module demonstrates the process for a whitebox optimization using the Yotse
framework."""

import random
from typing import Any

Expand Down
1 change: 1 addition & 0 deletions examples/wobbly_function/wobbly_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Usage:
python3 function.py -filebasename <folder-to-store-output>/<somefilebasename> -x 3 -y 5.5
"""

import csv
from argparse import ArgumentParser
from typing import Any
Expand Down
Loading
Loading