-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevenv.nix
72 lines (63 loc) · 1.41 KB
/
devenv.nix
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
{
pkgs,
lib,
config,
inputs,
...
}:
let
pkgs-unstable = import inputs.nixpkgs-unstable { system = pkgs.stdenv.system; };
in
{
packages = [
pkgs.git
pkgs.bash
pkgs.python312Packages.setuptools
];
languages.python.enable = true;
languages.python.uv.enable = true;
languages.python.uv.package = pkgs-unstable.python312Packages.uv;
languages.python.uv.sync.enable = true;
languages.python.uv.sync.allExtras = true;
languages.python.venv.enable = true;
languages.python.version = "3.12";
git-hooks.hooks = {
shellcheck.enable = true;
ruff.enable = true;
ruff-format.enable = true;
typos.enable = true;
yamllint.enable = true;
yamlfmt.enable = true;
yamlfmt.settings.lint-only = false;
check-toml.enable = true;
commitizen.enable = true;
nixfmt-rfc-style.enable = true;
mdformat.enable = true;
mdformat.package = pkgs.mdformat.withPlugins (
ps: with ps; [
mdformat-frontmatter
]
);
markdownlint.enable = true;
};
scripts.format.exec = ''
yamlfmt .
markdownlint --fix .
pre-commit run --all-files
'';
scripts.test-all.exec = ''
pytest -s -vv "$@"
'';
enterTest = ''
test-all
'';
scripts.build.exec = ''
uv build
'';
scripts.sample-pipeline-run.exec = ''
python airtable_pipeline.py
'';
scripts.sample-pipeline-show.exec = ''
dlt pipeline airtable_pipeline show
'';
}