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: robshakir/pyangbind
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.8.4
Choose a base ref
...
head repository: robshakir/pyangbind
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 940 additions and 1,539 deletions.
  1. +0 −2 .coveragerc
  2. +9 −3 .github/workflows/pypi.yml
  3. +2 −2 .github/workflows/python-test.yml
  4. +1 −0 .gitignore
  5. +161 −112 README.md
  6. +2 −2 docs/README.md
  7. +0 −17 docs/example/oc-local-routing/generate_bindings.sh
  8. +0 −30 docs/example/oc-local-routing/json/oc-lr.json
  9. +0 −28 docs/example/oc-local-routing/json/oc-lr_ietf.json
  10. +0 −71 docs/example/oc-local-routing/static_route_example.py
  11. +0 −1 docs/example/oc-local-routing/yang/.gitignore
  12. 0 docs/example/oc-local-routing/yang/.keep
  13. +10 −0 docs/example/oc-network-instance/generate_bindings.sh
  14. +43 −0 docs/example/oc-network-instance/json/oc-ni.json
  15. +50 −0 docs/example/oc-network-instance/json/oc-ni_ietf.json
  16. +111 −0 docs/example/oc-network-instance/static_route_example.py
  17. +3 −3 docs/usage.md
  18. +1 −1 pyangbind/__init__.py
  19. +28 −28 pyangbind/helpers/identity.py
  20. +1 −0 pyangbind/helpers/misc.py
  21. +8 −9 pyangbind/lib/pybindJSON.py
  22. +23 −23 pyangbind/lib/serialise.py
  23. +14 −14 pyangbind/lib/xpathhelper.py
  24. +29 −27 pyangbind/lib/yangtypes.py
  25. +101 −94 pyangbind/plugin/pybind.py
  26. +1 −0 requirements.DEVELOPER.txt
  27. +0 −1 requirements.txt
  28. +16 −7 scripts/release.sh
  29. +4 −0 setup.cfg
  30. +17 −0 tests/choice/choice.yang
  31. +29 −11 tests/choice/run.py
  32. +6 −0 tests/config-false/run.py
  33. +16 −7 tests/identityref/identityref.yang
  34. +63 −24 tests/identityref/run.py
  35. 0 tests/integration/openconfig-bgp/__init__.py
  36. +0 −122 tests/integration/openconfig-bgp/run.py
  37. +0 −22 tests/integration/openconfig-bgp/testdata/tc010.json
  38. +0 −293 tests/integration/openconfig-bgp/testdata/tc020.json
  39. +0 −22 tests/integration/openconfig-bgp/testdata/tc030.json
  40. +0 −281 tests/integration/openconfig-bgp/testdata/tc040.json
  41. +2 −4 tests/misc/run.py
  42. +13 −3 tests/presence/presence.yang
  43. +75 −22 tests/presence/run.py
  44. +1 −3 tests/serialise/ietf-json-serialise/run.py
  45. +1 −3 tests/serialise/json-serialise/run.py
  46. 0 tests/serialise/juniper-json-examples/__init__.py
  47. +0 −14 tests/serialise/juniper-json-examples/json/bgp-deactivated-config-ex.json
  48. +0 −18 tests/serialise/juniper-json-examples/json/bgp-global-ex.json
  49. +0 −25 tests/serialise/juniper-json-examples/json/bgp-gr-ex.json
  50. +0 −22 tests/serialise/juniper-json-examples/json/bgp-neighbor-list-ex.json
  51. +0 −155 tests/serialise/juniper-json-examples/run.py
  52. +16 −0 ...son/{interfaces_ph:False-flt:False-m:default.json → interfaces_ph.False-flt.False-m.default.json}
  53. +16 −0 ...lise/json/{interfaces_ph:False-flt:False-m:ietf.json → interfaces_ph.False-flt.False-m.ietf.json}
  54. 0 .../json/{interfaces_ph:False-flt:True-m:default.json → interfaces_ph.False-flt.True-m.default.json}
  55. 0 ...ialise/json/{interfaces_ph:False-flt:True-m:ietf.json → interfaces_ph.False-flt.True-m.ietf.json}
  56. +16 −0 .../json/{interfaces_ph:True-flt:False-m:default.json → interfaces_ph.True-flt.False-m.default.json}
  57. +16 −0 ...ialise/json/{interfaces_ph:True-flt:False-m:ietf.json → interfaces_ph.True-flt.False-m.ietf.json}
  58. 0 ...se/json/{interfaces_ph:True-flt:True-m:default.json → interfaces_ph.True-flt.True-m.default.json}
  59. 0 ...erialise/json/{interfaces_ph:True-flt:True-m:ietf.json → interfaces_ph.True-flt.True-m.ietf.json}
  60. +1 −1 tests/serialise/openconfig-serialise/run.py
  61. +16 −0 tests/serialise/xml-deserialise/ietf-xml-deserialise.yang
  62. +8 −0 tests/serialise/xml-deserialise/xml/obj.xml
  63. +1 −2 tests/serialise/xml-serialise/run.py
  64. +3 −5 tests/union/run.py
  65. +6 −5 tox.ini
2 changes: 0 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -28,7 +28,5 @@ exclude_lines =
if 0:
if __name__ == .__main__.:

# Don't complain about Py3 compatibility shims
if six.PY3:

ignore_errors = True
12 changes: 9 additions & 3 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ on:

jobs:
pypi-publish:
name: upload release to PyPI
name: Package and upload release to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
@@ -19,9 +19,15 @@ jobs:
with:
python-version: "3.11"
- name: Install building dependencies
run: pip install build
run: pip -q install build
- name: Build package
run: python -m build --sdist --wheel --outdir dist/
run: python -m build --outdir dist/ .
- name: Install package
run: pip -q install dist/pyangbind-*.whl
- name: Test bind with pyang
run: |
export PYBINDPLUGIN=`/usr/bin/env python -c 'import pyangbind; import os; print ("{}/plugin".format(os.path.dirname(pyangbind.__file__)))'`
pyang -V --plugindir $PYBINDPLUGIN -f pybind tests/base-test.yang
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

4 changes: 2 additions & 2 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -20,12 +20,12 @@ jobs:
run: pip install tox
- name: Lint with black
run: tox -e black
test:
unit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -64,3 +64,4 @@ tests/serialise/openconfig-serialise/include/
tests/serialise/openconfig-serialise/ocbind/
tests/serialise/openconfig-serialise/openconfig/
tests/split-classes/bindings/
tests/base-binding-out.py
Loading