Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: omni-us/jsonargparse
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.32.2
Choose a base ref
...
head repository: omni-us/jsonargparse
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.0.0
Choose a head ref
Loading
Showing with 15,803 additions and 7,269 deletions.
  1. +7 −3 .bumpversion.cfg
  2. +51 −14 .circleci/config.yml
  3. +0 −7 .codeclimate.yml
  4. +19 −0 .github/workflows/test.yml
  5. +2 −0 .gitignore
  6. +2 −0 .sonarcloud.properties
  7. +50 −0 CHANGELOG.rst
  8. +571 −199 README.rst
  9. +1 −1 docs/.buildinfo
  10. +258 −0 docs/CHANGELOG.html
  11. +12 −3 docs/_modules/index.html
  12. +0 −2,500 docs/_modules/jsonargparse.html
  13. +807 −0 docs/_modules/jsonargparse/actions.html
  14. +271 −0 docs/_modules/jsonargparse/cli.html
  15. +1,424 −0 docs/_modules/jsonargparse/core.html
  16. +286 −0 docs/_modules/jsonargparse/formatters.html
  17. +382 −0 docs/_modules/jsonargparse/jsonnet.html
  18. +581 −0 docs/_modules/jsonargparse/jsonschema.html
  19. +352 −0 docs/_modules/jsonargparse/optionals.html
  20. +457 −0 docs/_modules/jsonargparse/signatures.html
  21. +483 −0 docs/_modules/jsonargparse/typing.html
  22. +650 −0 docs/_modules/jsonargparse/util.html
  23. +50 −0 docs/_sources/CHANGELOG.rst.txt
  24. +78 −3 docs/_sources/index.rst.txt
  25. +41 −20 docs/_static/basic.css
  26. +3 −2 docs/_static/doctools.js
  27. +1 −1 docs/_static/documentation_options.js
  28. BIN docs/_static/fonts/Inconsolata-Bold.ttf
  29. BIN docs/_static/fonts/Inconsolata-Regular.ttf
  30. BIN docs/_static/fonts/Inconsolata.ttf
  31. BIN docs/_static/fonts/Lato-Bold.ttf
  32. BIN docs/_static/fonts/Lato-Regular.ttf
  33. BIN docs/_static/fonts/RobotoSlab-Bold.ttf
  34. BIN docs/_static/fonts/RobotoSlab-Regular.ttf
  35. +5 −6 docs/_static/searchtools.js
  36. +225 −89 docs/genindex.html
  37. +1,809 −918 docs/index.html
  38. BIN docs/objects.inv
  39. +55 −8 docs/py-modindex.html
  40. +2 −2 docs/search.html
  41. +1 −1 docs/searchindex.js
  42. +4 −3 githook-pre-commit
  43. +0 −2,301 jsonargparse.py
  44. +23 −0 jsonargparse/__init__.py
  45. +608 −0 jsonargparse/actions.py
  46. +72 −0 jsonargparse/cli.py
  47. +1,225 −0 jsonargparse/core.py
  48. +87 −0 jsonargparse/formatters.py
  49. +183 −0 jsonargparse/jsonnet.py
  50. +382 −0 jsonargparse/jsonschema.py
  51. +153 −0 jsonargparse/optionals.py
  52. +258 −0 jsonargparse/signatures.py
  53. +284 −0 jsonargparse/typing.py
  54. +451 −0 jsonargparse/util.py
  55. +0 −1,168 jsonargparse_tests.py
  56. 0 jsonargparse_tests/__init__.py
  57. +44 −0 jsonargparse_tests/__main__.py
  58. +308 −0 jsonargparse_tests/actions_tests.py
  59. +239 −0 jsonargparse_tests/argcomplete_tests.py
  60. +87 −0 jsonargparse_tests/base.py
  61. +45 −0 jsonargparse_tests/cli_tests.py
  62. +785 −0 jsonargparse_tests/core_tests.py
  63. +55 −0 jsonargparse_tests/formatters_tests.py
  64. +136 −0 jsonargparse_tests/jsonnet_tests.py
  65. +295 −0 jsonargparse_tests/jsonschema_tests.py
  66. +119 −0 jsonargparse_tests/optionals_tests.py
  67. +413 −0 jsonargparse_tests/signatures_tests.py
  68. +27 −0 jsonargparse_tests/signatures_tests_gt_py35.py
  69. +200 −0 jsonargparse_tests/typing_tests.py
  70. +251 −0 jsonargparse_tests/util_tests.py
  71. +48 −8 setup.cfg
  72. +3 −7 setup.py
  73. +1 −0 sphinx/CHANGELOG.rst
  74. +3 −2 sphinx/conf.py
  75. +78 −3 sphinx/index.rst
10 changes: 7 additions & 3 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
[bumpversion]
current_version = 2.32.2
current_version = 3.0.0
commit = True
tag = True
tag_name = v{new_version}
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?P<release>(\.dev|rc)[0-9]+)?
serialize =
{major}.{minor}.{patch}{release}
{major}.{minor}.{patch}

[bumpversion:file:setup.cfg]
search = version = {current_version}
replace = version = {new_version}

[bumpversion:file:jsonargparse.py]
[bumpversion:file:jsonargparse/__init__.py]

[bumpversion:file:sphinx/conf.py]
[bumpversion:file:.sonarcloud.properties]
65 changes: 51 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -8,10 +8,29 @@ jobs:
- checkout
- run:
name: Build wheel package
command: ./setup.py bdist_wheel
command: ./setup.py bdist_wheel sdist
- persist_to_workspace:
root: .
paths: ./dist/*.whl
paths:
- ./dist/*.whl
- ./dist/*.tar.gz
test-pypy3:
docker:
- image: pypy:3
steps:
- attach_workspace:
at: .
- run:
name: Run unit tests
command: |
pip3 install $(ls ./dist/*.whl)[test_no_urls]
pypy3 -m jsonargparse_tests coverage xml coverage_pypy3.xml
pip3 install $(ls ./dist/*.whl)[test,all]
pypy3 -m jsonargparse_tests coverage xml coverage_pypy3_all.xml
- persist_to_workspace:
root: .
paths:
- ./coverage_*.xml
test-py38: &test-py38
docker:
- image: circleci/python:3.8
@@ -22,14 +41,20 @@ jobs:
name: Run unit tests
command: |
py=$(python3 --version | sed -r 's|.* 3\.([0-9]+)\..*|3.\1|')
pip3 install --user $(ls ./dist/*.whl)[test]
python3 -m jsonargparse_tests
pip3 install --user $(ls ./dist/*.whl)[all,test]
virtualenv -p python3 venv$py
. venv$py/bin/activate
pip3 install $(ls ./dist/*.whl)[test_no_urls]
python3 -m jsonargparse_tests coverage xml coverage_py$py.xml
pip3 install $(ls ./dist/*.whl)[test,all]
python3 -m jsonargparse_tests coverage xml coverage_py${py}_all.xml
- persist_to_workspace:
root: .
paths:
- ./coverage_*.xml
test-py39:
<<: *test-py38
docker:
- image: circleci/python:3.9
test-py37:
<<: *test-py38
docker:
@@ -52,9 +77,16 @@ jobs:
- run:
name: Code coverage
command: |
mv coverage_py3.8.xml coverage.xml
rm -f coverage_*.xml
bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN_JSONARGPARSE
for py in 3.5 3.6 3.7 3.8 3.9 py3; do
bash <(curl -s https://codecov.io/bash) \
-t $CODECOV_TOKEN_JSONARGPARSE \
-F py$py \
-f coverage_py$py.xml
bash <(curl -s https://codecov.io/bash) \
-t $CODECOV_TOKEN_JSONARGPARSE \
-F py${py}_all \
-f coverage_py${py}_all.xml
done
publish-pypi:
docker:
- image: mauvilsa/docker-twine:1.11.0
@@ -63,7 +95,7 @@ jobs:
at: .
- run:
name: Publish Release on PyPI
command: twine upload --username "${PYPI_USER}" --password "${PYPI_PASS}" ./dist/*.whl
command: twine upload --username "${PYPI_USER}" --password "${PYPI_PASS}" ./dist/*.whl ./dist/*.tar.gz

workflows:
version: 2
@@ -72,30 +104,35 @@ workflows:
- build: &buildreq
filters: &tagfilter
tags:
only: /^v\d+\.\d+\.\d+$/
only: /^v\d+\.\d+\.\d+.*$/
- test-py38: &testreq
<<: *buildreq
requires:
- build
- test-py39:
<<: *testreq
- test-py37:
<<: *testreq
- test-py36:
<<: *testreq
- test-py35:
<<: *testreq
- test-pypy3:
<<: *testreq
- codecov:
<<: *testreq
requires:
- test-pypy3
- test-py39
- test-py38
- test-py37
- test-py36
- test-py35
- publish-pypi:
filters:
branches:
ignore: /.*/
<<: *tagfilter
context: pypi-upload-context
requires:
- test-py38
- test-py37
- test-py36
- test-py35
- codecov
7 changes: 0 additions & 7 deletions .codeclimate.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Python package
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
python: [3.8]
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install Tox
run: pip install tox
- name: Run Tox
run: tox -e py
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@ __pycache__
.coverage
coverage.xml
.mypy_cache
.tox
venv*
sphinx/_build
build
dist
2 changes: 2 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sonar.sources=jsonargparse
sonar.projectVersion=3.0.0
50 changes: 50 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.. _changelog:

Changelog
=========

All notable changes to this project will be documented in this file. Versions
follow `Semantic Versioning <https://semver.org/>`_
(``<major>.<minor>.<patch>``). Backward incompatible (breaking) changes will
only be introduced in major versions with advance notice in the **Deprecated**
section of releases.


v3.0.0 (2020-12-01)
-------------------

Added
^^^^^

- Functions to add arguments from classes, methods and functions.
- CLI function that allows creating a line command line interface with a single
line of code inspired by Fire.
- Typing module that includes predefined types and type generator functions
for paths and restricted numbers/strings.
- Extended support to add_argument type to allow complex type hints.
- Parsers now include --print_config option to dump defaults.
- Support argcomplete for tab completion of arguments.


Changed
^^^^^^^

- ArgumentParsers by default now use as error_handler the
usage_and_exit_error_handler.
- error_handler and formatter_class no longer accept as value a string.
- Changed SimpleNamespace to Namespace to avoid unnecessary differences with
argparse.


Deprecated
^^^^^^^^^^

- ActionOperators should no longer be used, the new alternative is
restricted number types.


v2.X.X
------

The change log was introduced in v3.0.0. For details of the changes for previous
versions take a look at the git log. It more or less reads like a change log.
Loading