### Install from source Source: https://github.com/albmarin/badx12/blob/master/docs/installation.rst Install the package using setup.py once the source code has been downloaded or cloned. ```console $ python setup.py install ``` -------------------------------- ### Install badX12 via pip Source: https://github.com/albmarin/badx12/blob/master/README.md Use pip to install or update the badX12 library. ```bash pip install -U badX12 ``` -------------------------------- ### Set up local development environment Source: https://github.com/albmarin/badx12/blob/master/CONTRIBUTING.rst Create a virtual environment, enter the project directory, and install the package in development mode. ```shell $ mkvirtualenv badx12 $ cd badx12/ $ python setup.py develop ``` -------------------------------- ### Install stable release via pip Source: https://github.com/albmarin/badx12/blob/master/docs/installation.rst The preferred method to install the most recent stable release of badX12. ```console $ pip install badx12 ``` -------------------------------- ### Deploy badX12 Source: https://github.com/albmarin/badx12/blob/master/CONTRIBUTING.rst Bump the version, push changes and tags, and let Travis deploy to PyPI if tests pass. ```shell $ bumpversion patch # possible: major / minor / patch $ git push $ git push --tags ``` -------------------------------- ### Clone repository from GitHub Source: https://github.com/albmarin/badx12/blob/master/docs/installation.rst Clone the public repository to obtain the source code for badX12. ```console $ git clone git://github.com/git-albertomarin/badx12 ``` -------------------------------- ### Run linting and tests Source: https://github.com/albmarin/badx12/blob/master/CONTRIBUTING.rst Check code style with flake8, run tests, and test with tox across Python versions. ```shell $ flake8 badx12 tests $ python setup.py test or py.test $ tox ``` -------------------------------- ### Initialize and parse an EDI document Source: https://github.com/albmarin/badx12/blob/master/docs/usage.rst Use the Parser class to parse an EDI document provided as a file path or raw text string. ```python from badx12 import Parser parser = Parser() document = parser.parse_document(edi_path_or_text) ``` -------------------------------- ### Commit and push changes Source: https://github.com/albmarin/badx12/blob/master/CONTRIBUTING.rst Stage all changes, commit with a descriptive message, and push the branch to GitHub. ```shell $ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature ``` -------------------------------- ### Download source tarball Source: https://github.com/albmarin/badx12/blob/master/docs/installation.rst Download the source code as a tarball from the GitHub repository. ```console $ curl -OL https://github.com/git-albertomarin/badx12/tarball/master ``` -------------------------------- ### Create a feature branch Source: https://github.com/albmarin/badx12/blob/master/CONTRIBUTING.rst Create a new branch for your bugfix or feature. ```shell $ git checkout -b name-of-your-bugfix-or-feature ``` -------------------------------- ### Run a subset of tests Source: https://github.com/albmarin/badx12/blob/master/CONTRIBUTING.rst Run a specific test module using py.test. ```shell $ py.test tests.test_badx12 ``` -------------------------------- ### Parse EDI files via command line Source: https://github.com/albmarin/badx12/blob/master/README.md Use the badx12 parse command to convert EDI files to JSON or XML. The -e flag specifies the format, and -o specifies the output directory. ```bash badx12 parse "path-to-edi-file" badx12 parse "path-to-edi-file" -e XML -o "path-to-output-dir" ``` -------------------------------- ### Clone the badX12 repository Source: https://github.com/albmarin/badx12/blob/master/CONTRIBUTING.rst Clone your fork of the badX12 repository using SSH. ```shell $ git clone git@github.com:your_name_here/badX12.git ``` -------------------------------- ### Parse EDI files programmatically Source: https://github.com/albmarin/badx12/blob/master/README.md Import the Parser class to parse an EDI file into a Python object. ```python from badx12 import Parser parser = Parser() document = parser.parse_document("path-to-file/file.edi") ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.