All Projects → smarie → python-yamlable

smarie / python-yamlable

Licence: BSD-3-Clause License
A thin wrapper of PyYaml to convert Python objects to YAML and back

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to python-yamlable

fs-utils
Generalized file and path utils for Node.js projects.
Stars: ✭ 33 (+17.86%)
Mutual labels:  read, file, write
write-yaml
Basic node.js utility for converting JSON to YAML and writing formatting YAML files to disk.
Stars: ✭ 38 (+35.71%)
Mutual labels:  yaml, file, write
Isobmff
C++ Library for ISO/IEC 14496-12 - ISO Base Media File Format (QuickTime, MPEG-4, HEIF, etc)
Stars: ✭ 157 (+460.71%)
Mutual labels:  format, file, codec
GraphIO.jl
Graph IO functionality for various formats.
Stars: ✭ 54 (+92.86%)
Mutual labels:  read, load, write
Simple-YAML
A Java API that provides an easy-to-use way to store data using the YAML format.
Stars: ✭ 68 (+142.86%)
Mutual labels:  yaml, object, format
yaml.sh
Read YAML files with only Bash
Stars: ✭ 30 (+7.14%)
Mutual labels:  yaml, parsing
prsdigg
Build your value net on Web3 with Quill
Stars: ✭ 60 (+114.29%)
Mutual labels:  read, write
pypact
A Python package for parsing FISPACT-II output
Stars: ✭ 19 (-32.14%)
Mutual labels:  parsing, file
python-pyfields
Define fields in python classes. Easily.
Stars: ✭ 39 (+39.29%)
Mutual labels:  object, oop
LuaKit
Lua核心工具包,包含对面向对象,组件系统(灵活的绑定解绑模式),mvc分模块加载,事件分发系统等常用模式的封装。同时提供打印,内存泄漏检测,性能分析等常用工具类。
Stars: ✭ 112 (+300%)
Mutual labels:  oop, dump
Poseidon
stealthy UM <-> KM communication system without creating any system threads, permanent hooks, driver objects, section objects or device objects.
Stars: ✭ 189 (+575%)
Mutual labels:  read, write
spark-hadoopoffice-ds
A Spark datasource for the HadoopOffice library
Stars: ✭ 36 (+28.57%)
Mutual labels:  read, write
PCF8591 library
Library to use i2c analog IC with arduino and esp8266. Can read analog value and write analog value with only 2 wire (perfect for ESP-01).
Stars: ✭ 24 (-14.29%)
Mutual labels:  read, write
colocat
Fegeya Colocat, Colorized 'cat' implementation. Written in C++17.
Stars: ✭ 14 (-50%)
Mutual labels:  read, file
pyaml env
Parse YAML configuration with environment variables in Python
Stars: ✭ 36 (+28.57%)
Mutual labels:  yaml, pyyaml
atomically
Write files atomically and reliably.
Stars: ✭ 136 (+385.71%)
Mutual labels:  file, write
audiofile
Handling audio files in Python
Stars: ✭ 17 (-39.29%)
Mutual labels:  read, write
dataconf
Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support.
Stars: ✭ 40 (+42.86%)
Mutual labels:  yaml, parsing
desktop
Extendable calculator for the 21st Century ⚡
Stars: ✭ 85 (+203.57%)
Mutual labels:  parse, parsing
Yamerl
YAML 1.2 and JSON parser in pure Erlang
Stars: ✭ 174 (+521.43%)
Mutual labels:  yaml, parsing

yamlable

Convert Python objects to YAML and back.

Python versions Build Status Tests Status Coverage Status Flake8 Status

Documentation PyPI Downloads Downloads per week GitHub stars codecov

This is the readme for developers. The documentation for users is available here: https://smarie.github.io/python-yamlable/

Want to contribute ?

Contributions are welcome ! Simply fork this project on github, commit your contributions, and create pull requests.

Here is a non-exhaustive list of interesting open topics: https://github.com/smarie/python-yamlable/issues

nox setup

This project uses nox to define all lifecycle tasks. In order to be able to run those tasks, you should create python 3.7 environment and install the requirements:

>>> conda create -n noxenv python="3.7"
>>> activate noxenv
(noxenv) >>> pip install -r noxfile-requirements.txt

You should then be able to list all available tasks using:

>>> nox --list
Sessions defined in <path>\noxfile.py:

* tests-2.7 -> Run the test suite, including test reports generation and coverage reports.
* tests-3.5 -> Run the test suite, including test reports generation and coverage reports.
* tests-3.6 -> Run the test suite, including test reports generation and coverage reports.
* tests-3.8 -> Run the test suite, including test reports generation and coverage reports.
* tests-3.7 -> Run the test suite, including test reports generation and coverage reports.
- docs-3.7 -> Generates the doc and serves it on a local http server. Pass '-- build' to build statically instead.
- publish-3.7 -> Deploy the docs+reports on github pages. Note: this rebuilds the docs
- release-3.7 -> Create a release on github corresponding to the latest tag

Running the tests and generating the reports

This project uses pytest so running pytest at the root folder will execute all tests on current environment. However it is a bit cumbersome to manage all requirements by hand ; it is easier to use nox to run pytest on all supported python environments with the correct package requirements:

nox

Tests and coverage reports are automatically generated under ./docs/reports for one of the sessions (tests-3.7).

If you wish to execute tests on a specific environment, use explicit session names, e.g. nox -s tests-3.6.

Editing the documentation

This project uses mkdocs to generate its documentation page. Therefore building a local copy of the doc page may be done using mkdocs build -f docs/mkdocs.yml. However once again things are easier with nox. You can easily build and serve locally a version of the documentation site using:

>>> nox -s docs
nox > Running session docs-3.7
nox > Creating conda env in .nox\docs-3-7 with python=3.7
nox > [docs] Installing requirements with pip: ['mkdocs-material', 'mkdocs', 'pymdown-extensions', 'pygments']
nox > python -m pip install mkdocs-material mkdocs pymdown-extensions pygments
nox > mkdocs serve -f ./docs/mkdocs.yml
INFO    -  Building documentation...
INFO    -  Cleaning site directory
INFO    -  The following pages exist in the docs directory, but are not included in the "nav" configuration:
  - long_description.md
INFO    -  Documentation built in 1.07 seconds
INFO    -  Serving on http://127.0.0.1:8000
INFO    -  Start watching changes
...

While this is running, you can edit the files under ./docs/ and browse the automatically refreshed documentation at the local http://127.0.0.1:8000 page.

Once you are done, simply hit <CTRL+C> to stop the session.

Publishing the documentation (including tests and coverage reports) is done automatically by the continuous integration engine, using the nox -s publish session, this is not needed for local development.

Packaging

This project uses setuptools_scm to synchronise the version number. Therefore the following command should be used for development snapshots as well as official releases: python setup.py sdist bdist_wheel. However this is not generally needed since the continuous integration engine does it automatically for us on git tags. For reference, this is done in the nox -s release session.

Merging pull requests with edits - memo

Ax explained in github ('get commandline instructions'):

git checkout -b <git_name>-<feature_branch> master
git pull https://github.com/<git_name>/python-yamlable.git <feature_branch> --no-commit --ff-only

if the second step does not work, do a normal auto-merge (do not use rebase!):

git pull https://github.com/<git_name>/python-yamlable.git <feature_branch> --no-commit

Finally review the changes, possibly perform some modifications, and commit.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].