Skip to content

Commit

Permalink
Updated release number. (#288)
Browse files Browse the repository at this point in the history
* Updated release number.

* Fixed module

* Fixed config_elems issue.

* Fixed minor table format issue.

* Fixed minor table format issue.

* A few minor doc changes.
  • Loading branch information
Paul-Ferrell authored Jul 15, 2020
1 parent 2b886ec commit 8c332eb
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 12 deletions.
9 changes: 6 additions & 3 deletions RELEASE.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This number should track progressive changes in this software, and correspond to git tags
# denoting releases. It is entirely independent of the the Pavilion's VERSION.
RELEASE=2.1.2
RELEASE=2.2

# Release History

## 2.2 Pre-release notes
## 2.2 Release notes
- All new test config parser.
- Variable references are now 'expressions'.
- In addition to variables, they can contain math and functions.
Expand All @@ -31,7 +31,10 @@ RELEASE=2.1.2
limited to all normal python escapes
(https://docs.python.org/2.0/ref/strings.html),
plus '[', '{', and '~'.
- The results section is now 'results.parse'
- The results section is now 'result_parse'
- Result parsers plugins now have explicit argument default and validation settings,
and the _check_args method must return the modified argument dictionary.
(rather than None before)

```yaml
mytest:
Expand Down
15 changes: 13 additions & 2 deletions docs/tests/format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,21 @@ Escapes

The YAML library used by Pavilion has been modified to handle escapes more
like Python. This makes it easier for Pavilion to separately handle escapes
that are unique to it (like ``\\{``). Yaml would normally throw an error
that are unique to it (like ``\{{``). Yaml would normally throw an error
on such escapes when using double quoted strings, but now it simply leaves them
as is.

Additionally, there is no general escape syntax in Pavilion. In most cases,
a backslash followed by a character remains as a backslash and that character
. There are, however, a few exceptions.

- ``\{{`` -> ``{{`` (Override special meaning of double brackets).
- ``\[~`` -> ``[~`` (Override special meaning of iteration brackets).
- ``\\{{`` -> A backslash followed by the start of an expression.
- ``\\[~`` -> A backslash followed by the start of an iteration.
- ``\~`` -> ``~``
- ``\\~`` -> A backslash followed by the iteration seperator start character.

Strings Only
^^^^^^^^^^^^

Expand Down Expand Up @@ -184,7 +195,7 @@ the base test is never supposed to run on its own.
cmds: make
run:
cmds: ./mytest -n {count|5}
cmds: ./mytest -n {{count}}
big_run:
inherits_from: _base
Expand Down
10 changes: 6 additions & 4 deletions docs/tests/values.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ be repeated for every combination of the variable values.
test_users: [bob, jane]
run:
cmds: 'srun ./super_magic [-w {{projects}}/{{test_users}} ]'
cmds: 'srun ./super_magic [~-w {{projects}}/{{test_users}} ~]'
This would result in the command:

Expand All @@ -188,6 +188,8 @@ access a specific value from a variable that is being iterated over.

cmds:
# This is ok
- 'srun ./super_magic [-w {{projects}}/{{test_users.0}} ]'
# This is NOT ok.
- 'echo "[~{{test_users}} {{test_users.0}} ~]"
- 'srun ./super_magic [~-w {{projects}}/{{test_users.0}} ~]'
# srun ./super_magic -w origami/bob -w fusion/bob

# This is NOT ok, and will cause an error.
- 'echo "[~{{test_users}} {{test_users.1}} ~]"
8 changes: 7 additions & 1 deletion lib/pavilion/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,10 @@ def draw_table(outfile, field_info, fields, rows, border=False, pad=True,
title_length = title_length + 2 * len(fields)
title_format = ' {{0:{0}s}} '.format(title_length)
if border:
title_format = '|' + title_format + '|'
if pad:
title_format = '| ' + title_format + ' |'
else:
title_format = '|' + title_format + '|'
title_format += '\n'

# Generate the table break line.
Expand Down Expand Up @@ -552,6 +555,9 @@ def draw_table(outfile, field_info, fields, rows, border=False, pad=True,
if row_i == 0:
outfile.write(horizontal_break)

if border:
outfile.write(horizontal_break)

except IOError:
# We may get a broken pipe, especially when the output is piped to
# something like head. It's ok, just move along.
Expand Down
3 changes: 2 additions & 1 deletion lib/pavilion/result/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .evaluations import check_expression, evaluate_results, StringParserError
from .base import base_results, ResultError, BASE_RESULTS
from . import parsers
from .parsers import parse_results
from .parsers import parse_results, ResultParser


def get_result_logger(log_file: IO[str]) -> Callable[..., None]:
Expand All @@ -36,6 +36,7 @@ def log(msg, lvl=None):

return log


def check_config(parser_conf, evaluate_conf):
"""Make sure the result config is sensible, both for result parsers and
evaluations.
Expand Down
2 changes: 1 addition & 1 deletion lib/pavilion/result/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def __init__(self, name, description, defaults=None,
if 'match_type' not in self.defaults:
self.defaults['match_type'] = MATCH_FIRST

self.config_elems = config_elems
self.config_elems = config_elems
self.priority = priority
self.open_mode = open_mode

Expand Down

0 comments on commit 8c332eb

Please sign in to comment.