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

Broken plugin python file does not report error #101

Closed
velocirobbie opened this issue May 17, 2019 · 4 comments
Closed

Broken plugin python file does not report error #101

velocirobbie opened this issue May 17, 2019 · 4 comments

Comments

@velocirobbie
Copy link
Collaborator

@velocirobbie velocirobbie commented May 17, 2019

If my plugin file 'FabMD.py' has a syntax error or similar, typing

fab localhost lamms

returns:

`Warning: Command(s) not found:
lammps

Available commands:

archer                             partial(func, *args, **keywords) - new fun...
archive  ......`

It would be better if it said there was an error.

I assume somewhere fabric is catching this exception

@djgroen
Copy link
Owner

@djgroen djgroen commented May 17, 2019

In general there are a few issues with the way Fabric captures exceptions in tasks. In addition, the list of commands shown is also not quite consistent with the structure of the plugins. We should investigate this in detail, ideally before M12.

Loading

@djgroen
Copy link
Owner

@djgroen djgroen commented Jun 10, 2019

Okay, I found a solution for this, but it's a little tricky:

Basically, we need to override main.py in Fabric, and then modify the way that Fabric outputs diagnostics.

I now made a change on this, and I'll file a pull request for it.

Loading

@djgroen
Copy link
Owner

@djgroen djgroen commented Jun 10, 2019

After discussion with @dww100 I think it makes sense to rename this overridden version from fab to fabsim. It will be functionally the same as fab, but the way it conveys info will hopefully be better.

I'm not sure yet if this should be in the M12 release, but we did have a lot of complaints about aspects surrounding this... any opinions?

Loading

@djgroen
Copy link
Owner

@djgroen djgroen commented Jun 10, 2019

This issue is now solved. Question is whether we want to update our tutorials to use fabsim instead of the fab command...

Loading

@djgroen djgroen closed this Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants