-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch nix recipe to flake #992
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
082ff33
switch nix recipe to flake
wd15 f146fe4
fix notebook output to be consistent
wd15 cb76051
update github ci to use flake
wd15 9976f4c
update nix installation instructions
wd15 7a3ca8c
Ping the CI
guyer 7f7e8c0
clean up white space issues
wd15 355e905
Merge remote-tracking branch 'origin/nix' into nix
wd15 d96d292
fix spelling
wd15 f16a509
Merge branch 'master' into nix
tkphd e1b72cd
Revert Viewer() call to make tests happier
tkphd c702ab8
nbval: erase Viewer address
tkphd 80779c3
nbval: resolve deprecation warning
tkphd 10c6430
Merge branch 'master' into nix
wd15 ad528e6
build(nix): ensure "nix build .#fipy" works
wd15 5075e14
add nix environment logging
wd15 ce22702
Merge remote-tracking branch 'origin/nix' into nix
wd15 b3c0f4a
Make all environment elements work same way
guyer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"; | ||
tkphd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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; | ||
} | ||
)); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arguably, this should just return
json.loads(stdout)
, rather than nesting it in a dict.conda_info()
is a little different because it collects the results of bothconda info
andconda env export
. One option is that each of these routines should return a dict containing one or more info["???_info"] and then havefipy.__init__.py
call_fipy_environment.update(environment.???_info())
on each of them.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll let you decide on that.