summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/dynaconf/default.nix
blob: eaa43423ad3b0bcdd2484cd8dc18418f85e38025 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  ansible-core,
  boto3,
  commentjson,
  configobj,
  django,
  django-debug-toolbar,
  flask,
  hvac,
  ipython,
  pytest-cov-stub,
  pytest-mock,
  pytest-xdist,
  pytestCheckHook,
  python-dotenv,
  radon,
  toml,
  tox,
  versionCheckHook,
}:

buildPythonPackage rec {
  pname = "dynaconf";
  version = "3.2.12";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "dynaconf";
    repo = "dynaconf";
    tag = version;
    hash = "sha256-DtZ4rJ425a7ootpWtMXbezyH215dJwW4HTzvGgAUnsc=";
  };

  build-system = [ setuptools ];

  dependencies = [ ansible-core ];

  nativeCheckInputs = [
    boto3
    commentjson
    configobj
    django
    django-debug-toolbar
    flask
    hvac
    ipython
    pytest-cov-stub
    pytest-mock
    pytest-xdist
    pytestCheckHook
    python-dotenv
    radon
    toml
    tox
    versionCheckHook
  ];

  disabledTests = [
    # AssertionError: assert 42.1 == 'From development env'
    "test_envless_load_file"
  ];

  disabledTestPaths = [
    # import file mismatch
    # imported module 'app_test' has this __file__ attribute:
    # /build/source/tests_functional/issues/1005-key-type-error/app_test.py
    # which is not the same as the test file we want to collect:
    # /build/source/tests_functional/issues/994_validate_on_update_fix/app_test.py
    "tests_functional/django_pytest_pure/app/tests"
    "tests_functional/issues/575_603_666_690__envvar_with_template_substitution/app_test.py"
    "tests_functional/issues/658_nested_envvar_override/app_test.py"
    "tests_functional/issues/835_926_enable-merge-equal-false/app_test.py"
    "tests_functional/issues/994_validate_on_update_fix/app_test.py"
    "tests_functional/pytest_example/app/tests"
    "tests_functional/pytest_example/flask/tests"
    # flask.cli.NoAppException: Failed to find Flask application or factory in module 'app'
    # Use 'app:name' to specify one
    "tests/test_cli.py"
    # sqlite3.OperationalError: no such table: auth_user
    "tests_functional/django_pytest/app/tests/test_app.py::test_admin_user"
    # unable connect port
    "tests/test_redis.py"
    # need docker
    "tests/test_vault.py"
  ];

  # django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG
  # but settings are not configured
  env.DJANGO_SETTINGS_MODULE = "project.settings";

  pythonImportsCheck = [ "dynaconf" ];

  meta = {
    description = "Dynamic configurator for Python Project";
    homepage = "https://github.com/dynaconf/dynaconf";
    changelog = "https://github.com/dynaconf/dynaconf/blob/${src.tag}/CHANGELOG.md";
    mainProgram = "dynaconf";
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}