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

[pre-commit.ci] pre-commit autoupdate #216

Open
wants to merge 2 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
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -12,12 +12,12 @@ repos:
- id: check-ast
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.8.4
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/psf/black
rev: 24.3.0
rev: 24.10.0
hooks:
- id: black
language_version: python3
Expand All @@ -27,18 +27,18 @@ repos:
- id: blackdoc
additional_dependencies: ["black[jupyter]"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.1.0"
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
types_or: [yaml, html, css, scss, javascript, json] # markdown to avoid conflicts with mdformat
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
types_or: [python, markdown, rst]
additional_dependencies: [tomli]
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
rev: v3.19.1
hooks:
- id: pyupgrade
- repo: https://github.com/MarcoGorelli/madforhooks
Expand All @@ -47,18 +47,18 @@ repos:
# - id: conda-env-sorter # conflicts with prettier
- id: check-execution-order
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
rev: 0.7.21
hooks:
- id: mdformat
additional_dependencies: [mdformat-gfm, mdformat-black]
exclude: ^.github/ # this avoid the hook to wrongly reformats md issue template files
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
rev: 0.8.1
hooks:
- id: nbstripout
args: [--keep-output]
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
rev: 1.9.1
hooks:
- id: nbqa-black
- id: nbqa-ruff
Expand Down
4 changes: 2 additions & 2 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ The following people have made contributions to this project:
- [Alexis Berne](https://people.epfl.ch/alexis.berne?lang=en) - EPFL
- [Gionata Ghiggi (ghiggi)](https://github.com/ghiggi) - EPFL
- [Jacopo Grazioli (jacgraz)](https://github.com/jacgraz) - EPFL
- [Saverio Guzzo (saveriogzz)](https://github.com/saveriogzz) - TU DELFT
- [Saverio Guzzo (saveriogzz)](https://github.com/saveriogzz) - TU DELFT
- [Kim Candolfi (KimCandolfi)](https://github.com/KimCandolfi) - EPFL
- [Régis Longchamp (regislon)](https://github.com/regislon) - EPFL
- [Son Pham-Ba (sphamba)](https://github.com/sphamba) - EPFL
- [Charlotte Gisèle Weil (charlottegiseleweil)](https://github.com/charlottegiseleweil) - EPFL
- [Charlotte Gisèle Weil (charlottegiseleweil)](https://github.com/charlottegiseleweil) - EPFL
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
\[INSERT CONTACT METHOD\].
[INSERT CONTACT METHOD].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ we highly recommend to join the [**DISDRODB Slack Workspace**](https://join.slac
Feel free to also open a [GitHub Issue](https://github.com/ltelab/disdrodb/issues) or a
[GitHub Discussion](https://github.com/ltelab/disdrodb/discussions) specific to your questions or ideas.

## ✍️ Contributors
## ✍️ Contributors

- [Gionata Ghiggi](https://people.epfl.ch/gionata.ghiggi)
- [Kim Candolfi](https://github.com/KimCandolfi)
Expand All @@ -137,7 +137,7 @@ Feel free to also open a [GitHub Issue](https://github.com/ltelab/disdrodb/issue

You can cite the DISDRODB software by:

> Gionata Ghiggi, Kim Candolfi, Régis Longchamp, Charlotte Weil, Alexis Berne (2023). ltelab/disdrodb Zenodo. https://doi.org/10.5281/zenodo.7680581
> Gionata Ghiggi, Kim Candolfi, Régis Longchamp, Charlotte Weil, Alexis Berne (2023). ltelab/disdrodb Zenodo. https://doi.org/10.5281/zenodo.7680581
If you want to cite a specific version, have a look at the [Zenodo site](https://doi.org/10.5281/zenodo.7680581)

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ backported more regularly.
| Version | Supported |
| -------------- | ------------------ |
| 0.x.x (latest) | :white_check_mark: |
| \< 0.0.17 | :x: |
| < 0.0.17 | :x: |

## Unsafe YAML Loading

Expand Down
10 changes: 5 additions & 5 deletions disdrodb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
)

__all__ = [
"define_configs",
"available_stations",
"available_campaigns",
"available_data_sources",
"available_sensor_names",
"available_stations",
"check_archive_metadata_compliance",
"check_archive_metadata_geolocation",
"define_configs",
"download_archive",
"download_station",
"open_documentation",
"open_sensor_documentation",
"open_documentation",
"open_sensor_documentation",
"read_station_metadata",
"download_archive",
"download_station",
]

__root_path__ = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
Expand Down
2 changes: 1 addition & 1 deletion disdrodb/metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from disdrodb.metadata.reader import read_station_metadata
from disdrodb.metadata.search import get_list_metadata

__all__ = ["read_station_metadata", "get_list_metadata", "get_archive_metadata_key_value"]
__all__ = ["get_archive_metadata_key_value", "get_list_metadata", "read_station_metadata"]
4 changes: 2 additions & 2 deletions disdrodb/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ def create_fake_raw_data_file(
return str(filepath)


@pytest.fixture()
def create_test_config_files(request): # noqa PT004
@pytest.fixture
def create_test_config_files(request):
"""Create the specified config files into a temporary "test" directory.
This fixture facilitates the creation of configuration files from provided dictionaries.
Expand Down
4 changes: 2 additions & 2 deletions disdrodb/tests/test_api/test_api_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@
# valid_filepath = VALID_FNAME


@pytest.fixture()
@pytest.fixture
def valid_filepath(tmp_path):
# Create a valid filepath for testing
filepath = tmp_path / VALID_FNAME
filepath.write_text("content does not matter")
return str(filepath)


@pytest.fixture()
@pytest.fixture
def invalid_filepath(tmp_path):
# Create an invalid filepath for testing
filepath = tmp_path / INVALID_FNAME
Expand Down
6 changes: 3 additions & 3 deletions disdrodb/tests/test_l0/test_l0b_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def test__convert_object_variables_to_string():
assert ds["b"].dtype == "float"


@pytest.fixture()
@pytest.fixture
def encoding_dict_1():
# create a test encoding dictionary
return {
Expand All @@ -484,7 +484,7 @@ def encoding_dict_1():
}


@pytest.fixture()
@pytest.fixture
def encoding_dict_2():
# create a test encoding dictionary
return {
Expand All @@ -494,7 +494,7 @@ def encoding_dict_2():
}


@pytest.fixture()
@pytest.fixture
def ds():
# create a test xr.Dataset
data = {
Expand Down
2 changes: 1 addition & 1 deletion disdrodb/tests/test_metadata/test_metadata_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def test_check_archive_metadata_geolocation(tmp_path, latlon_value, platform_typ
metadata_dict=metadata_dict,
)
is_valid = check_archive_metadata_geolocation(base_dir)
if platform_type == "mobile" and latlon_value == -9999 or platform_type != "mobile" and latlon_value == 0:
if (platform_type == "mobile" and latlon_value == -9999) or (platform_type != "mobile" and latlon_value == 0):
assert is_valid
else:
assert not is_valid
Expand Down
4 changes: 2 additions & 2 deletions disdrodb/tests/test_utils/test_utils_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_define_summary_log_when_no_problems(tmp_path):
assert not os.path.exists(problem_log_path)


@pytest.fixture()
@pytest.fixture
def test_logger():
logger = logging.getLogger("test_logger")
logger.setLevel(logging.DEBUG) # Capture all log levels
Expand Down Expand Up @@ -155,7 +155,7 @@ def test_log_error(caplog, test_logger, capfd):
assert " - Error message" in out


@pytest.fixture()
@pytest.fixture
def log_environment(tmp_path):
processed_dir = tmp_path / "processed"
os.makedirs(processed_dir, exist_ok=True)
Expand Down
2 changes: 0 additions & 2 deletions docs/source/tutorials/.gitkeep
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@


4 changes: 2 additions & 2 deletions tutorials/reader_preparation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@
"df_raw = read_raw_file(filepath, column_names=None, reader_kwargs=reader_kwargs)\n",
"# Print the dataframe\n",
"print(f\"Dataframe for the file {os.path.basename(filepath)} :\")\n",
"display(df_raw) # noqa F821"
"display(df_raw)"
]
},
{
Expand Down Expand Up @@ -2432,7 +2432,7 @@
" verbose=verbose,\n",
" df_sanitizer_fun=df_sanitizer_fun,\n",
")\n",
"display(df) # noqa F821"
"display(df)"
]
},
{
Expand Down
Loading