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

---strict flag? #10

Closed
sergiocorreia opened this issue Jun 7, 2015 · 4 comments
Closed

---strict flag? #10

sergiocorreia opened this issue Jun 7, 2015 · 4 comments

Comments

@sergiocorreia
Copy link

Brainstorming a bit, but is it feasible to set a ---strict flag that will stop on error?

It would require a minor chance in cli.py (stop if unknown is not empty) and in document.py (I'm not sure if changing do_not_stop is enough)

@sergiocorreia
Copy link
Author

Also, maybe a ---style flag that overrides the YAML metadata is useful?

For instance, I may want to compile a paper as draft (placing tables and figures at the end) without having to change the markdown file itself.

Cheers,
Sergio

@msprev
Copy link
Owner

msprev commented Jun 8, 2015

Thanks for this. At the moment, panzer tries to go as far as possible with processing unless it encounters a 'critical' level (fatal) error. Is there a particular error that you think should be treated as critical which is not? Or is the idea to treat any error as fatal?

(do_not_stop has a different purpose. With a cleanup script, it should run no matter what errors (fatal or otherwise) happen. This flag is to request that this happens in run_scripts)

On the ---style suggestion, you can do actually this already by passing --metadata=style:MyDraftSyle on the command line. This will override any document setting. You can also pass --metadata=style: to clear style and switch off panzer.

@sergiocorreia
Copy link
Author

Thanks for the metadata trick!

About the errors, if I'm debugging a filter or a script, and there is an error, it's convenient if the scripts stops right there so that I immediately know something is wrong.

msprev pushed a commit that referenced this issue Jun 8, 2015
@msprev
Copy link
Owner

msprev commented Jun 8, 2015

I've implemented the ---strict command line option. It will cause panzer to exit on the first error. Let me know if you have any problems.

@msprev msprev closed this as completed Jun 8, 2015
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

No branches or pull requests

2 participants