diff --git a/CONDA_REVISION b/CONDA_REVISION new file mode 100644 index 0000000..d43cb88 --- /dev/null +++ b/CONDA_REVISION @@ -0,0 +1 @@ +03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 diff --git a/conda-solver-tests/basic.yaml b/conda-solver-tests/basic.yaml index f477e06..ef85461 100644 --- a/conda-solver-tests/basic.yaml +++ b/conda-solver-tests/basic.yaml @@ -1,7 +1,10 @@ tests: - name: solve_1_1 id: B001 - provenance: tests/core/test_solve.py::test_solve_1::1 + provenance: + node_id: tests/core/test_solve.py::test_solve_1::1 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L58-L124 kind: solve input: channels: channel-1 @@ -19,7 +22,10 @@ tests: - name: solve_1_2 id: B002 - provenance: tests/core/test_solve.py::test_solve_1::2 + provenance: + node_id: tests/core/test_solve.py::test_solve_1::2 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L58-L124 kind: solve input: channels: channel-1 @@ -49,7 +55,10 @@ tests: - name: test_iopro_mkl id: B003 - provenance: conda/testing/solver_helpers.py::SolverTests.test_iopro_mkl + provenance: + node_id: conda/testing/solver_helpers.py::SolverTests.test_iopro_mkl + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/conda/testing/solver_helpers.py#L244-L259 kind: solve input: channels: channel-1 @@ -75,7 +84,10 @@ tests: - name: test_anaconda_nomkl id: B004 - provenance: conda/testing/solver_helpers.py::SolverTests.test_anaconda_nomkl + provenance: + node_id: conda/testing/solver_helpers.py::SolverTests.test_anaconda_nomkl + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/conda/testing/solver_helpers.py#L310-L314 kind: solve input: channels: channel-1 @@ -195,7 +207,10 @@ tests: - name: test_unsatisfiable_from_channel_1_1 id: B005 - provenance: conda/testing/solver_helpers.py::SolverTests.test_unsat_from_r1::1 + provenance: + node_id: conda/testing/solver_helpers.py::SolverTests.test_unsat_from_r1::1 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/conda/testing/solver_helpers.py#L351-L380 kind: unsatisfiable input: channels: channel-1 @@ -210,7 +225,10 @@ tests: - name: test_unsatisfiable_from_channel_1_2 id: B006 - provenance: conda/testing/solver_helpers.py::SolverTests.test_unsat_from_r1::2 + provenance: + node_id: conda/testing/solver_helpers.py::SolverTests.test_unsat_from_r1::2 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/conda/testing/solver_helpers.py#L351-L380 kind: unsatisfiable input: channels: channel-1 @@ -226,7 +244,10 @@ tests: - name: test_unsatisfiable_from_channel_1_3 id: B007 - provenance: conda/testing/solver_helpers.py::SolverTests.test_unsat_from_r1::3 + provenance: + node_id: conda/testing/solver_helpers.py::SolverTests.test_unsat_from_r1::3 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/conda/testing/solver_helpers.py#L351-L380 kind: unsatisfiable input: channels: channel-1 @@ -240,7 +261,10 @@ tests: - name: test_aggressive_update_packages_1 id: B008 - provenance: tests/core/test_solve.py::test_aggressive_update_packages::1 + provenance: + node_id: tests/core/test_solve.py::test_aggressive_update_packages::1 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1821-L1936 kind: solve input: channels: channel-1 @@ -251,7 +275,10 @@ tests: - name: test_aggressive_update_packages_2 id: B009 - provenance: tests/core/test_solve.py::test_aggressive_update_packages::2 + provenance: + node_id: tests/core/test_solve.py::test_aggressive_update_packages::2 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1821-L1936 kind: solve input: channels: channel-1 @@ -269,7 +296,10 @@ tests: - name: test_aggressive_update_packages_3 id: B010 - provenance: tests/core/test_solve.py::test_aggressive_update_packages::3 + provenance: + node_id: tests/core/test_solve.py::test_aggressive_update_packages::3 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1821-L1936 kind: solve input: channels: channel-1 @@ -286,7 +316,10 @@ tests: - name: test_aggressive_update_packages_4 id: B011 - provenance: tests/core/test_solve.py::test_aggressive_update_packages::4 + provenance: + node_id: tests/core/test_solve.py::test_aggressive_update_packages::4 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1821-L1936 kind: solve input: channels: channel-1 @@ -306,7 +339,10 @@ tests: - name: test_aggressive_update_packages_5 id: B012 - provenance: tests/core/test_solve.py::test_aggressive_update_packages::5 + provenance: + node_id: tests/core/test_solve.py::test_aggressive_update_packages::5 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1821-L1936 kind: solve input: channels: channel-1 @@ -324,7 +360,10 @@ tests: - name: test_aggressive_update_packages_6 id: B013 - provenance: tests/core/test_solve.py::test_aggressive_update_packages::6 + provenance: + node_id: tests/core/test_solve.py::test_aggressive_update_packages::6 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1821-L1936 kind: solve input: channels: channel-1 @@ -341,7 +380,10 @@ tests: - name: test_aggressive_update_packages_7 id: B014 - provenance: tests/core/test_solve.py::test_aggressive_update_packages::7 + provenance: + node_id: tests/core/test_solve.py::test_aggressive_update_packages::7 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1821-L1936 kind: solve input: channels: channel-1 @@ -361,7 +403,10 @@ tests: - name: test_auto_update_conda_1 id: B015 - provenance: tests/core/test_solve.py::test_auto_update_conda::1 + provenance: + node_id: tests/core/test_solve.py::test_auto_update_conda::1 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1600-L1709 kind: solve input: channels: channel-1 @@ -381,7 +426,10 @@ tests: - name: test_auto_update_conda_2 id: B016 - provenance: tests/core/test_solve.py::test_auto_update_conda::2 + provenance: + node_id: tests/core/test_solve.py::test_auto_update_conda::2 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1600-L1709 kind: solve input: channels: channel-1 @@ -416,7 +464,10 @@ tests: - name: test_auto_update_conda_3 id: B017 - provenance: tests/core/test_solve.py::test_auto_update_conda::3 + provenance: + node_id: tests/core/test_solve.py::test_auto_update_conda::3 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1600-L1709 kind: solve input: channels: channel-1 @@ -452,7 +503,10 @@ tests: - name: test_auto_update_conda_4 id: B018 - provenance: tests/core/test_solve.py::test_auto_update_conda::4 + provenance: + node_id: tests/core/test_solve.py::test_auto_update_conda::4 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1600-L1709 kind: solve input: channels: channel-1 @@ -488,7 +542,10 @@ tests: - name: test_conda_downgrade_1 id: B019 - provenance: tests/core/test_solve.py::test_conda_downgrade::1 + provenance: + node_id: tests/core/test_solve.py::test_conda_downgrade::1 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1314-L1530 kind: solve input: channels: @@ -543,7 +600,10 @@ tests: - name: test_conda_downgrade_2 id: B020 - provenance: tests/core/test_solve.py::test_conda_downgrade::2 + provenance: + node_id: tests/core/test_solve.py::test_conda_downgrade::2 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1314-L1530 kind: solve_for_diff input: channels: @@ -603,7 +663,10 @@ tests: - name: test_conda_downgrade_3 id: B021 - provenance: tests/core/test_solve.py::test_conda_downgrade::3 + provenance: + node_id: tests/core/test_solve.py::test_conda_downgrade::3 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1314-L1530 kind: solve_for_diff input: channels: @@ -665,7 +728,10 @@ tests: - name: test_conda_downgrade_4 id: B022 - provenance: tests/core/test_solve.py::test_conda_downgrade::4 + provenance: + node_id: tests/core/test_solve.py::test_conda_downgrade::4 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1314-L1530 kind: solve_for_diff input: channels: @@ -795,7 +861,10 @@ tests: - name: test_channel_priority_churn_minimized_1 id: B023 - provenance: tests/core/test_solve.py::test_channel_priority_churn_minimized::1 + provenance: + node_id: tests/core/test_solve.py::test_channel_priority_churn_minimized::1 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2765-L2803 kind: solve input: channels: @@ -852,7 +921,10 @@ tests: - name: test_channel_priority_churn_minimized_2 id: B024 - provenance: tests/core/test_solve.py::test_channel_priority_churn_minimized::2 + provenance: + node_id: tests/core/test_solve.py::test_channel_priority_churn_minimized::2 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2765-L2803 kind: solve_for_diff input: channels: @@ -916,7 +988,10 @@ tests: - name: test_update_all_1_1 id: B025 - provenance: tests/core/test_solve.py::test_update_all_1::1 + provenance: + node_id: tests/core/test_solve.py::test_update_all_1::1 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1121-L1203 kind: solve input: channels: @@ -938,7 +1013,10 @@ tests: - name: test_update_all_1_2 id: B026 - provenance: tests/core/test_solve.py::test_update_all_1::2 + provenance: + node_id: tests/core/test_solve.py::test_update_all_1::2 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1121-L1203 kind: solve input: channels: @@ -976,7 +1054,10 @@ tests: - name: test_update_all_1_3 id: B027 - provenance: tests/core/test_solve.py::test_update_all_1::3 + provenance: + node_id: tests/core/test_solve.py::test_update_all_1::3 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L1121-L1203 kind: solve input: channels: @@ -1014,7 +1095,10 @@ tests: - name: test_update_deps_1_1 id: B028 - provenance: tests/core/test_solve.py::test_update_deps_1::1 + provenance: + node_id: tests/core/test_solve.py::test_update_deps_1::1 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2049-L2161 kind: solve input: channels: @@ -1033,7 +1117,10 @@ tests: - name: test_update_deps_1_2 id: B029 - provenance: tests/core/test_solve.py::test_update_deps_1::2 + provenance: + node_id: tests/core/test_solve.py::test_update_deps_1::2 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2049-L2161 kind: solve input: channels: @@ -1065,7 +1152,10 @@ tests: - name: test_update_deps_1_3 id: B030 - provenance: tests/core/test_solve.py::test_update_deps_1::3 + provenance: + node_id: tests/core/test_solve.py::test_update_deps_1::3 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2049-L2161 kind: solve input: channels: @@ -1101,7 +1191,10 @@ tests: - name: test_update_deps_1_4 id: B031 - provenance: tests/core/test_solve.py::test_update_deps_1::4 + provenance: + node_id: tests/core/test_solve.py::test_update_deps_1::4 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2049-L2161 kind: solve input: channels: @@ -1138,7 +1231,10 @@ tests: - name: test_update_deps_1_5 id: B032 - provenance: tests/core/test_solve.py::test_update_deps_1::5 + provenance: + node_id: tests/core/test_solve.py::test_update_deps_1::5 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2049-L2161 kind: solve input: channels: @@ -1175,7 +1271,10 @@ tests: - name: test_update_deps_2_1 id: B033 - provenance: tests/core/test_solve.py::test_update_deps_2::1 + provenance: + node_id: tests/core/test_solve.py::test_update_deps_2::1 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2164-L2232 kind: solve input: channels: @@ -1210,7 +1309,10 @@ tests: - name: test_update_deps_2_2 id: B034 - provenance: tests/core/test_solve.py::test_update_deps_2::2 + provenance: + node_id: tests/core/test_solve.py::test_update_deps_2::2 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2164-L2232 kind: solve_for_diff input: channels: @@ -1251,7 +1353,10 @@ tests: - name: test_update_deps_2_3 id: B035 - provenance: tests/core/test_solve.py::test_update_deps_2::3 + provenance: + node_id: tests/core/test_solve.py::test_update_deps_2::3 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2164-L2232 kind: solve_for_diff input: channels: diff --git a/conda-solver-tests/constricting_specs.yaml b/conda-solver-tests/constricting_specs.yaml index ff7528e..447544a 100644 --- a/conda-solver-tests/constricting_specs.yaml +++ b/conda-solver-tests/constricting_specs.yaml @@ -1,7 +1,10 @@ tests: - name: test_determine_constricting_specs_conflicts id: S001 - provenance: tests/core/test_solve.py::test_determine_constricting_specs_conflicts + provenance: + node_id: tests/core/test_solve.py::test_determine_constricting_specs_conflicts + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L3499-L3535 kind: determine_constricting_specs input: channels: channel-1 @@ -41,7 +44,10 @@ tests: - name: test_determine_constricting_specs_conflicts_upperbound id: S002 - provenance: tests/core/test_solve.py::test_determine_constricting_specs_conflicts_upperbound + provenance: + node_id: tests/core/test_solve.py::test_determine_constricting_specs_conflicts_upperbound + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L3538-L3574 kind: determine_constricting_specs input: channels: channel-1 @@ -81,7 +87,10 @@ tests: - name: test_determine_constricting_specs_multi_conflicts id: S003 - provenance: tests/core/test_solve.py::test_determine_constricting_specs_multi_conflicts + provenance: + node_id: tests/core/test_solve.py::test_determine_constricting_specs_multi_conflicts + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L3577-L3628 kind: determine_constricting_specs input: channels: channel-1 @@ -137,7 +146,10 @@ tests: - name: test_determine_constricting_specs_no_conflicts_upperbound_compound_depends id: S004 - provenance: tests/core/test_solve.py::test_determine_constricting_specs_no_conflicts_upperbound_compound_depends + provenance: + node_id: tests/core/test_solve.py::test_determine_constricting_specs_no_conflicts_upperbound_compound_depends + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L3631-L3667 kind: determine_constricting_specs input: channels: channel-1 @@ -175,7 +187,10 @@ tests: - name: test_determine_constricting_specs_no_conflicts_version_star id: S005 - provenance: tests/core/test_solve.py::test_determine_constricting_specs_no_conflicts_version_star + provenance: + node_id: tests/core/test_solve.py::test_determine_constricting_specs_no_conflicts_version_star + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L3670-L3706 kind: determine_constricting_specs input: channels: channel-1 @@ -213,7 +228,10 @@ tests: - name: test_determine_constricting_specs_no_conflicts_free id: S006 - provenance: tests/core/test_solve.py::test_determine_constricting_specs_no_conflicts_free + provenance: + node_id: tests/core/test_solve.py::test_determine_constricting_specs_no_conflicts_free + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L3709-L3731 kind: determine_constricting_specs input: channels: channel-1 @@ -237,7 +255,10 @@ tests: - name: test_determine_constricting_specs_no_conflicts_no_upperbound id: S007 - provenance: tests/core/test_solve.py::test_determine_constricting_specs_no_conflicts_no_upperbound + provenance: + node_id: tests/core/test_solve.py::test_determine_constricting_specs_no_conflicts_no_upperbound + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L3734-L3770 kind: determine_constricting_specs input: channels: channel-1 diff --git a/conda-solver-tests/cuda.yaml b/conda-solver-tests/cuda.yaml index 05b1896..108ef22 100644 --- a/conda-solver-tests/cuda.yaml +++ b/conda-solver-tests/cuda.yaml @@ -1,7 +1,10 @@ tests: - name: test_cuda_1 id: C001 - provenance: tests/core/test_solve.py::test_cuda_1 + provenance: + node_id: tests/core/test_solve.py::test_cuda_1 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L249-L258 kind: solve input: channels: channel-1 @@ -13,7 +16,10 @@ tests: - name: test_cuda_2 id: C002 - provenance: tests/core/test_solve.py::test_cuda_2 + provenance: + node_id: tests/core/test_solve.py::test_cuda_2 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L261-L270 kind: solve input: channels: channel-1 @@ -25,7 +31,10 @@ tests: - name: test_cuda_fail_1 id: C003 - provenance: tests/core/test_solve.py::test_cuda_fail_1 + provenance: + node_id: tests/core/test_solve.py::test_cuda_fail_1 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L273-L306 kind: unsatisfiable input: channels: channel-1 @@ -37,7 +46,10 @@ tests: - name: test_cuda_fail_2 id: C004 - provenance: tests/core/test_solve.py::test_cuda_fail_2 + provenance: + node_id: tests/core/test_solve.py::test_cuda_fail_2 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L309-L341 kind: unsatisfiable input: channels: channel-1 @@ -49,7 +61,10 @@ tests: - name: test_cuda_constrain_absent id: C005 - provenance: tests/core/test_solve.py::test_cuda_constrain_absent + provenance: + node_id: tests/core/test_solve.py::test_cuda_constrain_absent + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L344-L353 kind: solve input: channels: channel-1 @@ -61,7 +76,10 @@ tests: - name: test_cuda_glibc_sat id: C006 - provenance: tests/core/test_solve.py::test_cuda_glibc_sat + provenance: + node_id: tests/core/test_solve.py::test_cuda_glibc_sat + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L391-L401 kind: solve input: channels: channel-1 diff --git a/conda-solver-tests/integration.yaml b/conda-solver-tests/integration.yaml index dd2e34e..e7e5290 100644 --- a/conda-solver-tests/integration.yaml +++ b/conda-solver-tests/integration.yaml @@ -1,7 +1,10 @@ tests: - name: pinned_1_1 id: I001 - provenance: tests/core/test_solve.py::test_pinned_1::1 + provenance: + node_id: tests/core/test_solve.py::test_pinned_1::1 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2356-L2603 kind: solve input: channels: channel-1 @@ -15,7 +18,10 @@ tests: - name: pinned_1_2 id: I002 - provenance: tests/core/test_solve.py::test_pinned_1::2 + provenance: + node_id: tests/core/test_solve.py::test_pinned_1::2 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2356-L2603 kind: solve input: channels: channel-1 @@ -38,7 +44,10 @@ tests: - name: pinned_1_3 id: I003 - provenance: tests/core/test_solve.py::test_pinned_1::3 + provenance: + node_id: tests/core/test_solve.py::test_pinned_1::3 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2356-L2603 kind: solve input: channels: channel-1 @@ -61,7 +70,10 @@ tests: - name: pinned_1_4 id: I004 - provenance: tests/core/test_solve.py::test_pinned_1::4 + provenance: + node_id: tests/core/test_solve.py::test_pinned_1::4 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2356-L2603 kind: unsatisfiable input: channels: channel-1 @@ -81,7 +93,10 @@ tests: - name: pinned_1_5 id: I005 - provenance: tests/core/test_solve.py::test_pinned_1::5 + provenance: + node_id: tests/core/test_solve.py::test_pinned_1::5 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2356-L2603 kind: solve input: channels: channel-1 @@ -117,7 +132,10 @@ tests: - name: pinned_1_6 id: I006 - provenance: tests/core/test_solve.py::test_pinned_1::6 + provenance: + node_id: tests/core/test_solve.py::test_pinned_1::6 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2356-L2603 kind: solve input: channels: channel-1 @@ -160,7 +178,10 @@ tests: - name: pinned_1_7 id: I007 - provenance: tests/core/test_solve.py::test_pinned_1::7 + provenance: + node_id: tests/core/test_solve.py::test_pinned_1::7 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2356-L2603 kind: solve input: channels: channel-1 @@ -203,7 +224,10 @@ tests: - name: pinned_1_8 id: I008 - provenance: tests/core/test_solve.py::test_pinned_1::8 + provenance: + node_id: tests/core/test_solve.py::test_pinned_1::8 + commit: 03329e0f4a627c9b9aa92ef34f7f93b9aa83e438 + url: https://github.com/conda/conda/blob/03329e0f4a627c9b9aa92ef34f7f93b9aa83e438/tests/core/test_solve.py#L2356-L2603 kind: solve input: channels: channel-1 diff --git a/pixi.toml b/pixi.toml index 1f03d42..a61fa87 100644 --- a/pixi.toml +++ b/pixi.toml @@ -7,6 +7,14 @@ pytest = ">=6.2.0" python = ">=3.12" typer = ">=0.15.1,<0.16" +[pypi-dependencies] +pytest-conda-solvers = {path = ".", editable = true} + +[tasks] +generate-schema = "python -m pytest_conda_solvers.cli" +test-classic-solver = "pytest --conda-solver=classic conda-solver-tests tests/test_provenance.py" +test-libmamba-solver = "pytest --conda-solver=libmamba conda-solver-tests tests/test_provenance.py" + [workspace] authors = ["conda contributors"] channels = ["conda-forge"] @@ -16,11 +24,3 @@ license-file = "LICENSE" name = "pytest-conda-solvers" platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"] readme = "README.md" - -[pypi-dependencies] -pytest-conda-solvers = {path = ".", editable = true} - -[tasks] -generate-schema = "python -m pytest_conda_solvers.cli" -test-classic-solver = "pytest --conda-solver=classic conda-solver-tests" -test-libmamba-solver = "pytest --conda-solver=libmamba conda-solver-tests" diff --git a/pytest_conda_solvers/models.py b/pytest_conda_solvers/models.py index 31eacac..d46ab76 100644 --- a/pytest_conda_solvers/models.py +++ b/pytest_conda_solvers/models.py @@ -138,6 +138,16 @@ class SpecsConfigurationConflictTestError( ) +class Provenance( + Struct, + frozen=True, + forbid_unknown_fields=True, +): + node_id: str + commit: str + url: str + + class SolveTestSpec( Struct, tag_field="kind", @@ -147,7 +157,7 @@ class SolveTestSpec( ): name: str id: str - provenance: str + provenance: Provenance input: TestInput output: TestOutput test_function: str = "test_solve" @@ -162,7 +172,7 @@ class SolveForDiffTestSpec( ): name: str id: str - provenance: str + provenance: Provenance input: TestInput output: DiffTestOutput test_function: str = "test_solve_for_diff" @@ -204,7 +214,7 @@ class DetermineConstrictingSpecsTestSpec( ): name: str id: str - provenance: str + provenance: Provenance input: TestInput output: DeterminingConstrictingSpecsTestOutput test_function: str = "test_determine_constricting_specs" @@ -219,7 +229,7 @@ class UnsatisfiableTestSpec( ): name: str id: str - provenance: str + provenance: Provenance input: TestInput error: TestError test_function: str = "test_unsatisfiable" diff --git a/tests/test_provenance.py b/tests/test_provenance.py new file mode 100644 index 0000000..c07fcf0 --- /dev/null +++ b/tests/test_provenance.py @@ -0,0 +1,201 @@ +""" +This are some meta-tests to validate provenance entries in our YAML test files. + +Here is a list of what we check: +- URL contains the correct commit SHA, +- URL file path matches the node_id file path, +- URL has a valid #L{start}-L{end} line range fragment, +- That there are no duplicate test IDs or names across all YAML files +- That the referenced source file exists at the given commit on GitHub (TODO: uses networking capabilities, could be cached more or perhaps we can drop it for simplicity later) +- That the line range in the URL matches the test function boundaries +""" + +import ast +import re +import urllib.request +from pathlib import Path + +import msgspec +import pytest + +from pytest_conda_solvers.models import TestModule as _TestModule + +REPO_ROOT = Path(__file__).parent.parent +YAML_DIR = REPO_ROOT / "conda-solver-tests" +CONDA_REVISION = (REPO_ROOT / "CONDA_REVISION").read_text().strip() + +URL_PATTERN = re.compile( + r"^https://github\.com/(?P[^/]+)/(?P[^/]+)/blob/" + r"(?P[0-9a-f]+)/(?P[^#]+)" + r"(?:#L(?P\d+)-L(?P\d+))?$" +) + + +def _load_all_tests(): + for yaml_path in sorted(YAML_DIR.glob("*.yaml")): + data = yaml_path.read_text(encoding="utf-8") + module = msgspec.yaml.decode(data, type=_TestModule) + for test in module.tests: + yield yaml_path.name, test + + +ALL_TESTS = list(_load_all_tests()) + + +@pytest.fixture(params=ALL_TESTS, ids=[f"{f}::{t.id}" for f, t in ALL_TESTS]) +def test_entry(request): + return request.param + + +# Cache {(commit, filepath): source_text} +_source_cache: dict[tuple[str, str], str] = {} +# Cache {(commit, filepath): {func_name: (start, end)}} +_ast_cache: dict[tuple[str, str], dict[str, tuple[int, int]]] = {} + + +def _fetch_source(commit: str, filepath: str) -> str: + key = (commit, filepath) + if key not in _source_cache: + url = f"https://raw.githubusercontent.com/conda/conda/{commit}/{filepath}" + with urllib.request.urlopen(url) as resp: + _source_cache[key] = resp.read().decode("utf-8") + return _source_cache[key] + + +def _get_function_lines(commit: str, filepath: str) -> dict[str, tuple[int, int]]: + key = (commit, filepath) + if key not in _ast_cache: + source = _fetch_source(commit, filepath) + tree = ast.parse(source) + funcs = {} + for node in ast.walk(tree): + if isinstance(node, ast.ClassDef): + for item in node.body: + if isinstance(item, (ast.FunctionDef, ast.AsyncFunctionDef)): + funcs[f"{node.name}.{item.name}"] = ( + item.lineno, + item.end_lineno, + ) + if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)): + funcs[node.name] = (node.lineno, node.end_lineno) + _ast_cache[key] = funcs + return _ast_cache[key] + + +# --------------------------------------------------------------------------- +# Formatting and consistency checks +# --------------------------------------------------------------------------- + + +class TestProvenanceFormat: + def test_commit_matches_conda_commit(self, test_entry): + """The provenance commit must match the SHA in the CONDA_REVISION file.""" + _, test = test_entry + assert test.provenance.commit == CONDA_REVISION, ( + f"Commit {test.provenance.commit} does not match " + f"CONDA_REVISION {CONDA_REVISION}" + ) + + def test_url_contains_commit(self, test_entry): + """The URL must embed the same commit SHA as the provenance.commit field.""" + _, test = test_entry + assert test.provenance.commit in test.provenance.url, ( + f"Commit {test.provenance.commit} not found in URL {test.provenance.url}" + ) + + def test_url_file_path_matches_node_id(self, test_entry): + """The file path in the URL must match the file path in node_id (before ::).""" + _, test = test_entry + node_file = test.provenance.node_id.split("::")[0] + m = URL_PATTERN.match(test.provenance.url) + assert m, f"URL does not match expected pattern: {test.provenance.url}" + assert m.group("path") == node_file, ( + f"URL path {m.group('path')!r} != node_id path {node_file!r}" + ) + + def test_url_has_line_range(self, test_entry): + _, test = test_entry + m = URL_PATTERN.match(test.provenance.url) + assert m, f"URL does not match expected pattern: {test.provenance.url}" + assert m.group("start") and m.group("end"), ( + f"URL missing line range fragment: {test.provenance.url}" + ) + start, end = int(m.group("start")), int(m.group("end")) + assert start < end, f"Line range L{start}-L{end} is invalid (start >= end)" + + def test_url_format_is_github_blob(self, test_entry): + """The URL must be a valid GitHub blob permalink with full SHA.""" + _, test = test_entry + m = URL_PATTERN.match(test.provenance.url) + assert m, ( + f"URL does not match expected GitHub blob pattern: {test.provenance.url}" + ) + assert len(m.group("commit")) == 40, ( + f"Commit in URL should be a full 40-char SHA, got {m.group('commit')!r}" + ) + + +class TestProvenanceUniqueness: + def test_no_duplicate_ids(self): + """Every test ID must be unique across all YAML files.""" + seen = {} + for yaml_file, test in ALL_TESTS: + key = test.id + assert key not in seen, ( + f"Duplicate test ID {key!r}: first in {seen[key]}, also in {yaml_file}" + ) + seen[key] = yaml_file + + def test_no_duplicate_names(self): + """Every test name must be unique across all YAML files.""" + seen = {} + for yaml_file, test in ALL_TESTS: + key = test.name + assert key not in seen, ( + f"Duplicate test name {key!r}: " + f"first in {seen[key]}, also in {yaml_file}" + ) + seen[key] = yaml_file + + +# --------------------------------------------------------------------------- +# Source validation +# --------------------------------------------------------------------------- + + +class TestProvenanceSource: + def test_source_file_exists(self, test_entry): + """The source file at the given commit must be fetchable from GitHub.""" + _, test = test_entry + filepath = test.provenance.node_id.split("::")[0] + try: + source = _fetch_source(test.provenance.commit, filepath) + except Exception as exc: + pytest.fail( + f"Cannot fetch {filepath} at commit {test.provenance.commit}: {exc}" + ) + assert len(source) > 0 + + def test_line_range_matches_function(self, test_entry): + """The URL line range must match the AST-derived boundaries.""" + _, test = test_entry + parts = test.provenance.node_id.split("::") + filepath = parts[0] + func_name = parts[1] + + func_lines = _get_function_lines(test.provenance.commit, filepath) + if func_name not in func_lines: + pytest.fail( + f"Function {func_name!r} not found in {filepath} " + f"at commit {test.provenance.commit}" + ) + + expected_start, expected_end = func_lines[func_name] + m = URL_PATTERN.match(test.provenance.url) + actual_start, actual_end = int(m.group("start")), int(m.group("end")) # type: ignore + + assert (actual_start, actual_end) == (expected_start, expected_end), ( + f"Line range mismatch for {func_name}: " + f"URL has L{actual_start}-L{actual_end}, " + f"AST says L{expected_start}-L{expected_end}" + )