Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / aocd / default.nix
blob1b56736028b89c756c310ef5d1db4bc8c0609a9d
1 { lib
2 , stdenv
3 , aocd-example-parser
4 , beautifulsoup4
5 , buildPythonPackage
6 , fetchFromGitHub
7 , numpy
8 , pebble
9 , pook
10 , pytest-freezegun
11 , pytest-mock
12 , pytest-raisin
13 , pytest-socket
14 , pytestCheckHook
15 , python-dateutil
16 , pythonOlder
17 , requests
18 , requests-mock
19 , rich
20 , setuptools
21 , termcolor
22 , tzlocal
25 buildPythonPackage rec {
26   pname = "aocd";
27   version = "2.0.1";
28   pyproject = true;
30   disabled = pythonOlder "3.9";
32   src = fetchFromGitHub {
33     owner = "wimglenn";
34     repo = "advent-of-code-data";
35     rev = "refs/tags/v${version}";
36     hash = "sha256-YZvcR97uHceloqwoP+azaBmj3GLusYNbItLIaeJ3QD0=";
37   };
39   nativeBuildInputs = [
40     setuptools
41   ];
43   propagatedBuildInputs = [
44     aocd-example-parser
45     beautifulsoup4
46     pebble
47     python-dateutil
48     requests
49     rich # for example parser aoce. must either be here or checkInputs
50     termcolor
51     tzlocal
52   ];
54   nativeCheckInputs = [
55     numpy
56     pook
57     pytest-freezegun
58     pytest-mock
59     pytest-raisin
60     pytest-socket
61     pytestCheckHook
62     requests-mock
63   ];
65   # Too many failing tests
66   preCheck = "rm pytest.ini";
68   disabledTests = [
69     "test_results"
70     "test_results_xmas"
71     "test_run_error"
72     "test_run_and_autosubmit"
73     "test_run_and_no_autosubmit"
74     "test_load_input_from_file"
75     "test_examples_cache" # IndexError: list index out of range
76     "test_example_partial" # ValueError: not enough values to unpack (expected 1, got 0)
77     "test_run_against_examples" # AssertionError: assert '2022/25 - The Puzzle Title' in ''
78     "test_aocd_no_examples" # SystemExit: 2
79     "test_aocd_examples" # SystemExit: 2
80     "test_aoce" # SystemExit: 1
82     # TypeError: sequence item 0: expected str instance, bool found
83     # Likely because they use `pook.get` to get a webpage
84     "test_submit_prevents_bad_guesses_too_high"
85     "test_submit_prevents_bad_guesses_too_low"
86     "test_submit_prevents_bad_guesses_known_incorrect"
87     "test_submit_correct_answer"
88     "test_correct_submit_reopens_browser_on_answer_page"
89     "test_server_error"
90     "test_submit_when_already_solved"
91     "test_submitted_too_recently_autoretry"
92     "test_submitted_too_recently_autoretry_quiet"
93     "test_submit_when_submitted_too_recently_no_autoretry"
94     "test_submit_wrong_answer "
95     "test_correct_submit_records_good_answer"
96     "test_submits_for_partb_when_already_submitted_parta"
97     "test_submit_when_parta_solved_but_answer_unsaved"
98     "test_submit_saves_both_answers_if_possible"
99     "test_submit_puts_level1_by_default"
100     "test_cannot_submit_same_bad_answer_twice"
101     "test_submit_float_warns"
102   ];
104   pythonImportsCheck = [
105     "aocd"
106   ];
108   meta = with lib; {
109     description = "Get your Advent of Code data with a single import statement";
110     homepage = "https://github.com/wimglenn/advent-of-code-data";
111     changelog = "https://github.com/wimglenn/advent-of-code-data/releases/tag/v${version}";
112     license = licenses.mit;
113     maintainers = with maintainers; [ aadibajpai ];
114     platforms = platforms.unix;
115   };