unittests: (we are proudly untested [TM])
FabLabKasse, a Point-of-Sale Software for FabLabs and other public and trust-based workshops
This software is not ready for generic use by other FabLabs. Currently, too many features are tailored for the specific use-case of FAU FabLab. If you want to adapt this software for your use, please get in contact and also consider a complete rewrite.
Please see https://fablabkasse.readthedocs.io for the documentation
If you are a member of the FAU FabLab, please first read the internal overview: https://github.com/fau-fablab/FabLabKasse-interna/blob/master/README.md
It contains important information on the FAU FabLab specific configuration and add-ons.
Please checkout the repository recursively since it contains submodules:
git clone --recursive git@github.com:fau-fablab/FabLabKasse.git
If you want to test on a VM, take a look at README_Vagrant.md on how to automatically set up a Virtualbox VM for testing.
See INSTALLING.md for detailed instructions on how to install the required dependencies. You can skip the configuration stuff for later.
Then, for the first try, you can just do:
./run.py --example
Have fun and give feedback!
The demo VM starts placeholder software for the receipt printing and the FAUCard payment (if the custom plugin is installed).
Otherwise, you can start this manually.
./tools/dummy-printserver
to roughly see how a receipt printer's output would look. Please note that receipt printing is not yet implemented on all shopping backends, also not in the example config../run.py --debug
or gui.py --debug
attaches a debugger (FIXME: not implemented, placeholder warning only) and disables the graphical exception-hook.
All contributions should have a good coding style:
We use black for formatting. You can use a dockerized black instance with the container_black.sh shell script. Use it as you would black:
# format everything
./container_black.sh .
The provided VS Code setting calls this script in order to make sure that you can format with the same version of black. When updating the version, make sure that you change it in both the GitHub Workflow and the container script.
write reStructuredText formatted function docstrings, example:
def do_something(value):
"""
do something magic with value
:return: True if the sun shines tomorrow, False otherwise
:rtype: bool
:param value: your telephone number
:type value: str
"""
for the docstrings, use the type syntax as defined at https://www.jetbrains.com/pycharm/help/type-hinting-in-pycharm.html#d301935e18526
def main():
print "Hello, this is yourscript.py"
do_something()
if __name__ == "__main__":
main()
FabLabKasse/example_unittest.py
for a working example.LICENSE
)git merge --no-ff
, standard behaviour of Github pull requests).git/config
in order to support merging of the hypothesis-database:
[merge "hypothesisdb"]
name = Hypothesis database files
driver = python -m hypothesis.tools.mergedbs %O %A %B
Please start your commit messages with FIX / ADD / IMPROVE / REFACTOR / DOC if it is possible and makes sense:
ADD clear-cart-button to user interface
IMPROVE payment_methods: add assertions and logging for payments
REFACTOR usage of AbstractShoppingBackend.delete_current_order()
FIX crash when loading cart from app
DOC: better docstrings for AbstractShoppingBackend