From 5b849b0275a607ec4bf6d99adfe78d6bcf4e22b1 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Sun, 4 Feb 2024 12:18:14 -0800 Subject: [PATCH] doc update --- CONTRIBUTING.md | 10 ++++------ tests/templates/_test_foo_simple.py | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d54d080d..db69002c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,18 +33,16 @@ actively welcome your pull requests: file. 4. If you've added code that should be tested, add tests. All new parsers should have several sample outputs and tests. - - Templates: + - Templates: - [tests/templates/_test_foo.py](https://github.com/kellyjonbrazil/jc/blob/master/tests/templates/_test_foo.py) as a template for a test. - - [tests/templates/_test_foo_s.py (streaming)](https://github.com/kellyjonbrazil/jc/tree/master/tests/templates/_test_foo_s.py) as a template for a streaming test. + - [tests/templates/_test_foo_s.py (streaming)](https://github.com/kellyjonbrazil/jc/tree/master/tests/templates/_test_foo_s.py) as a template for a streaming test. - [tests/templates/_test_foo_simple.py](https://github.com/kellyjonbrazil/jc/tree/master/tests/templates/_test_foo_simple.py) as a template if you only have test with fixtures. Execute these steps for standard tests: - - Save this file as `text_{parser_name}.py` since the helper methods extract parser names from the filename. - - Organize fixtures in `text/fixtures` for optimal structure. + - Save this file as `test_{parser_name}.py` since the helper methods extract parser names from the filename. + - Organize fixtures in `tests/fixtures` for optimal structure. - Format fixtures as follows (using double dashes): - `{parser_name}--{some_test_description}.out` for command output. - `{parser_name}--{some_test_description}.json` for expected JSON after parsing. - - - Fixtures: Tests typically consist of an input file and an expected output JSON file. Add the data files to the appropriate folder under [tests/fixtures](https://github.com/kellyjonbrazil/jc/tree/master/tests/fixtures) 5. Documentation is auto-generated from docstrings, so ensure they are clear and diff --git a/tests/templates/_test_foo_simple.py b/tests/templates/_test_foo_simple.py index 534bf61b..a1697bc8 100644 --- a/tests/templates/_test_foo_simple.py +++ b/tests/templates/_test_foo_simple.py @@ -4,7 +4,7 @@ from tests import utils_for_test as test_utils # Execute these steps for standard tests: # - Save this file as `test_{parser_name}.py` since the helper methods extract parser names from the filename. -# - Organize fixtures in `test/fixtures` for optimal structure. +# - Organize fixtures in `tests/fixtures` for optimal structure. # - Format fixtures as follows (using double dashes): # - `{parser_name}--{some_test_description}.out` for command output. # - `{parser_name}--{some_test_description}.json` for expected JSON after parsing.