Skip to content

Commit

Permalink
Update bugs template.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauvilsa committed Jun 11, 2024
1 parent 61ac055 commit 54fde77
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/ISSUE_TEMPLATE/1-bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@ running it gives. The following snippet templates might help:
1. Using the CLI function
```python
import jsonargparse
from jsonargparse import CLI
# Here define one or more functions or classes
def func1(param1: int, ...):
...
# Run the CLI providing the components
jsonargparse.CLI([func1, ...], error_handler=None)
CLI([func1, ...], exit_on_error=False)
```
2. Manually constructing a parser
```python
import jsonargparse
from jsonargparse import ArgumentParser
parser = jsonargparse.ArgumentParser(error_handler=None)
parser = ArgumentParser(exit_on_error=False)
# Here add to the parser only argument(s) relevant to the problem
# If a yaml config is required, it can be included in the same snippet as follows:
import yaml
parser.add_argument("--config", action=jsonargparse.ActionConfigFile)
parser.add_argument("--config", action="config")
config = yaml.safe_dump(
{
"key1": "val1",
Expand All @@ -68,7 +68,7 @@ parser.instantiate_classes(result)

<!-- Fill in the list below. -->

- jsonargparse version (e.g., 4.8.0):
- Python version (e.g., 3.9):
- How jsonargparse was installed (e.g. `pip install jsonargparse[all]`):
- OS (e.g., Linux):
- jsonargparse version:
- Python version:
- How jsonargparse was installed:
- OS:

0 comments on commit 54fde77

Please sign in to comment.