-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Init commit to bring datastore demo report into this repo as a base. * Update to functional version * Authentication: pass required info to datastore * updates * Getting things hooked back up. * Update deprecated pd.append to concat * Move summary rollup formatting to own function to fix downstream dependencies * Datastore version of report (works locally) * Exlude early withdrawal subjects * Update ReadME * Updated to get excel download working. Rename docker container * Debugginb api_json loading issues at TACC (works locally) * Add remaining tables to excel export --------- Co-authored-by: Frank Netscher <[email protected]> Co-authored-by: Chandra Y <[email protected]>
- Loading branch information
1 parent
59435ed
commit 9684e8e
Showing
15 changed files
with
840 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM python:3.7-slim | ||
FROM python:3.10 | ||
|
||
ENV PYTHONUNBUFFERED=TRUE | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,24 @@ | ||
# Generic Template Reporting for the A2CPS program | ||
Docker container of Dash App to display A2CPS trial Generic Template reporting metrics. | ||
# Monthly Enrollment report | ||
Report to plot monthly enrollments by site and surgery | ||
|
||
|
||
## Version History | ||
| Version | Date | Description | | ||
| ------ | ------ | ------ | | ||
| 0.0.1 | date | Status | | ||
|
||
|
||
# Development Previews | ||
|
||
Development previews are built upon commits to the master branch. If you wish to preview the latest | ||
build, you may use the `docker-compose.yml` file. On your local machine with Docker, run: | ||
|
||
``` | ||
docker-compose up --force-recreate | ||
``` | ||
|
||
Then browse to `localhost:8050` in your web browser. | ||
|
||
# Automatic Container Build information from parent repository. | ||
This repository was forked from the TACC [dash-container](https://github.com/TACC/dash-container) repo. | ||
|
||
## Configuring your repository for automatic container builds (text from original repo) | ||
|
||
### Github Actions workflows | ||
|
||
This repository comes with two Github Action workflows that automatically build Docker containers: | ||
|
||
- [build-pr](./github/workflows/build-pr) builds commit sha tagged | ||
images upon pull requests | ||
- [build-main](./github/workflows/build-main) builds a commit sha tagged and `:latest` tagged image upon | ||
pushes to main (such as when merging a pull request) | ||
|
||
Both require specific Github repo configuration. | ||
|
||
### Setting up a Dockerhub token | ||
|
||
You will need to create a token for the account that will be used to push your repo. | ||
|
||
- On [Dockerhub](https://hub.docker.com) go to your account's [security settings](https://hub.docker.com/settings/security). | ||
- Click the **New Access Token** button and type in a description | ||
- You will see a UUID value - this is your access token. Copy it immediately, as these can only | ||
be read upon creation. You will not see this token again. | ||
|
||
### Setting up a Github Actions environment | ||
|
||
You will need to create a build environment with secrets to contain Dockerhub settings. | ||
|
||
- In your Github repo, click on **Settings**. Then click on **Environments** | ||
- Click on the **New Environment** button and name this environment `docker`. (You can change the | ||
`environment` value in the workflows if you wish to call it something else or keep multiple environments) | ||
- At the bottom of the screen you will see **Environment Secrets**. Click the **Add Secret** button to create secrets. | ||
- Create a secret called `DOCKERHUB_TOKEN` and paste your Dockerhub token here | ||
- Create a secret called `DOCKERHUB_USERNAME` and put the name of the corresponding user here | ||
- Create a secret called `DOCKERHUB_REPO` and put your Docker repository name here. For example, this Github repo | ||
autobuilds images at `jchuahtacc/dash-container`, so that is the value that is used for `DOCKERHUB_REPO`. | ||
|
||
### Test it out | ||
|
||
Upon pull requests and pushes to main, you will see the workflows perform autobuilds. You can | ||
view the Action results by going to the **Actions** tag of your repo. You can also go to your [Dockerhub](https://hub.docker.com) page and make sure images are properly getting tagged and pushed | ||
| 0.0.1 | 2022 | Original verion | | ||
| 0.0.2 | 9/12/2023 | Conversion to Datastore model | | ||
|
||
|
||
## Data Transformation Description | ||
1. Report uses the data api for consented subjects | ||
2. 'Enrolled' subjects are defined as all consented subjects who have not withdrawn early from the program | ||
3. Records for each site and surgery are rolled up on a monthly basis based on the orginal consent date | ||
4. Actual enrollments are compared to expected enrollments that are defined according to the following table | ||
|
||
### Enrollment Expectations | ||
| MCC | Surgery | Start | Expected at Start | Additional Monthly | | ||
| ------ | ------ | ------ | ------ | ------ | | ||
| 1 | TKA | 2/22 | 280 | 30 | | ||
| 1 | Thoracic | 6/22 | 10 | 10 | | ||
| 2 | Thoracic | 2/22 | 70 | 30 | | ||
| 2 | TKA | 6/22 | 10 | 10 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
dash==2.0.0 | ||
dash-bootstrap-components==1.0.0rc1 | ||
dash==2.5.1 | ||
dash-bootstrap-components==1.1.0 | ||
dash-daq==0.5.0 | ||
dash-extensions==0.0.55 | ||
Flask==2.1.0 | ||
dash-extensions==0.0.71 | ||
Flask==2.1.2 | ||
gunicorn==20.0.4 | ||
pandas==1.3.4 | ||
plotly==5.3.1 | ||
numpy==1.20.1 | ||
pandas==1.3.5 | ||
plotly==5.9.0 | ||
numpy==1.21.6 | ||
requests | ||
xlsxwriter==1.4.3 | ||
xlsxwriter==3.0.3 | ||
Werkzeug==2.0.3 |
Empty file.
Oops, something went wrong.