diff --git a/.gitignore b/.gitignore index 8426060..dbddd62 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ -# pip-compile output -requirements.txt - # Generated documentation files doc/sphinx/generated_doc/* doc/sphinx/_doc_build/* diff --git a/impurityModel/ed/get_spectra_using_CF.py b/impurityModel/ed/get_spectra_using_CF.py index 3028546..757171d 100644 --- a/impurityModel/ed/get_spectra_using_CF.py +++ b/impurityModel/ed/get_spectra_using_CF.py @@ -601,16 +601,16 @@ def read_h0_CF_file(h0_CF_filename): with open(h0_CF_filename, "r") as file_handle: parameters = json.loads(file_handle.read()) # Default values are for Ni in NiO. - e_imp = parameters["e_imp"] if "e_imp" in parameters else -1.31796 - e_deltaO_imp = parameters["e_deltaO_imp"] if "e_deltaO_imp" in parameters else 0.60422 - e_val_eg = parameters["e_val_eg"] if "e_val_eg" in parameters else -4.4 - e_val_t2g = parameters["e_val_t2g"] if "e_val_t2g" in parameters else -6.5 - e_con_eg = parameters["e_con_eg"] if "e_con_eg" in parameters else 3 - e_con_t2g = parameters["e_con_t2g"] if "e_con_t2g" in parameters else 2 - v_val_eg = parameters["v_val_eg"] if "v_val_eg" in parameters else 1.883 - v_val_t2g = parameters["v_val_t2g"] if "v_val_t2g" in parameters else 1.395 - v_con_eg = parameters["v_con_eg"] if "v_con_eg" in parameters else 0.6 - v_con_t2g = parameters["v_con_t2g"] if "v_con_t2g" in parameters else 0.4 + e_imp = parameters.get("e_imp", -1.31796) + e_deltaO_imp = parameters.get("e_deltaO_imp", 0.60422) + e_val_eg = parameters.get("e_val_eg", -4.4) + e_val_t2g = parameters.get("e_val_t2g", -6.5) + e_con_eg = parameters.get("e_con_eg", 3) + e_con_t2g = parameters.get("e_con_t2g", 2) + v_val_eg = parameters.get("v_val_eg", 1.883) + v_val_t2g = parameters.get("v_val_t2g", 1.395) + v_con_eg = parameters.get("v_con_eg", 0.6) + v_con_t2g = parameters.get("v_con_t2g", 0.4) return ( e_imp, e_deltaO_imp, diff --git a/impurityModel/ed/product_state_representation.py b/impurityModel/ed/product_state_representation.py index 626554d..ed4d399 100644 --- a/impurityModel/ed/product_state_representation.py +++ b/impurityModel/ed/product_state_representation.py @@ -29,7 +29,6 @@ """ - from bitarray import bitarray diff --git a/impurityModel/ed/remove.py b/impurityModel/ed/remove.py index 99b701f..013edd7 100644 --- a/impurityModel/ed/remove.py +++ b/impurityModel/ed/remove.py @@ -8,7 +8,6 @@ """ - from bisect import bisect_left # Local imports diff --git a/impurityModel/test/test_comparison_with_reference.py b/impurityModel/test/test_comparison_with_reference.py index 4b1c1a4..d916144 100644 --- a/impurityModel/test/test_comparison_with_reference.py +++ b/impurityModel/test/test_comparison_with_reference.py @@ -2,7 +2,6 @@ Module with test comparing new simulations with reference data. """ - import inspect import math import os diff --git a/impurityModel/test/test_product_state_representation.py b/impurityModel/test/test_product_state_representation.py index 81e40b3..7106bb3 100644 --- a/impurityModel/test/test_product_state_representation.py +++ b/impurityModel/test/test_product_state_representation.py @@ -2,7 +2,6 @@ Module with tests of functions in product_state_representation.py. """ - from bitarray import bitarray # Local diff --git a/install_setup.sh b/install_setup.sh index 4e7d084..6b396df 100755 --- a/install_setup.sh +++ b/install_setup.sh @@ -43,5 +43,5 @@ python3 -m venv ~/envED . ~/envED/bin/activate # Install required python libraries. -pip install --disable-pip-version-check -q -U uv==0.1.6 +pip install --disable-pip-version-check -q -U uv==0.1.21 uv pip install -q -r requirements.in diff --git a/pyproject.toml b/pyproject.toml index bc2af8f..97c100e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,6 @@ line-length = 120 [tool.ruff] line-length = 120 -select = ["E", "F", "B", "C4", "PL", "A", "SIM", "RUF", "PGH", "I"] +lint.select = ["E", "F", "B", "C4", "PL", "A", "SIM", "RUF", "PGH", "I"] -ignore = ["B905", "PLR2004", "PLR0911", "PLR0912", "PLR0913", "PLR0915", "SIM105","RUF005", "PGH003", "C408", "SIM118", "E741", "PLR5501"] +lint.ignore = ["B905", "PLR2004", "PLR0911", "PLR0912", "PLR0913", "PLR0915", "SIM105","RUF005", "PGH003", "C408", "SIM118", "E741", "PLR5501"] diff --git a/pytest.ini b/pytest.ini index 996b8bc..50ba5d9 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,2 +1,6 @@ [pytest] testpaths = impurityModel + + +filterwarnings = + error diff --git a/requirements.in b/requirements.in index e298389..71126e9 100644 --- a/requirements.in +++ b/requirements.in @@ -1,17 +1,17 @@ # Needed python packages -bitarray==2.8.0 -black==23.7.0 -h5py==3.9.0 -matplotlib==3.7.2 -mpi4py==3.1.4 -numpy==1.24.4 -numpydoc==1.5.0 -pytest==7.4.0 +bitarray==2.9.2 +black==24.3.0 +h5py==3.10.0 +matplotlib==3.8.3 +mpi4py==3.1.5 +numpy==1.26.4 +numpydoc==1.6.0 +pytest==8.1.1 sympy==1.12 -scipy==1.10.1 -sphinx==6.2.1 -sphinx-rtd-theme==1.2.2 -mypy==1.4.1 -sphinx-autodoc-typehints==1.23.0 -ruff==0.0.282 -typeguard==4.1.0 +scipy==1.12.0 +sphinx==7.2.6 +sphinx-rtd-theme==2.0.0 +mypy==1.9.0 +sphinx-autodoc-typehints==2.0.0 +ruff==0.3.3 +typeguard==4.1.5