Skip to content

Commit e52a7ae

Browse files
committed
Remove forced gpu test
(tigre is not set up yet)
2 parents 279d63a + 4fad7a1 commit e52a7ae

File tree

3 files changed

+217
-1
lines changed

3 files changed

+217
-1
lines changed

.github/workflows/build_uv.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: "Install Project"
4545
run: uv sync --dev --all-extras
4646
- name: test
47-
run: CIL_DATA_DIR=./Wrappers/Python/data TESTS_FORCE_GPU=1 uv run --dev python -m unittest discover -v -k tigre -k TIGRE -k astra -k ASTRA -k gpu -k GPU ./Wrappers/Python/test
47+
run: CIL_DATA_DIR=./Wrappers/Python/data uv run --dev python -m unittest discover -v -k tigre -k TIGRE -k astra -k ASTRA -k gpu -k GPU ./Wrappers/Python/test
4848
test:
4949
defaults: {run: {shell: 'bash -el {0}'}}
5050
runs-on: ubuntu-22.04

flake.lock

Lines changed: 99 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
{
2+
description = "A very basic flake";
3+
4+
inputs = {
5+
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
6+
pyproject-nix = {
7+
url = "github:nix-community/pyproject.nix";
8+
inputs.nixpkgs.follows = "nixpkgs";
9+
};
10+
pyproject-build-systems = {
11+
url = "github:pyproject-nix/build-system-pkgs";
12+
inputs.pyproject-nix.follows = "pyproject-nix";
13+
inputs.uv2nix.follows = "uv2nix";
14+
inputs.nixpkgs.follows = "nixpkgs";
15+
};
16+
uv2nix = {
17+
url = "github:adisbladis/uv2nix";
18+
inputs.pyproject-nix.follows = "pyproject-nix";
19+
inputs.nixpkgs.follows = "nixpkgs";
20+
};
21+
};
22+
23+
outputs = { self, nixpkgs, pyproject-nix, pyproject-build-systems, uv2nix }:
24+
let
25+
system = "x86_64-linux";
26+
inherit (nixpkgs) lib;
27+
pkgs = import nixpkgs
28+
{
29+
inherit system;
30+
};
31+
32+
hacks = pkgs.callPackage pyproject-nix.build.hacks {};
33+
34+
workspace = uv2nix.lib.workspace.loadWorkspace { workspaceRoot = ./.; };
35+
overlay = workspace.mkPyprojectOverlay {
36+
sourcePreference = "wheel";
37+
};
38+
python = pkgs.python313Full;
39+
40+
41+
42+
matplotlib = python.pkgs.matplotlib.override { enableQt = true; enableTk = true; };
43+
44+
45+
pythonSet = (pkgs.callPackage pyproject-nix.build.packages {
46+
inherit python;
47+
}).overrideScope
48+
(
49+
lib.composeManyExtensions [
50+
pyproject-build-systems.overlays.default
51+
overlay
52+
]
53+
);
54+
in
55+
{
56+
packages.x86_64-linux.default = pythonSet.mkVirtualEnv "cil-env" workspace.deps.default;
57+
packages.x86_64-linux.xcat-cli = pythonSet.cil;
58+
devShells.${system} = {
59+
#default = pkgs.mkShell {
60+
#packages = with pkgs; [
61+
#bacon
62+
#fenix.packages.${system}.stable.toolchain
63+
#python311Full
64+
#uv
65+
#];
66+
#UV_PYTHON = "${pkgs.python311Full}";
67+
#};
68+
impure = pkgs.mkShell {
69+
packages = [
70+
python
71+
pkgs.uv
72+
pkgs.pkg-config
73+
pkgs.stdenv.cc.cc.lib
74+
pkgs.cmake
75+
];
76+
shellHook = ''
77+
unset PYTHONPATH
78+
'';
79+
};
80+
default =
81+
let
82+
# Create an overlay enabling editable mode for all local dependencies.
83+
editableOverlay = workspace.mkEditablePyprojectOverlay {
84+
# Use environment variable
85+
root = "$REPO_ROOT";
86+
# Optional: Only enable editable for these packages
87+
# members = [ "hello-world" ];
88+
};
89+
overrides = _final: _prev: {
90+
};
91+
92+
# Override previous set with our overrideable overlay.
93+
editablePythonSet = pythonSet.overrideScope (lib.composeExtensions editableOverlay overrides);
94+
95+
# Build virtual environment, with local packages being editable.
96+
#
97+
# Enable all optional dependencies for development.
98+
virtualenv = editablePythonSet.mkVirtualEnv "CIL-dev-env" workspace.deps.all;
99+
100+
in
101+
pkgs.mkShell {
102+
packages = [
103+
virtualenv
104+
pkgs.uv
105+
];
106+
shellHook = ''
107+
# Undo dependency propagation by nixpkgs.
108+
unset PYTHONPATH
109+
# Get repository root using git. This is expanded at runtime by the editable `.pth` machinery.
110+
export REPO_ROOT=$(git rev-parse --show-toplevel)
111+
'';
112+
};
113+
};
114+
115+
116+
};
117+
}

0 commit comments

Comments
 (0)