GitXplorerGitXplorer
f

donors_registry

public
5 stars
6 forks
6 issues

Commits

List of commits on branch master.
Unverified
b4287e158f69e799fdfa40b27680f8db83878e91

Update dependencies

ffrenzymadness committed a month ago
Unverified
0ae9622b6497b024606b2a105eb1ea584bdfdebd

Fix copy-paste error "All" → "Všechny"

ffrenzymadness committed 2 months ago
Unverified
afaf260661292626b44f8d8a7b156ed78a7a4d18

Define lengthMenu for DataTables pagination

ffrenzymadness committed 2 months ago
Unverified
aefae96d55472a403bf58390f401322e5a333e64

updated requirements to latest versions using tox

sspidermila committed 2 months ago
Unverified
8096c6162915f711c46be0c41376a21dd3570e69

Make sure samples of RCs are uniformy distributed among DCs

ffrenzymadness committed 5 months ago
Unverified
de07e130e4f3b649183ee389ab979e3d174d9517

Only some DCs send data with increments

ffrenzymadness committed 5 months ago

README

The README file for this repository.

donors_registry

Registry of blood donors for Czech Red Cross in Frýdek-Místek.

Instalation

  1. Create and activate a new virtual environment
  2. Install all development dependencies via pip install -r requirements/dev.txt
  3. Prepare a new database and apply all existing migrations via flask db upgrade
  4. Add a user account via flask create-user <email> <password>
  5. You can install anonymized test data via flask install-test-data (needs empty database and with all migrations applied)
  6. run the app with FLASK_DEBUG=1 flask run or on Windows with set FLASK_DEBUG=1 and then flask run

Database

SQLite database we are currently using has very limited support for ALTER TABLE… SQL queries so we need to modify the historical migrations from time to time. If you have any issue with the database, try removing the .sqlite file first and then repeat the last four steps from above.

Our plan is to switch to a more robust database system when switching to production use.

Testing

Tests use pytest and are configured via tox. To run all of them, simply install and execute tox.

If you want to prevent tests failing because of linter issues, you can use pre-commit which automatically runs linters before every commit (this doesn't work on Windows)

  1. To activate it install pre-commit using pip install pre-commit or you can install all extra requirements via pip install -r requirements/extra.txt.
  2. Then run pre-commit install
  3. After that linters should run before every commit.

Code coverage is measured by coverage Python package. It's automatically measured for the last tox environment with a report at the very end of the output. If you want to run it manually, use coverage run -m pytest and then coverage report to see the results in the command line or coverage html which produces folder htmlcov with more interactive results.