-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* switch nix recipe to flake * fix notebook output to be consistent Changes required as running the notebook live and running notebook with nbval resulted in different outputs. * update github ci to use flake * update nix installation instructions * add nix environment logging --------- Co-authored-by: Jonathan Guyer <guyer@nist.gov> Co-authored-by: Trevor Keller <trevor.keller@nist.gov>
- Loading branch information
1 parent
3ae5bee
commit 8cd1eb4
Showing
9 changed files
with
198 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
[regex] | ||
[regex1] | ||
regex: <Figure size [0-9]{3,4}x[0-9]{3,4}(?:.[0-9])? with [0-9]{1,3} Axes> | ||
replace: <Figure size> | ||
|
||
[regex2] | ||
regex: <fipy.viewers.matplotlibViewer.matplotlib2DGridViewer.Matplotlib2DGridViewer at .{1,}> | ||
replace: <fipy.viewers.matplotlibViewer.matplotlib2DGridViewer.Matplotlib2DGridViewer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
description = "Python environment for fipy"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; | ||
utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, utils}: (utils.lib.eachSystem ["x86_64-linux" "x86_64-darwin" ] (system: | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
pypkgs = pkgs.python310Packages; | ||
|
||
env = (pypkgs.fipy.overridePythonAttrs (old: rec { | ||
|
||
src = pkgs.lib.cleanSource ./.; | ||
|
||
nativeBuildInputs = with pypkgs; [ | ||
pip | ||
pkgs.openssh | ||
nbval | ||
ipython | ||
ipykernel | ||
jupyterlab | ||
traitlets | ||
notebook | ||
] ++ propagatedBuildInputs; | ||
|
||
propagatedBuildInputs = old.propagatedBuildInputs; | ||
|
||
postShellHook = '' | ||
SOURCE_DATE_EPOCH=$(date +%s) | ||
export PYTHONUSERBASE=$PWD/.local | ||
export USER_SITE=`python -c "import site; print(site.USER_SITE)"` | ||
export PYTHONPATH=$PYTHONPATH:$USER_SITE:$(pwd) | ||
export PATH=$PATH:$PYTHONUSERBASE/bin | ||
export OMPI_MCA_plm_rsh_agent=${pkgs.openssh}/bin/ssh | ||
''; | ||
})); | ||
in | ||
rec { | ||
packages.fipy = env; | ||
packages.default = self.packages.${system}.fipy; | ||
devShells.default = env; | ||
} | ||
)); | ||
} |