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

Use os.makedirs to create parent dirs for solution_fn #203

Merged

Conversation

dannyopts
Copy link
Contributor

Before this fix the tests fail cbc does not work on OSx.

On OSx mknod requires privledged access (need to run as sudo)
https://stackoverflow.com/questions/32115715/os-mknod-fails-on-macos, but even when running as sudo, the test still fails with an invalid argument error.

I assume the mknod is there incase the parent dir of the solution_fn is not present, so I created a test for this case and found that glpk also fails if the solution_fn's parent dir does not exist so I added a fix for this.

Copy link

codecov bot commented Nov 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e642a1f) 89.23% compared to head (5e3daec) 87.76%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #203      +/-   ##
==========================================
- Coverage   89.23%   87.76%   -1.47%     
==========================================
  Files          15       15              
  Lines        3343     3343              
  Branches      768      767       -1     
==========================================
- Hits         2983     2934      -49     
- Misses        248      299      +51     
+ Partials      112      110       -2     
Files Coverage Δ
linopy/solvers.py 79.18% <100.00%> (-10.00%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@FabianHofmann FabianHofmann left a comment

Choose a reason for hiding this comment

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

thanks @dannyopts

@FabianHofmann FabianHofmann merged commit 43343e5 into PyPSA:master Nov 14, 2023
11 of 12 checks passed
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.

2 participants