Skip to content

Commit 568a363

Browse files
authored
fix: fix errors when running pre-commit run --all-files & unify mypy testing (queens-py#225)
1 parent 65e8089 commit 568a363

File tree

4 files changed

+15
-32
lines changed

4 files changed

+15
-32
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ If there's anyone you think should be looped in on this pull request,
1717
feel free to @mention them here!
1818
-->
1919

20-
> Note: More information on the merge request procedure in QUEENS can be found in the [*Submit a pull request*](../CONTRIBUTING.md#5-submit-a-pull-request) section in the [CONTRIBUTING.md](../CONTRIBUTING.md) file.
20+
> Note: More information on the merge request procedure in QUEENS can be found in the [*Submit a pull request*](../CONTRIBUTING.md#5-submit-a-pull-request) section in the [CONTRIBUTING.md](../CONTRIBUTING.md) file.

.pre-commit-config.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,12 @@ repos:
9595
pass_filenames: true
9696
# Delete modules once type hinting has been introduced there
9797
exclude: |
98-
(?x)^(
99-
^docs/|
100-
^tests/|
101-
^test_utils/|
102-
^src/example_simulator_functions/|
103-
^src/queens_interfaces/|
98+
(?x)(
99+
^(.gitlab|.github|config|doc|tests|test_utils)/|
100+
^src/(example_simulator_functions|queens_interfaces)/|
104101
^src/queens/(data_processors|distributions|drivers|iterators|models|parameters)/|
105102
^src/queens/(schedulers|stochastic_optimizers|variational_distributions|visualization)/|
106-
^src/queens/main.py|
107-
^src/queens/global_settings.py
103+
^src/queens/(main.py|global_settings.py)
108104
).*$
109105
- repo: https://github.com/kynan/nbstripout
110106
rev: 0.8.1

doc/source/faq/directories.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## What is the Output Directory in QUEENS?
22

3-
The output directory, commonly referred to as `output_dir`, is a designated space where all results from iterators are stored. You must specify this directory within the `GlobalSettings` object.
3+
The output directory, commonly referred to as `output_dir`, is a designated space where all results from iterators are stored. You must specify this directory within the `GlobalSettings` object.
44

55
> **Note:** This directory does **not** include the outputs from model simulations, such as simulation data. While this distinction might seem confusing at first, remember that analysis outputs are consistently stored locally, whereas model outputs can reside on remote machines. For more information, consult *[Where are my simulations?](#where-are-my-simulations)* and *[How is the output of a simulation model structured?](#how-is-the-output-of-a-simulation-model-structured)*.
66
@@ -44,4 +44,4 @@ Here’s a breakdown of each component:
4444
- `metadata.yaml`: Provides metadata from the simulation run, detailing timings, inputs, outputs, and additional information.
4545
- `output`: Includes the actual output files generated by the solver, including the log file created by QUEENS.
4646

47-
The specific `job_dir` is assigned by a scheduler. For more details, refer to *[Where are my simulations?](#where-are-my-simulations)*.
47+
The specific `job_dir` is assigned by a scheduler. For more details, refer to *[Where are my simulations?](#where-are-my-simulations)*.

pyproject.toml

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -164,27 +164,14 @@ disallow_untyped_calls = false # Change to true once all functions are typed
164164
disallow_untyped_decorators = true
165165
disallow_untyped_defs = true
166166
ignore_missing_imports = true
167-
exclude = [
168-
"config/",
169-
"doc/",
170-
"tests/",
171-
# Delete the following line by line once type hinting has been introduced in the respective module
172-
"test_utils/",
173-
"src/example_simulator_functions/",
174-
"src/queens_interfaces/",
175-
"src/queens/data_processors/",
176-
"src/queens/distributions/",
177-
"src/queens/drivers/",
178-
"src/queens/iterators/",
179-
"src/queens/models/",
180-
"src/queens/parameters/",
181-
"src/queens/schedulers/",
182-
"src/queens/stochastic_optimizers/",
183-
"src/queens/variational_distributions/",
184-
"src/queens/visualization/",
185-
"src/queens/main.py",
186-
"src/queens/global_settings.py",
187-
]
167+
# Delete modules once type hinting has been introduced there
168+
exclude = '''(?x)(
169+
^(.gitlab|.github|config|doc|tests|test_utils)/|
170+
^src/(example_simulator_functions|queens_interfaces)/|
171+
^src/queens/(data_processors|distributions|drivers|iterators|models|parameters)/|
172+
^src/queens/(schedulers|stochastic_optimizers|variational_distributions|visualization)/|
173+
^src/queens/(main.py|global_settings.py)
174+
).*$'''
188175
[[tool.mypy.overrides]]
189176
module = ["yaml"]
190177
follow_untyped_imports = true

0 commit comments

Comments
 (0)