MALMan

From Voidwarranties - Hackerspace Antwerp, Belgium
(Difference between revisions)
Jump to: navigation, search
(1.97)
(Move some listed todo items to github's issue tracker)
 
(12 intermediate revisions by 2 users not shown)
Line 71: Line 71:
  
 
=MALMan v2=
 
=MALMan v2=
 
==Dependencies==
 
* In arch linux you should install those packages (most of them are in AUR, a few of them are in the main repositories):
 
**python2
 
**python2-flask
 
**python-flask-login
 
**python-flask-principal
 
**python2-itsdangerous
 
**python2-passlib
 
**python2-flask-mail
 
**python2-blinker
 
**python-flask-wtf
 
**python-flask-sqlalchemy
 
**python-flask-uploads
 
**mysql-python
 
  
 
== Implementatie ==
 
== Implementatie ==
Line 97: Line 82:
 
* flask-upload: uploading files
 
* flask-upload: uploading files
  
== Roadmap ==
+
== API ==
 +
MALMan exposes a RESTful api to be used by the cash register. These resources are secured with HTTP Basic Auth, as defined in MALMan's config.
  
=== 1.96 ===
+
{| class="wikitable"
Reach feature parity with MALMan 1
+
|-
* <strike>communicate with VWCR</strike>
+
! URI !! method !! args !! use
 +
|-
 +
|style=white-space:nowrap| /api/stock
 +
| GET
 +
| None
 +
| Returns active stockitems as a json formatted array.  
 +
|-
 +
|style=white-space:nowrap| /api/user
 +
| GET
 +
| None
 +
| Returns members with positive bar accounts as a json formatted array.
 +
|-
 +
|style=white-space:nowrap| /api/user/<user_id>  
 +
| GET
 +
| password, as a query string parameter
 +
| Returns a user's account balance as a float if user and password match, returns "False" otherwise.
 +
|-
 +
|style=white-space:nowrap| /api/purchase
 +
| POST
 +
| item_id & user_id (optional), as POST data key-value pairs 
 +
| Registers a purchase in the bar log. Link it to the users bar account or a cash transaction depending on if a user is specified.
 +
|}
  
exceptions:
+
== To do ==
* kasboeken, dagboeken (if requestes, we have two weeks to produce these)
+
We mainly use Github to track issues are migrating this list to: https://github.com/voidwarranties/MALMan/issues?state=open
  
=== 1.97 ===
+
=== UX ===
All functionality intented to be in MALMan is implemented
+
* write a decent confirmation email upon registration
 +
* add notifications for certain events
 +
** membership request is accepted
 +
** notify members with member managment role of membership requests
 +
** notify members with finances role of reimbursement requests
 +
* add filtering to tables where needed
 +
** bar log
 +
** cash log
 +
* improve graphical design
 +
** use symbolic icons
 +
* make vield failing validation more visible
 +
** add a red border around the input element
 +
* improve the menu: the current page is not discernable in the menu
  
* add pages 'dagboek' and 'kasboek'
+
=== bugs ===
* improve communication with vwcr
+
* if you upload multiple files at once, and one has an extension that is not whitelisted the validator does not work and you will get an werkzeug error.
** merge vwcr-server into MALMan
+
* we don't save whom a user payed when he files a reimbursement request
** use a REST api
+
** serialize objects using pickle
+
** secure the communication between vwcr and MALMan
+
  
* <strike>add an 'active' field for stock items instead of removing them</strike>
+
=== code cleanup ===
** <strike>set active stock items to inactive through MALMan</strike>
+
* somehow the textarea tag around the motivation field is sent along and written to the DB. these tags are then stripped in the view by using the striptag filter. This doesn't happen when using the TextAreaField outside flask_security
** <strike>set inactive stock items to active through MALMan</strike>
+
* The content of confirmation flashes is often incorrect, check the way we construct these messages when processing POSTs
 +
* checklist:
 +
** all HTML, CSS & javascript validates
 +
** consistent whitespace in produced HTML
 +
** code duplication is kept to a minimum, recurring blocks of code are replaced by functions
 +
** the number of times we read from the DB is kept to a minimum
 +
** the number of times we write to the DB (db.session.commit()) is kept to a minimum
 +
** all POST request return an HTTP 302 redirrect (to prevent data from being submitted twice if users refresh the page)
 +
** all POSTs are validated by form.validate_on_submit()
 +
** the necessary validators are assigned to every form field
 +
** all input elements are defined by WTF instead of in the html template
 +
** check the way forms are initialized and fields are dynamically set
  
* improve attachments
+
== Roadmap ==
** <strike>add attachment functionality to add_transaction and edit_transaction</strike>
+
 
** <strike>possibility to remove attachments</strike>
+
===1.96===
** <strike>add multiple attachments in edit_transaction</strike>
+
Goal: feature parity with MALMan 1
** ability to reuse a previous transaction's attachment
+
exceptions: kasboeken, dagboeken (if requestes, we have two weeks to produce these)
** remove and add attachment functionality when approving reimbursements
+
 
 +
=== 1.97 ===
 +
Goal: MALMan is usable for all its intended purpuses.
  
* <strike>serve MALMan as a wsgi app</strike>
 
* <strike>make script to translate an SQL dump from MALMan1 into a format understood by MALMan2</strike>
 
* select members in a transactions 'to/from' field
 
* make removing members possible (delete private data from the users table)
 
* store membership as a role, or as a boolean, but not both
 
* <strike>bug: url's are relative and fail when we serve from a subdirectory
 
** might solve this by using url_for</strike>
 
  
 
=== 1.98 ===
 
=== 1.98 ===
Give MALMan a decent user interface.
+
Goal: MALMan has a decent user interface.
* write a decent confirmation email upon registration
+
* add notifications
+
* add filtering to tables where needed
+
  
 
=== 1.99 ===
 
=== 1.99 ===
 
Close all outstanding bugs, refactoring, final security check.
 
Close all outstanding bugs, refactoring, final security check.
* make functions for recurring blocks of code
 
* write to the DB as few times as possible
 
* <strike>import flask_security instead of copying its code (remove ~2000 LOC)</strike>
 
* change attachement name to ''{attachment_id}''.''{extention}''
 
* bug: if you upload multiple files at once, and one has an extension that is not whitelisted the validator does not work and you will get an werkzeug error.
 
  
 
=== 2.0 ===
 
=== 2.0 ===
Line 156: Line 170:
  
 
= Code share omgeving =
 
= Code share omgeving =
*De code komt op een subversion branch (SVN): http://discuss.voidwarranties.be/svn/MALMan (er komt nog een kleine howto over hoe je dit kan gebruiken). Annoniem kan je lezen, mensen die willen contributen kunnen een login aanvragen.
+
*De code komt op github: https://github.com/voidwarranties/MALMan (er komt nog een kleine howto over hoe je dit kan gebruiken). Annoniem kan je lezen, mensen die willen contributen kunnen een pull request aanmaken.
*Een kleine tutorial over hoe je SVN kan gebruiken staat op [[MALMan/SVN]].
+

Latest revision as of 17:01, 8 June 2013


MALMan
What:
MALMan herschrijven
Coding.gif
Participants:
Koert, User:Warddr, Koen, Berz
Category:
Coding
Locations:
Den Bunker

Contents

Omschrijving

MALMan (Members Accounting Library Management) moet in de eerste plaats een tool worden om:

Hoewel de kassa een apart programma is (vwcr) zit het mee in de repository van MALMan omdat het nauw verbonden is met MALMan (o.a. dezelfde database). Het zou ook tof zijn als we ergens een plaats hadden om gegevens bij te houden waar leden aan moeten kunnen, maar die we liever niet gewoon op de wiki zetten (logins voor verschillende systemen bijvoorbeeld).

Wishlist

Boekhouding

Het belangrijkste aspect van MALMan: onze boekhouding kunnen bijhouden.

Ledenbestand

Heel dringend want in de huidige MALMan werkt dit voor geen meter, waardoor er vanalles misloopt... Een deftig ledenbestand hebben is naast gemakkelijk ook tamelijk wettelijk verplicht. We hebben ook een plek nodig om bij te houden wie wat mag doen in MALMan, dit is daar de meest voor de hand liggende plek voor.

Inventaris

Niet het dringendste deel van MALMan, maar ik zou het er uiteindelijk toch graag in hebben, voor de jaarrekening en de stock van de kassa hebben we sowieso toch een iets in die richting nodig.

Kassa

De kassa wordt niet geïntegreerd in MALMan maar VWCR wordt herschreven. Er zou in MALMan wel een api komen waar VWCR gebruik van kan maken.

Plek om niet-voor-iedereen-toegankelijke informatie bij te houden

We hebben een plek nodig om informatie bij te houden (zoals logins) waar alleen leden aan moeten kunnen. In het verleden is er al een paar keer geopperd om daar MALMan voor te gebruiken, aangezien dat er daar altijd (in theorie dan toch) de recentste lijst in zit van wie daar dan aan moet kunnen en alle leden daar toch al (in theorie dan toch) een login voor hebben.

Uitleningen

MALMan v2

Implementatie

MALMan is a wsgi webapp that can be served by webservers with wsgi support (Apache, nginx). We use make use of Flask, a lightweight web application framework written in Python and based on the Werkzeug WSGI toolkit and Jinja2 template engine. We complement this with several Flask plugins:

API

MALMan exposes a RESTful api to be used by the cash register. These resources are secured with HTTP Basic Auth, as defined in MALMan's config.

URI method args use
/api/stock GET None Returns active stockitems as a json formatted array.
/api/user GET None Returns members with positive bar accounts as a json formatted array.
/api/user/<user_id> GET password, as a query string parameter Returns a user's account balance as a float if user and password match, returns "False" otherwise.
/api/purchase POST item_id & user_id (optional), as POST data key-value pairs Registers a purchase in the bar log. Link it to the users bar account or a cash transaction depending on if a user is specified.

To do

We mainly use Github to track issues are migrating this list to: https://github.com/voidwarranties/MALMan/issues?state=open

UX

bugs

code cleanup

Roadmap

1.96

Goal: feature parity with MALMan 1 exceptions: kasboeken, dagboeken (if requestes, we have two weeks to produce these)

1.97

Goal: MALMan is usable for all its intended purpuses.


1.98

Goal: MALMan has a decent user interface.

1.99

Close all outstanding bugs, refactoring, final security check.

2.0

Work completed!

bugs

Code share omgeving

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Content Creation
Belgian Spaces