Skip to content

Commit

Permalink
Split PPP into its own, independent Python package.
Browse files Browse the repository at this point in the history
  • Loading branch information
joeflack4 committed Jun 13, 2018
1 parent b893038 commit 52be1af
Show file tree
Hide file tree
Showing 65 changed files with 114 additions and 3,724 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ MANIFEST
tags
*.swp
/*.html
pmix.egg-info
*.egg-info
output/
17 changes: 12 additions & 5 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
v0.2.1, 14 November 2017
v1.0.2, 2016-06-12
* Fix to include package data.

v1.0.0, 2016-06-12
* Initial release

#### Before splitting into repo independent from Pmix package.
v0.2.1, 2017-11-04
* Workbook and Xlsform classes for modeling Excel files
* PPP sub-package to convert an ODK form to PDF and HTML
* Various utilities: cascade, sheet-to-csv, analytics, numbering
* Qlang removed
* Added unit tests

v0.2.0, 5 October 2016
v0.2.0, 2016-10-05
* Renamed package to 'pmix'
* Expanded to contain borrow.py, functionality to grab translations
* Efficiencies from internals: more of an OO-design rather than functional

v0.1.2, 29 August 2016
v0.1.2, 2016-08-29
* Copy all worksheets from original file, not just survey, choices, settings

v0.1.1, 23 May 2016
v0.1.1, 2016-05-23
* Conditional formatting to highlight missing languages (English and translations)

v0.1.0, 4 March 2016
v0.1.0, 2016-03-04
* Initial release
* Included command-line interface
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ PPP also exists on the web!
| -p | --preset | Select from a preset of bundled options. The 'developer' preset renders a form that is the most similar to the original XlsForm. The 'internal' preset is more human readable but is not stripped of sensitive information. The 'public' option is like the 'internal' option, only with sensitive information removed. Option usage: `-p {public,internal,developer,minimal}`.

##### Example Usage
> `python -m pmix.ppp myXlsForm.xlsx`
> `python -m ppp myXlsForm.xlsx`
> *Prints HTML converted XlsForm with default settings to the console*
> `python -m pmix.ppp myXlsForm.xlsx -l Français -f doc -p minimal > myXlsForm.doc`
> `python -m ppp myXlsForm.xlsx -l Français -f doc -p minimal > myXlsForm.doc`
> *Converts an ODK Excel file to a MS Word-readable .doc file (is really HTML under the hood), with the preset of "minimal", and the language set to French*
> `python -m pmix.ppp myXlsForm1.xlsx myXlsForm2.xlsx -l Luganda Lusoga English -f doc pdf -p minimal full`
> `python -m ppp myXlsForm1.xlsx myXlsForm2.xlsx -l Luganda Lusoga English -f doc pdf -p minimal full`
> *Saves a document for every combination of forms and options passed, in this case **2** input files \* **3** languages \* **2** file formats \* **2** detail formats, or **24** output files*
## Workbook
Expand Down
41 changes: 20 additions & 21 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
PYTHON=./env/bin/python3
PYTHON=python3
SRC=./pmix/
TEST=./test/


.PHONY: lint tags ltags test all lint_all codestyle docstyle server serve lint_src lint_test doctest doc docs code linters_all code_src code_test doc_src doc_test paper
.PHONY: lint tags ltags test all lint_all codestyle docstyle server serve lint_src lint_test doctest doc docs code linters_all code_src code_test doc_src doc_test paper build dist pypi_push_test pypi_push pypi_test pip_test pypi pip

# Batched Commands
# - Code & Style Linters
all: linters_all test_all
lint: lint_src code_src doc_src
linters_all: doc code lint_all
Expand Down Expand Up @@ -34,47 +35,45 @@ PYDOCSTYLE_BASE=${PYTHON} -m pydocstyle
docstyle: docstyle_src docstyle_test
doc_src: docstyle_src
doc_test: docstyle_test
doc: docstyle
docs: docstyle
docstyle_src:
${PYDOCSTYLE_BASE} ${SRC}
docstyle_test:
${PYDOCSTYLE_BASE} ${TEST}

# Text Editor Commands
TAGS_BASE=ctags -R --python-kinds=-i
tags:
${TAGS_BASE} .
ltags:
${TAGS_BASE} ${SRC}

codetest:
${CODE_TEST}

codeall: code codetest


# PYDOCSTYLE
doc: docstyle
doc:
${DOC_SRC}


# TESTING
# Testing
test:
${PYTHON} -m unittest discover -v

testdoc:
${PYTHON} -m test.test --doctests-only

test_all: test testdoc


# SERVER MANAGEMENT
# Package Management
build:
rm -rf ./dist && rm -rf ./build && ${PYTHON} setup.py sdist bdist_wheel
dist: build
pypi_push_test:
make build && twine upload --repository-url https://test.pypi.org/legacy/ dist/*
pypi_push:
make build && twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
pypi_test: pypi_push_test
pip_test: pypi_push_test
pypi: pypi_push
pip: pypi_push

# Server Management
# - PMA2020 Linode Production Deployment, as of 2018/05
ssh:
ssh root@192.155.80.11



# Application Management
serve:server
server:
Expand Down
5 changes: 0 additions & 5 deletions pmix/__init__.py

This file was deleted.

151 changes: 0 additions & 151 deletions pmix/analytics.py

This file was deleted.

Loading

0 comments on commit 52be1af

Please sign in to comment.