From 6d72c5103994eb4bdd2d6b7f207548029a3bbdec Mon Sep 17 00:00:00 2001 From: Raphael Shirley Date: Sat, 6 Apr 2024 00:37:10 +0200 Subject: [PATCH] Ruff autofix run to make trivial changes to let it pass --- docs/notebooks/Building_list_of_onesources.ipynb | 4 ++-- docs/notebooks/Example_SED_manipulation.ipynb | 2 +- docs/notebooks/Example_full_run.ipynb | 4 ++-- docs/notebooks/Example_of_usage_of_magSvc.ipynb | 2 +- .../Testing_fit_of_one_object_of_the_catalogue.ipynb | 4 ++-- src/lephare/data_manager.py | 1 - src/lephare/data_retrieval.py | 1 - tests/lephare/test_data_manager.py | 3 +-- 8 files changed, 9 insertions(+), 12 deletions(-) diff --git a/docs/notebooks/Building_list_of_onesources.ipynb b/docs/notebooks/Building_list_of_onesources.ipynb index 4ac2ec60..25a8c2ea 100644 --- a/docs/notebooks/Building_list_of_onesources.ipynb +++ b/docs/notebooks/Building_list_of_onesources.ipynb @@ -32,7 +32,7 @@ "source": [ "config_file = \"./data/COSMOS.para\"\n", "keymap = lp.read_config(config_file)\n", - "lp.data_retrieval.get_auxiliary_data(keymap=keymap,additional_files=[\"examples/COSMOS.in\"])" + "lp.data_retrieval.get_auxiliary_data(keymap=keymap, additional_files=[\"examples/COSMOS.in\"])" ] }, { @@ -62,7 +62,7 @@ "metadata": {}, "outputs": [], "source": [ - "#before running PhotoZ we must run sedtolib and maggal\n", + "# before running PhotoZ we must run sedtolib and maggal\n", "sedlib = lp.Sedtolib(config_keymap=keymap)\n", "sedlib.run(typ=\"STAR\", star_sed=\"$LEPHAREDIR/sed/STAR/STAR_MOD_ALL.list\")\n", "sedlib.run(typ=\"QSO\", qso_sed=\"$LEPHAREDIR/sed/QSO/SALVATO09/AGN_MOD.list\", gal_lib=\"LIB_QSO\")\n", diff --git a/docs/notebooks/Example_SED_manipulation.ipynb b/docs/notebooks/Example_SED_manipulation.ipynb index d4c22d19..4ab028ca 100644 --- a/docs/notebooks/Example_SED_manipulation.ipynb +++ b/docs/notebooks/Example_SED_manipulation.ipynb @@ -25,7 +25,7 @@ "source": [ "config_file = \"./data/COSMOS.para\"\n", "keymap = lp.read_config(config_file)\n", - "#Get the auxiliary files required.\n", + "# Get the auxiliary files required.\n", "lp.data_retrieval.get_auxiliary_data(keymap=keymap)" ] }, diff --git a/docs/notebooks/Example_full_run.ipynb b/docs/notebooks/Example_full_run.ipynb index a711101e..8b78b83c 100644 --- a/docs/notebooks/Example_full_run.ipynb +++ b/docs/notebooks/Example_full_run.ipynb @@ -52,8 +52,8 @@ "source": [ "config_file = \"./data/COSMOS.para\"\n", "keymap = lp.read_config(config_file)\n", - "#Get the auxiliary files required.\n", - "lp.data_retrieval.get_auxiliary_data(keymap=keymap,additional_files=[\"examples/COSMOS.in\"])" + "# Get the auxiliary files required.\n", + "lp.data_retrieval.get_auxiliary_data(keymap=keymap, additional_files=[\"examples/COSMOS.in\"])" ] }, { diff --git a/docs/notebooks/Example_of_usage_of_magSvc.ipynb b/docs/notebooks/Example_of_usage_of_magSvc.ipynb index 17b48ffd..4b3ae075 100644 --- a/docs/notebooks/Example_of_usage_of_magSvc.ipynb +++ b/docs/notebooks/Example_of_usage_of_magSvc.ipynb @@ -33,7 +33,7 @@ "source": [ "config_file = \"./data/COSMOS.para\"\n", "keymap = lp.read_config(config_file)\n", - "#Get the auxiliary files required.\n", + "# Get the auxiliary files required.\n", "lp.data_retrieval.get_auxiliary_data(keymap=keymap)" ] }, diff --git a/docs/notebooks/Testing_fit_of_one_object_of_the_catalogue.ipynb b/docs/notebooks/Testing_fit_of_one_object_of_the_catalogue.ipynb index a0d0a258..af0ab372 100644 --- a/docs/notebooks/Testing_fit_of_one_object_of_the_catalogue.ipynb +++ b/docs/notebooks/Testing_fit_of_one_object_of_the_catalogue.ipynb @@ -32,8 +32,8 @@ "source": [ "config_file = \"./data/COSMOS.para\"\n", "keymap = lp.read_config(config_file)\n", - "#Get the auxiliary files required.\n", - "lp.data_retrieval.get_auxiliary_data(keymap=keymap,additional_files=[\"examples/COSMOS.in\"])" + "# Get the auxiliary files required.\n", + "lp.data_retrieval.get_auxiliary_data(keymap=keymap, additional_files=[\"examples/COSMOS.in\"])" ] }, { diff --git a/src/lephare/data_manager.py b/src/lephare/data_manager.py index 9f0600dd..448a1894 100644 --- a/src/lephare/data_manager.py +++ b/src/lephare/data_manager.py @@ -2,7 +2,6 @@ import os from platformdirs import user_cache_dir -import warnings class DataManager: diff --git a/src/lephare/data_retrieval.py b/src/lephare/data_retrieval.py index bd44f2d8..981eee16 100644 --- a/src/lephare/data_retrieval.py +++ b/src/lephare/data_retrieval.py @@ -399,4 +399,3 @@ def get_auxiliary_data(lephare_dir=LEPHAREDIR, keymap=None, additional_files=Non if additional_files is not None: file_list += additional_files download_all_files(retriever, file_list, ignore_registry=False) - diff --git a/tests/lephare/test_data_manager.py b/tests/lephare/test_data_manager.py index 6ae76335..3b233ec7 100644 --- a/tests/lephare/test_data_manager.py +++ b/tests/lephare/test_data_manager.py @@ -3,9 +3,8 @@ import time import pytest -from platformdirs import user_cache_dir - from lephare import data_manager as dm +from platformdirs import user_cache_dir def test_data_manager_default_directories(unset_env_vars):