From 6fa339862307bc871abd80983db4c817672a0061 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Tue, 11 Feb 2025 21:14:31 +0800 Subject: [PATCH 1/2] python313Packages.aocd-example-parser: 2023.12.20 -> 2024.12.25 --- .../aocd-example-parser/default.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/aocd-example-parser/default.nix b/pkgs/development/python-modules/aocd-example-parser/default.nix index a78e66980bcd..3914a8c492f1 100644 --- a/pkgs/development/python-modules/aocd-example-parser/default.nix +++ b/pkgs/development/python-modules/aocd-example-parser/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "aocd-example-parser"; - version = "2023.12.20"; + version = "2024.12.25"; pyproject = true; disabled = pythonOlder "3.9"; @@ -16,21 +16,18 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "wimglenn"; repo = "aocd-example-parser"; - rev = "07330183f3e43401444fe17b08d72eb6168504e1"; - hash = "sha256-iOxqzZj29aY/xyigir1KOU6GcBBvnlxEOBLHChEQjf4="; + rev = "c86bfc714d2f413965a46a2caf3483e823ea9ade"; + hash = "sha256-1Le1jrLCFRJcUngoq5bt22gM1lpAMBNBRWjOl3yLlsw="; }; - nativeBuildInputs = [ flit-core ]; + build-system = [ flit-core ]; # Circular dependency with aocd - # pythonImportsCheck = [ - # "aocd_example_parser" - # ]; - meta = with lib; { + meta = { description = "Default implementation of an example parser plugin for advent-of-code-data"; homepage = "https://github.com/wimglenn/aocd-example-parser"; - license = licenses.mit; - maintainers = with maintainers; [ fab ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; }; } From 320ebb3f96579dfa5bf2a8c8400d98016d94faf7 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Tue, 11 Feb 2025 21:16:23 +0800 Subject: [PATCH 2/2] python313Packages.aocd: fix build --- .../python-modules/aocd/default.nix | 53 ++++--------------- 1 file changed, 10 insertions(+), 43 deletions(-) diff --git a/pkgs/development/python-modules/aocd/default.nix b/pkgs/development/python-modules/aocd/default.nix index 88aa990fb644..d8a5ffd3cc30 100644 --- a/pkgs/development/python-modules/aocd/default.nix +++ b/pkgs/development/python-modules/aocd/default.nix @@ -9,6 +9,7 @@ pook, pytest-freezegun, pytest-mock, + pytest-cov-stub, pytest-raisin, pytest-socket, pytestCheckHook, @@ -36,9 +37,9 @@ buildPythonPackage rec { hash = "sha256-xR9CfyOUsKSSA/1zYi6kCK3oAaX6Kd625mKMWI+ZFMA="; }; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ aocd-example-parser beautifulsoup4 pebble @@ -57,56 +58,22 @@ buildPythonPackage rec { pytest-raisin pytest-socket pytestCheckHook + pytest-cov-stub requests-mock ]; - # Too many failing tests - preCheck = "rm pytest.ini"; - - disabledTests = [ - "test_results" - "test_results_xmas" - "test_run_error" - "test_run_and_autosubmit" - "test_run_and_no_autosubmit" - "test_load_input_from_file" - "test_examples_cache" # IndexError: list index out of range - "test_example_partial" # ValueError: not enough values to unpack (expected 1, got 0) - "test_run_against_examples" # AssertionError: assert '2022/25 - The Puzzle Title' in '' - "test_aocd_no_examples" # SystemExit: 2 - "test_aocd_examples" # SystemExit: 2 - "test_aoce" # SystemExit: 1 - - # TypeError: sequence item 0: expected str instance, bool found - # Likely because they use `pook.get` to get a webpage - "test_submit_prevents_bad_guesses_too_high" - "test_submit_prevents_bad_guesses_too_low" - "test_submit_prevents_bad_guesses_known_incorrect" - "test_submit_correct_answer" - "test_correct_submit_reopens_browser_on_answer_page" - "test_server_error" - "test_submit_when_already_solved" - "test_submitted_too_recently_autoretry" - "test_submitted_too_recently_autoretry_quiet" - "test_submit_when_submitted_too_recently_no_autoretry" - "test_submit_wrong_answer " - "test_correct_submit_records_good_answer" - "test_submits_for_partb_when_already_submitted_parta" - "test_submit_when_parta_solved_but_answer_unsaved" - "test_submit_saves_both_answers_if_possible" - "test_submit_puts_level1_by_default" - "test_cannot_submit_same_bad_answer_twice" - "test_submit_float_warns" + pytestFlagsArray = [ + "tests/" ]; pythonImportsCheck = [ "aocd" ]; - meta = with lib; { + meta = { description = "Get your Advent of Code data with a single import statement"; homepage = "https://github.com/wimglenn/advent-of-code-data"; changelog = "https://github.com/wimglenn/advent-of-code-data/releases/tag/${src.tag}"; - license = licenses.mit; - maintainers = with maintainers; [ aadibajpai ]; - platforms = platforms.unix; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ aadibajpai ]; + platforms = lib.platforms.unix; }; }