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

Comments

@velocirobbie
Copy link
Collaborator

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 djgroen added the bug label May 17, 2019

@djgroen

This comment has been minimized.

Copy link
Owner

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.

@djgroen

This comment has been minimized.

Copy link
Owner

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.

@djgroen

This comment has been minimized.

Copy link
Owner

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?

djgroen added a commit that referenced this issue Jun 10, 2019

@djgroen

This comment has been minimized.

Copy link
Owner

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...

@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
You can’t perform that action at this time.