diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 894a44c..0000000 --- a/.gitignore +++ /dev/null @@ -1,104 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a30463e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,98 +0,0 @@ -language: python - -cache: pip - -python: -# - "2.6" -# - "2.7" -# - "3.2" -# - "3.3" -# - "3.4" - - "3.5" -# - "3.5-dev" # 3.5 development branch - - "3.6" -# - "3.6-dev" # 3.6 development branch -# - "3.7" -# - "3.7-dev" # 3.7 development branch -# - "nightly" # currently points to 3.7-dev -# PyPy versions -# - "pypy" # PyPy2 2.5.0 -# - "pypy3" # Pypy3 2.4.0 -# - "pypy-5.3.1" -# - -env: - global: - - GH_REF: git@github.com:python-jsoner/jsoner.git - -before_install: - - sudo apt-get install pandoc - - sudo apt-get install ant - - sudo apt-get install ant-optional - -install: - - pip install -r ci_tools/requirements-setup.txt - - pip install -r ci_tools/requirements-test.txt - - pip install -r ci_tools/requirements-report.txt - - pip install -r ci_tools/requirements-doc.txt - - pip install codecov # https://github.com/codecov/example-python. This is specific to travis integration -# - pip install coveralls # this is an alternative to codecov - -script: -# - coverage run tests.py - - pip install . - - python -c "import os; os.chdir('..'); import jsoner" -# ***tests*** -# - coverage run tests.py -# - pytest --junitxml=reports/junit/junit.xml --html=reports/junit/report.html --cov-report term-missing --cov=./jsoner -v jsoner/tests/ -# now done in a dedicated script to capture exit code 1 and transform it to 0 - - chmod a+x ./ci_tools/run_tests.sh - - sh ./ci_tools/run_tests.sh - -after_success: -# ***reporting*** -# - junit2html junit.xml testrun.html output is really not nice - - ant -f ci_tools/generate-junit-html.xml # generates the html for the test results. Actually we dont use it anymore - - python ci_tools/generate-junit-badge.py # generates the badge for the test results - - codecov - - pylint jsoner # note that at the moment the report is simply lost, we dont transform the result into anything -# ***documentation*** - - mkdocs build -f docs/mkdocs.yml - - mv reports/junit docs/ # not in site/ anymore so that we do not need to use --dirty (it breaks client-side search) - # mkdocs gh-deploy requires special care : - # ---grant the possibility to push on the repo--- - - openssl aes-256-cbc -K $encrypted_87e154705126_key -iv $encrypted_87e154705126_iv -in ci_tools/github_travis_rsa.enc -out ci_tools/github_travis_rsa -d - # If the output file does not exist, that is because the secret is invalid. This can happen in forked repos so do not fail the build - - | - if [ -s "ci_tools/github_travis_rsa" ]; then - chmod 600 ci_tools/github_travis_rsa - eval `ssh-agent -s` # launch the authentication agent - ssh-add ci_tools/github_travis_rsa # register the key - git config user.name "Automatic Publish" - git config user.email "sylvain.marie@schneider-electric.com" - git remote add gh-remote "${GH_REF}"; - git fetch gh-remote && git fetch gh-remote gh-pages:gh-pages; - # push but only if this is not a build triggered by a pull request - # note: do not use the --dirty flag as it breaks client-side search - if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_PYTHON_VERSION}" = "3.5" ]; then echo "Pushing to github"; PYTHONPATH=jsoner/ mkdocs gh-deploy -v -f docs/mkdocs.yml --remote-name gh-remote; git push gh-remote gh-pages; fi; - else - echo "File 'ci_tools/github_travis_rsa' has not been created, please check your encrypted repo token in .travis.yml, on the line starting with 'openssl aes-256-cbc...'" - fi - -deploy: - provider: pypi - user: "smarie" - password: - secure: "Gytf37KdoXuySlrzFXAW7qDNwRDLdvaSv395va0cS3lwNNPDxDNL6dM1dAPic7cvF88eY5gqfFlwUL2GyKwJFNKotMoZOawgNISM9iVcvNe5oF2jmgAstiArDO69Jr89zQQVCU1HIQxNnENeMe0e5iGCv9oU6y6+SzVCuRFoeNWY9qWORPPEKekwyRQcxgGXhLxdrfw48X/5HZGku+fZNjArnf/xQkfj1Esxz0HOHAMvDj25g+c/BTpGGZuqWO7lvRKVHoyiEH0mVrusTWl+pHoSmdX5RVzRqKWsNI/vQbVALCoDz/U0mtGdRohFitVdayli8gMH/Hqn/qzGDM6k1IpgwzL9shOQM3K64oL+vW6R4Er4hD7fTbZugQ1UpzlEIwLRA2DOPiQlHP/Gnf91atPOfg9Dhe7UUBCkWL7bQqLz56SvfyrHytvwSTBdFdTAFcVyd7IV6m18CgItOpf+WATb8VrCLfIHmIsiE92LR+RySvEVEVlwfREJWk0NHvr8vJVLm2pqBXvnUDGnar+8tAmQM5erPGiSsf4vxZBUW0FaM2LFxBs6XiWVIvc4PB0nkkj5WfGz7Vn73a0AGaPvvg/wk8xJ8wpXwID3qbJoc2rE/CPOgkkfBPUoPz2ihmoN6d+0R5UpaSI6ZAbJZm6c+ZpSVAa5PxUKYTCADtVRKGo=" - on: - tags: true - python: 3.5 #only one of the builds have to be deployed -# server: https://test.pypi.org/legacy/ - distributions: "sdist bdist_wheel" - -matrix: - fast_finish: true - -notifications: - email: - on_success: never # options: [always|never|change] default: always diff --git a/404.html b/404.html new file mode 100644 index 0000000..862c853 --- /dev/null +++ b/404.html @@ -0,0 +1,303 @@ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +A thin wrapper of Python stdlib's json module to convert objects to JSON and back, with the purpose of maintaining readability of objects serialized with old versions of their class definition.
+ +> pip install jsabl +
Let's make a class JSON-able: we have to
+JSONAble@json_info annotation to declare the associated json "schema" id and version__from_json_dict__ (class method called during decoding) and/or __to_json_dict__ (instance method called during encoding) if we wish to have control on the process, for example to only dump part of the attributes or perform some custom instance creation. Note that default implementation relies on vars(self) for dumping and on cls(**dct) for loading.TODO complete
+See Usage for other possibilities of jsabl.
JSONEncoder/JSONDecoder logic (hooks, etc.).JSONCodecDo you like this library ? You might also like my other python libraries
+Details on the github page: https://github.com/python-jsabl/jsabl
+ + + + + + + + + +| Designed for use with JUnit and Ant. | +
| Class | Name | Status | Type | Time(s) | +
|---|
| Designed for use with JUnit and Ant. | +
| Class | Name | Status | Type | Time(s) | +
|---|
| Designed for use with JUnit and Ant. | +
| Class | Name | Status | Type | Time(s) | +
|---|
| Designed for use with JUnit and Ant. | +
| Class | Name | Status | Type | Time(s) | +
|---|
| Designed for use with JUnit and Ant. | +
| Tests | Failures | Errors | Skipped | Success rate | Time | +
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | NaN | 0.000 | +
| + Note: failures are anticipated and checked for with assertions while errors are unanticipated. + | +
| Name | Tests | Errors | Failures | Skipped | Time(s) | Time Stamp | Host | +
|---|
Report generated on 11-Oct-2018 at 16:37:17 by pytest-html v1.19.0
+| CI | +true |
| JAVA_HOME | +/usr/lib/jvm/java-8-oracle |
| Packages | +{'py': '1.5.4', 'pluggy': '0.7.1', 'pytest': '3.7.1'} |
| Platform | +Linux-4.4.0-101-generic-x86_64-with-debian-jessie-sid |
| Plugins | +{'cov': '2.6.0', 'metadata': '1.7.0', 'html': '1.19.0'} |
| Python | +3.5.6 |
| TRAVIS_BRANCH | +master |
| TRAVIS_BUILD_ID | +440236762 |
| TRAVIS_BUILD_NUMBER | +4 |
| TRAVIS_COMMIT | +87c0823ac32752583f6476b28aa293028f6337cf |
| TRAVIS_COMMIT_MESSAGE | +fixed mkdocs for markdown 3.0 |
| TRAVIS_COMMIT_RANGE | +1818482ded22...87c0823ac327 |
| TRAVIS_EVENT_TYPE | +push |
| TRAVIS_JOB_ID | +440236763 |
| TRAVIS_JOB_NUMBER | +4.1 |
| TRAVIS_OS_NAME | +linux |
| TRAVIS_PULL_REQUEST | +false |
| TRAVIS_REPO_SLUG | +python-jsabl/jsabl |
| TRAVIS_SUDO | +true |
1 tests ran in 0.06 seconds.
+(Un)check the boxes to filter the results.
1 passed, 0 skipped, 0 failed, 0 errors, 0 expected failures, 0 unexpected passes +| Result | +Test | +Duration | +Links |
|---|---|---|---|
| No results found. Try to check the filters | |||
| Passed | +jsabl/tests/test_stdlib_json_ext_protector.py::test_protection | +0.00 | +|
|
+ No log output captured. | |||