ttaenc: init at 3.4.1 (#238757)
[NixPkgs.git] / pkgs / development / python-modules / aocd / default.nix
blobb9fe52c10b857492cf801d41b9c54270da1b7f5a
2   lib,
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 = [ setuptools ];
41   propagatedBuildInputs = [
42     aocd-example-parser
43     beautifulsoup4
44     pebble
45     python-dateutil
46     requests
47     rich # for example parser aoce. must either be here or checkInputs
48     termcolor
49     tzlocal
50   ];
52   nativeCheckInputs = [
53     numpy
54     pook
55     pytest-freezegun
56     pytest-mock
57     pytest-raisin
58     pytest-socket
59     pytestCheckHook
60     requests-mock
61   ];
63   # Too many failing tests
64   preCheck = "rm pytest.ini";
66   disabledTests = [
67     "test_results"
68     "test_results_xmas"
69     "test_run_error"
70     "test_run_and_autosubmit"
71     "test_run_and_no_autosubmit"
72     "test_load_input_from_file"
73     "test_examples_cache" # IndexError: list index out of range
74     "test_example_partial" # ValueError: not enough values to unpack (expected 1, got 0)
75     "test_run_against_examples" # AssertionError: assert '2022/25 - The Puzzle Title' in ''
76     "test_aocd_no_examples" # SystemExit: 2
77     "test_aocd_examples" # SystemExit: 2
78     "test_aoce" # SystemExit: 1
80     # TypeError: sequence item 0: expected str instance, bool found
81     # Likely because they use `pook.get` to get a webpage
82     "test_submit_prevents_bad_guesses_too_high"
83     "test_submit_prevents_bad_guesses_too_low"
84     "test_submit_prevents_bad_guesses_known_incorrect"
85     "test_submit_correct_answer"
86     "test_correct_submit_reopens_browser_on_answer_page"
87     "test_server_error"
88     "test_submit_when_already_solved"
89     "test_submitted_too_recently_autoretry"
90     "test_submitted_too_recently_autoretry_quiet"
91     "test_submit_when_submitted_too_recently_no_autoretry"
92     "test_submit_wrong_answer "
93     "test_correct_submit_records_good_answer"
94     "test_submits_for_partb_when_already_submitted_parta"
95     "test_submit_when_parta_solved_but_answer_unsaved"
96     "test_submit_saves_both_answers_if_possible"
97     "test_submit_puts_level1_by_default"
98     "test_cannot_submit_same_bad_answer_twice"
99     "test_submit_float_warns"
100   ];
102   pythonImportsCheck = [ "aocd" ];
104   meta = with lib; {
105     description = "Get your Advent of Code data with a single import statement";
106     homepage = "https://github.com/wimglenn/advent-of-code-data";
107     changelog = "https://github.com/wimglenn/advent-of-code-data/releases/tag/v${version}";
108     license = licenses.mit;
109     maintainers = with maintainers; [ aadibajpai ];
110     platforms = platforms.unix;
111   };