-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Feature: expression substitution #397
Conversation
Codecov Report
@@ Coverage Diff @@
## master #397 +/- ##
==========================================
+ Coverage 93.54% 93.72% +0.18%
==========================================
Files 56 59 +3
Lines 4666 5135 +469
Branches 648 717 +69
==========================================
+ Hits 4365 4813 +448
- Misses 201 207 +6
- Partials 100 115 +15
Continue to review full report at Codecov.
|
9a594c1
to
d8b104d
Compare
Expression between `%` markers are now evaluated by asteval. - Fixed pycharm type error with CliRunner.execute() - Minor update to docstrings - Updated deps
- added `forfile` command - added `forlayer` command - added FileType and PathType (with prop/exp substitution) - added variables to `grid` and `repeat` - vp.Document: added option to copy metadata with `replace()` - `State`: renamed CM to temp_document() - `State`: added CM to set variables
- fixed tests - improved coverage
- quotes for path (windows fix?)
- added substitution to LayerType - added `--no-fail` to read - added glob and convert_{length, angle, page_size} to expr symbols - disabled numpy from expr - grid now sets page size - fixed logging to print fully substituted arguments - added args logging to @block_processor - added example for interactive grid - doc: renamed metadata section to properties
ffa53c2
to
270bb4c
Compare
- removed all useless `return state` from execute_pipeline & decorators - fixed bug with linesort not keeping metadata - multiple doc type & example fixes
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description
This PR introduces expression substitution on most user input. Expressions are marked with
%
characters and are a subset of the Python language. They are interpreted using theasteval
package (see doc). See doc for the built-in symbols.New commands:
forfile
forlayer
eval
Misc other changes:
read
command now will not fail if the provided file doesn't exist and the--no-fail
parameter is usedgrid
now sets page sizeread
now sets/update thevp_source
/vp_sources
system props--no-fail
to readvp_sources
update invp.Document
Fixes #392
Fixes #381
Checklist
black
andisort
)mypy
returns no errorpytest
succeedshelp
reference.rst
make clean && make html
indocs/
)