Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seattleflu/husky-musher
A redirecting service for the Husky Coronavirus Testing study
https://github.com/seattleflu/husky-musher
Last synced: about 2 months ago
JSON representation
A redirecting service for the Husky Coronavirus Testing study
- Host: GitHub
- URL: https://github.com/seattleflu/husky-musher
- Owner: seattleflu
- Created: 2020-09-05T01:01:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-15T23:09:42.000Z (over 2 years ago)
- Last Synced: 2024-04-30T08:06:35.272Z (8 months ago)
- Language: Python
- Size: 288 KB
- Stars: 2
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# husky-musher
A redirecting service for the Husky Coronavirus Testing study## Running locally
Run the Flask app with:
```sh
pipenv run flask run
```The default is to use the production REDCap project (i.e. when `FLASK_ENV` is
unset or `FLASK_ENV=production`). In this mode, the authenticated user and
their information is expected to be provided in the request
environment/context, i.e. by Apache/Shibboleth.To use the testing/development REDCap project instead, set
`FLASK_ENV=development`. In this mode, the "authenticated" user and their
information is provided in the process environment as normal environment
variables. For example:```sh
FLASK_ENV=development \
[email protected] \
uid=trsibley \
givenName=Thomas \
surname=Sibley \
pipenv run flask run
```You will also need to setup a logfile at `/var/log/husky_musher/husky_musher.log` and make sure
that the user running the application has write permissions to the file.## Requirements
See Pipfile for required libraries.The required environment variables are:
* `REDCAP_API_TOKEN_hct.redcap.rit.uw.edu_148` (production)
* `REDCAP_API_TOKEN_hct.redcap.rit.uw.edu_139` (development)## Tests
Run doctests on the utils functions with:
```sh
FLASK_ENV=development envdir pipenv run python3 -m doctest lib/husky_musher/utils/*
```Run unit tests with:
```sh
FLASK_ENV=development envdir pipenv run python -m unittest lib/husky_musher/tests/*
```Note that although running the tests accesses the redcap envdir (specifically `REDCAP_API_URL`), it does not use these variables to connect to a project,
so dummy environment variables can be used if desired.## Attributions
"[Paw Print](https://thenounproject.com/search/?q=dog+paw&i=3354750)" icon By Humantech from [the Noun Project](http://thenounproject.com/).