GithubHelp home page GithubHelp logo

axonxorz / pyxform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xlsform/pyxform

0.0 1.0 0.0 11.85 MB

A Python package to create XForms for ODK Collect.

License: BSD 2-Clause "Simplified" License

Python 99.92% Shell 0.08%

pyxform's Introduction

pyxform v0.15.1

circleci appveyor codecov black

pyxform is a Python library that makes writing XForms for ODK Collect and enketo easy by converting XLS(X) spreadsheets into XForms. It is used as a library in a number of tools including the ODK online converter and Ona.

XLS(X) documents used as input must follow to the XLSForm standard and the resulting output follows the ODK XForms standard.

pyxform is a major rewrite of xls2xform.

Running the latest release of pyxform

For those who want to convert forms at the command line, the latest official release of pyxform can be installed using pip:

pip install pyxform

The xls2xform command can then be used:

xls2xform path_to_XLSForm [output_path]

pyxform can be run with either Python 2 or Python 3. Continuous integration runs tests on both Python generations to ensure continued compatibility.

Running pyxform from local source

Note that you must uninstall any globally installed pyxform instance in order to use local modules. Please install java 8 or newer version.

From the command line:

python setup.py develop
python pyxform/xls2xform.py path_to_XLSForm [output_path]

Consider using a virtualenv and virtualenvwrapper to make dependency management easier and keep your global site-packages directory clean:

pip install virtualenv
pip install virtualenvwrapper
mkvirtualenv local_pyxform                     # or whatever you want to name it
(local_pyxform)$ python setup.py develop       # install the local files
(local_pyxform)$ python pyxform/xls2xform.py --help
(local_pyxform)$ xls2xform --help              # same effect as previous line
(local_pyxform)$ which xls2xform.              # ~/.virtualenvs/local_pyxform/bin/xls2xform

To leave and return to the virtual environment:

(local_pyxform)$ deactivate                    # leave the virtualenv
$ xls2xform --help
# -bash: xls2xform: command not found
$ workon local_pyxform                         # reactivate the virtualenv
(local_pyxform)$ which xls2xform               # & we can access the scripts once again
~/.virtualenvs/local_pyxform/bin/xls2xform

Installing pyxform from remote source

pip can install from any GitHub repository:

pip install git+https://github.com/XLSForm/pyxform.git@master#egg=pyxform

You can then run xls2xform from the commandline:

xls2xform path_to_XLSForm [output_path]

Testing

To make sure the install worked out, you can do the following:

pip install nose==1.0.0

cd your-virtual-env-dir/src/pyxform

nosetests

Documentation

To check out the documentation for pyxform do the following:

pip install Sphinx==1.0.7

cd your-virtual-env-dir/src/pyxform/docs

make html

Change Log

Changelog

Releasing pyxform

  1. Checkout a release branch from latest upstream master.

  2. Update CHANGES.txt with issues closed from the previous tagged release, e.g. https://github.com/XLSForm/pyxform/compare/v0.14.1...master.

  3. Update README.rst, setup.py, pyxform/__init__.py with the new release version number.

  4. Commit, push the branch, and initiate a pull request. Wait for tests to pass.

  5. Prepare a draft release, copy the changes noted in CHANGES.txt to the draft release. Set version number and the title for the release should include the date >

  6. When all tests are passing on the pull request, squash merge the pull request.

  7. Checkout the master branch and pull in latest upstream master:

    $ git checkout master
    $ git pull upstream master
    $ git push
    
  8. Cleanup build and dist folders:

    $ rm -rf build dist pyxform.egg-info
    
  9. Prepare sdist and bdist_wheel distributions:

    $ python setup.py sdist bdist_wheel
    
  10. Publish release to PyPI with twine:

    $ twine upload dist/pyxform-0.15.0-py2.py3-none-any.whl dist/pyxform-0.15.0.tar.gz
    

pyxform's People

Contributors

alxndrsn avatar amarder avatar bderenzi avatar charlesfleche avatar dorey avatar jbeorse avatar keynesyoudigit avatar larryweya avatar lincmba avatar lindsay-stevens avatar lognaturel avatar mejymejy avatar meletis avatar mitchellsundt avatar moshthepitt avatar nathan-uwlm avatar nathanathan avatar nribeka avatar petermuriuki avatar pld avatar prabhasp avatar qlands avatar rgaudin avatar sheppard avatar shivareddyiirs avatar shobhitagarwal1612 avatar ukanga avatar urbanslug avatar winnytroy avatar yanokwa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.