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

Fix black test failure in CI #120

Merged
merged 15 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
jeipollack marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- name:
uses: actions/checkout@v3

- name: Set up Python 3.10.5
- name: Set up Python 3.10.12
uses: actions/setup-python@v3
with:
python-version: "3.10.5"
python-version: "3.10.12"

- name: Install dependencies
run: python -m pip install ".[test]"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
jeipollack marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ release = [
]

test = [
"pytest",
"pytest==7.4.4",
"pytest-black",
"pytest-cases",
"pytest-cov",
Expand Down
1 change: 1 addition & 0 deletions src/wf_psf/data/training_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:Authors: Jennifer Pollack <[email protected]> and Tobias Liaudat <[email protected]>

"""

import numpy as np
import wf_psf.utils.utils as utils
import tensorflow as tf
Expand Down
1 change: 1 addition & 0 deletions src/wf_psf/psf_models/zernikes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:Author: Tobias Liaudat <[email protected]> and Jennifer Pollack <[email protected]>

"""

import numpy as np
import zernike as zk
import tensorflow as tf
Expand Down
1 change: 1 addition & 0 deletions src/wf_psf/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:Author: Jennifer Pollack <[email protected]>

"""

import argparse
from wf_psf.utils.read_config import read_stream
from wf_psf.utils.io import FileIOHandler
Expand Down
1 change: 1 addition & 0 deletions src/wf_psf/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@


"""

import pytest
from wf_psf.utils.read_config import RecursiveNamespace
from wf_psf.training.train import TrainingParamsHandler
Expand Down
1 change: 1 addition & 0 deletions src/wf_psf/tests/metrics_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:Author: Jennifer Pollack <[email protected]>

"""

import pytest
from wf_psf.utils.read_config import RecursiveNamespace
from wf_psf.training import train
Expand Down
1 change: 1 addition & 0 deletions src/wf_psf/tests/test_utils/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@


"""

import pytest
import os

Expand Down
12 changes: 6 additions & 6 deletions src/wf_psf/training/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,13 @@ def train(

# Save optimisation history in the saving dict
if psf_model.save_optim_history_param:
saving_optim_hist[
"param_cycle{}".format(current_cycle)
] = hist_param.history
saving_optim_hist["param_cycle{}".format(current_cycle)] = (
hist_param.history
)
if psf_model.save_optim_history_nonparam:
saving_optim_hist[
"nonparam_cycle{}".format(current_cycle)
] = hist_non_param.history
saving_optim_hist["nonparam_cycle{}".format(current_cycle)] = (
hist_non_param.history
)

# Save last cycle if no cycles were saved
if not training_handler.multi_cycle_params.save_all_cycles:
Expand Down
7 changes: 4 additions & 3 deletions src/wf_psf/utils/configs_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:Authors: Jennifer Pollack <[email protected]>

"""

import numpy as np
from wf_psf.utils.read_config import read_conf
from wf_psf.data.training_preprocessing import TrainingDataHandler, TestDataHandler
Expand Down Expand Up @@ -412,9 +413,9 @@ def call_plot_config_handler_run(self, model_metrics):
)

# Update metrics_confs dict with latest result
plots_config_handler.metrics_confs[
self._file_handler.workdir
] = self.metrics_conf
plots_config_handler.metrics_confs[self._file_handler.workdir] = (
self.metrics_conf
)

# Update metric results dict with latest result
plots_config_handler.list_of_metrics_dict[self._file_handler.workdir] = [
Expand Down
Loading