Skip to content
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 17 commits into from Feb 22, 2024
Merged

switch nix recipe to flake #992

merged 17 commits into from Feb 22, 2024

Conversation

wd15
Copy link
Contributor

@wd15 wd15 commented Jan 10, 2024

Update the Nix recipe as Nix test previously failing.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Changes required as running the notebook live and running notebook
with nbval resulted in different outputs.
@wd15
Copy link
Contributor Author

wd15 commented Jan 10, 2024

Where is the documentation if the PR is from a fork?

@guyer
Copy link
Member

guyer commented Jan 19, 2024

Where is the documentation if the PR is from a fork?

In an artifact of the build, but not hosted anywhere

Copy link
Contributor

@tkphd tkphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Azure stalled, probably when @wd15 closed and reopened this PR. Attempting to rerun the CI says:

```
Encountered error(s) while parsing pipeline YAML:
Could not get the latest source version for repository usnistgov/fipy hosted on https://github.com/ using ref refs/pull/993/merge. GitHub reported the error, "No commit found for SHA: refs/pull/993/merge"
```

Hopefully this commit will trigger a fresh build.
docs/source/NIX-README.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@tkphd tkphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All tests passed!

@wd15 wd15 requested review from guyer and tkphd February 5, 2024 20:34
@wd15
Copy link
Contributor Author

wd15 commented Feb 5, 2024

@tkphd, @guyer: I added the nix logging environment stuff for no good reason. Please review again.

Copy link
Contributor

@tkphd tkphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM. Small question about maintenance overhead and hard-coding package versions.

flake.nix Show resolved Hide resolved
stdout, _ = p.communicate()
stdout = stdout.decode('ascii')

info["nix_info"] = json.loads(stdout)
Copy link
Member

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 both conda info and conda env export. One option is that each of these routines should return a dict containing one or more info["???_info"] and then have fipy.__init__.py call _fipy_environment.update(environment.???_info()) on each of them.

Copy link
Contributor Author

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.

@guyer guyer merged commit 8cd1eb4 into usnistgov:master Feb 22, 2024
21 checks passed
@wd15 wd15 deleted the nix branch February 22, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants