Skip to content

Commit

Permalink
Merge pull request #131 from naik-aakash/reduce_test_splits
Browse files Browse the repository at this point in the history
Reduce number of test splits
  • Loading branch information
JaGeo authored Aug 1, 2023
2 parents 693e29c + a6909ee commit 24025ef
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
split: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] # Number of splits
split: [1, 2, 3, 4, 5] # Number of splits

steps:
- uses: actions/checkout@v3
Expand All @@ -39,8 +39,10 @@ jobs:
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest and coverage
# run this locally to update tests durations
# pytest --cov=lobsterpy --cov-append --splits 1 --group 1 --durations-path ./lobsterpy/TestData/.pytest-split-durations --store-durations
run: |
pytest --cov=lobsterpy --cov-append --splits 10 --group ${{ matrix.split }} --durations-path ./lobsterpy/.pytest-split-durations
pytest --cov=lobsterpy --cov-append --splits 5 --group ${{ matrix.split }} --durations-path ./lobsterpy/TestData/.pytest-split-durations
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
Expand Down
62 changes: 62 additions & 0 deletions lobsterpy/TestData/.pytest-split-durations
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"lobsterpy/cohp/test/test_analyze.py::TestAnalyse::test_ICOHP_sum_CdF": 74.60168297588825,
"lobsterpy/cohp/test/test_analyze.py::TestAnalyse::test_ICOHP_sum_NaCl": 70.55211293883622,
"lobsterpy/cohp/test/test_analyze.py::TestAnalyse::test_all_attributes_BaTiO3": 71.29058763198555,
"lobsterpy/cohp/test/test_analyze.py::TestAnalyse::test_all_attributes_CdF": 72.19752324093133,
"lobsterpy/cohp/test/test_analyze.py::TestAnalyse::test_all_attributes_K3Sb": 72.58499348722398,
"lobsterpy/cohp/test/test_analyze.py::TestAnalyse::test_all_attributes_K3Sb_all": 72.2198564982973,
"lobsterpy/cohp/test/test_analyze.py::TestAnalyse::test_all_attributes_NaCl_Mulliken": 70.49185390630737,
"lobsterpy/cohp/test/test_analyze.py::TestAnalyse::test_all_attributes_NaCl_all": 66.83933831006289,
"lobsterpy/cohp/test/test_analyze.py::TestAnalyse::test_all_attributes_NaCl_nan": 64.23106821579859,
"lobsterpy/cohp/test/test_analyze.py::TestAnalyse::test_all_attributes_NaCl_valences": 66.02353994967416,
"lobsterpy/cohp/test/test_analyze.py::TestAnalyse::test_all_attributes_NaSbF6": 67.69128251960501,
"lobsterpy/cohp/test/test_analyze.py::TestAnalyse::test_all_attributes_NaSbF6_anbd": 77.39906527288258,
"lobsterpy/cohp/test/test_analyze.py::TestAnalyse::test_exception": 74.9940577801317,
"lobsterpy/cohp/test/test_analyze.py::TestAnalyse::test_final_dicts": 71.91315609263256,
"lobsterpy/cohp/test/test_describe.py::TestDescribe::test_coordination_environment_to_text": 60.532792599871755,
"lobsterpy/cohp/test/test_describe.py::TestDescribe::test_plot": 88.35905195400119,
"lobsterpy/cohp/test/test_describe.py::TestDescribe::test_text": 58.00953777041286,
"lobsterpy/cohp/test/test_describe.py::TestDescribe::test_write_description": 62.47553640883416,
"lobsterpy/plotting/test/test_plotting.py::InteractiveCohpPlotterTest::test_add_all_relevant_cohps_K3Sb": 48.36465826490894,
"lobsterpy/plotting/test/test_plotting.py::InteractiveCohpPlotterTest::test_add_all_relevant_cohps_NaCl": 14.395964342169464,
"lobsterpy/plotting/test/test_plotting.py::InteractiveCohpPlotterTest::test_add_cohps_by_lobster_label_NaCl": 14.143686045892537,
"lobsterpy/plotting/test/test_plotting.py::InteractiveCohpPlotterTest::test_add_cohps_from_plot_data": 14.694280326366425,
"lobsterpy/plotting/test/test_plotting.py::InteractiveCohpPlotterTest::test_add_cohps_from_plot_data_json": 18.901866920292377,
"lobsterpy/plotting/test/test_plotting.py::InteractiveCohpPlotterTest::test_plot_colors": 50.03976339753717,
"lobsterpy/plotting/test/test_plotting.py::InteractiveCohpPlotterTest::test_plot_labels": 14.167344754561782,
"lobsterpy/plotting/test/test_plotting.py::TestPlotterExceptions::test_plotter_exception": 0.0038974578492343426,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_errors[args0-IndexError]": 0.19080257462337613,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_errors[args1-IndexError]": 0.20083071431145072,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_errors[args2-IndexError]": 0.22901855362579226,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_interactive_plotter": 0.9448978300206363,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args0]": 1.3463104199618101,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args10]": 0.37567619839683175,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args11]": 0.49541555624455214,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args12]": 0.3643593993037939,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args13]": 0.3989682081155479,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args14]": 0.3308272184804082,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args15]": 0.6352701694704592,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args16]": 1.414562267716974,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args17]": 0.6187749514356256,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args18]": 0.45203554816544056,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args1]": 1.277391605079174,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args2]": 1.110627113841474,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args3]": 0.8713983865454793,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args4]": 0.7319109700620174,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args5]": 0.9687392474152148,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args6]": 0.9414747003465891,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args7]": 0.48369616316631436,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args8]": 0.5601856517605484,
"lobsterpy/test/test_cli.py::TestCLI::test_cli_results[args9]": 0.37080864515155554,
"lobsterpy/test/test_cli.py::TestCLI::test_generate_ref_data": 0.004219974856823683,
"lobsterpy/test/test_cli.py::TestCLI::test_gz_cli_plot": 3.995695054065436,
"lobsterpy/test/test_cli.py::TestCLI::test_gz_file_cli": 14.55165875563398,
"lobsterpy/test/test_cli.py::TestCLI::test_gz_file_cli_lobsterinput_generation": 0.01727287331596017,
"lobsterpy/test/test_cli.py::TestCLI::test_hideplot_cli": 3.988109601661563,
"lobsterpy/test/test_cli.py::TestCLI::test_iaplot_saved": 0.8917648741044104,
"lobsterpy/test/test_cli.py::TestCLI::test_json_saved": 1.117712059058249,
"lobsterpy/test/test_cli.py::TestCLI::test_lobsterin_generation": 0.979003781452775,
"lobsterpy/test/test_cli.py::TestCLI::test_lobsterin_generation_error": 0.9563554651103914,
"lobsterpy/test/test_cli.py::TestCLI::test_lobsterin_generation_error_userbasis": 0.01105657871812582,
"lobsterpy/test/test_cli.py::TestCLI::test_plot_saved": 0.9114251169376075
}

0 comments on commit 24025ef

Please sign in to comment.