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

Add support for sisl in nodify's GUI #776

Merged
merged 1 commit into from
May 24, 2024
Merged

Conversation

pfebrer
Copy link
Contributor

@pfebrer pfebrer commented May 23, 2024

The idea is that sisl-gui (https://github.com/pfebrer/sisl-gui) will disappear in favour of a GUI that is general for nodify. This GUI can be launched in the terminal with

nodify-gui

once nodify is installed.

Then, the only thing sisl-specific (for now) are the options that sisl provides for plotting files. These are registered once sisl is nodified, because sisl.__nodify__() will be called.

Then, to use sisl functionality on nodify's GUI one only needs to pass sisl on the list of modules:

nodify-gui sisl

This will result in what previously was sisl-gui.

def _get_plot_options(file_name: str) -> List[str]:
try:
plot_handler = sisl.get_sile(file_name).plot
except:

Check notice

Code scanning / CodeQL

Except block handles 'BaseException' Note

Except block directly handles BaseException.

try:
plot.get()
except:

Check notice

Code scanning / CodeQL

Except block handles 'BaseException' Note

Except block directly handles BaseException.

try:
plot.get()
except:

Check notice

Code scanning / CodeQL

Empty except Note

'except' clause does nothing but pass and there is no explanatory comment.
Copy link

codecov bot commented May 23, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 87.30%. Comparing base (be29de5) to head (628246c).

Files Patch % Lines
src/sisl/_nodify.py 13.04% 20 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #776      +/-   ##
==========================================
- Coverage   87.34%   87.30%   -0.04%     
==========================================
  Files         393      394       +1     
  Lines       50385    50409      +24     
==========================================
+ Hits        44007    44011       +4     
- Misses       6378     6398      +20     

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

@zerothi zerothi merged commit 9c0317d into zerothi:main May 24, 2024
7 of 9 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.

None yet

2 participants