Skip to content

Commit 5ef5c53

Browse files
authored
Merge pull request #1 from OHNLP/database
DB setup & data quality checks
2 parents bb9bf6a + c2a825a commit 5ef5c53

22 files changed

+5493
-8382
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,6 @@ data/
178178

179179
# references
180180
references/
181+
182+
# datajoint
183+
dj_local_c*.json

README.md

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,6 @@
11
# Activity tracker
22

3-
## Project Organization
4-
5-
```
6-
├── LICENSE <- Open-source license if one is chosen
7-
├── README.md <- The top-level README for developers using this project.
8-
├── data
9-
│ ├── external <- Data from third party sources.
10-
│ ├── interim <- Intermediate data that has been transformed.
11-
│ ├── processed <- The final, canonical data sets for modeling.
12-
│ └── raw <- The original, immutable data dump.
13-
14-
├── docs <- A default mkdocs project; see www.mkdocs.org for details
15-
16-
├── models <- Trained and serialized models, model predictions, or model summaries
17-
18-
├── notebooks <- Jupyter notebooks. Naming convention is a number (for ordering),
19-
│ the creator's initials, and a short `-` delimited description, e.g.
20-
│ `1.0-jqp-initial-data-exploration`.
21-
22-
├── pyproject.toml <- Project configuration file with package metadata for
23-
│ nlp_project_template and configuration for tools like black
24-
25-
├── references <- Data dictionaries, manuals, and all other explanatory materials.
26-
27-
├── reports <- Generated analysis as HTML, PDF, LaTeX, etc.
28-
│ └── figures <- Generated graphics and figures to be used in reporting
29-
30-
├── requirements.txt <- The requirements file for reproducing the analysis environment, e.g.
31-
│ generated with `pip freeze > requirements.txt`
32-
33-
├── .env <- Store environment variables
34-
35-
├── setup.cfg <- Configuration file for flake8
36-
37-
├── sql <- Store sql queries
38-
39-
├── scratch <- Temporary or experimental code or files
40-
41-
├── setup.cfg <- Configuration file for flake8│
42-
43-
└── src/nlp_project_template <- Source code for use in this project.
44-
45-
├── __init__.py <- Makes nlp_project_template a Python module
46-
47-
├── config.py <- Store useful variables and configuration
48-
49-
├── dataset.py <- Scripts to download or generate data
50-
51-
├── features.py <- Code to create features for modeling
52-
53-
├── modeling
54-
│ ├── __init__.py
55-
│ ├── predict.py <- Code to run model inference with trained models
56-
│ └── train.py <- Code to train models
57-
58-
└── plots.py <- Code to create visualizations
59-
```
60-
61-
---
3+
![Database Schema](img/schema.svg)
624

635
### Create a virtual environment with:
646

docker/docker-compose.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This is for setting up an local testing environment.
2+
# Move to this folder and run the following commands:
3+
# docker-compose up -d
4+
# docker-compose down --volumes
5+
# docker exec -it datajoint-local mysql -uroot -psimple
6+
# docker exec -it datajoint-local bash
7+
# mysqld --verbose --help | grep bind-address
8+
9+
# Some Errors with Docker?
10+
# Macbook M1 and M2 chips requires passing the platform environment.
11+
12+
# In a case that youe encounter such errors do export this to your
13+
# environment before running the docker-compose commands above.
14+
15+
# docker pull --platform linux/x86_64 mysql
16+
17+
version: "3.3"
18+
19+
services:
20+
db:
21+
container_name: datajoint-local
22+
platform: linux/x86_64
23+
image: mysql:5.7.40
24+
restart: always
25+
environment:
26+
MYSQL_ROOT_PASSWORD: simple
27+
command: --default-authentication-plugin=mysql_native_password --innodb-buffer-pool-size=512M --max-allowed-packet=64M
28+
ports:
29+
- "3306:3306"
30+
volumes:
31+
- mysql:/var/lib/mysql
32+
adminer:
33+
image: adminer
34+
restart: always
35+
ports:
36+
- 8080:8080
37+
38+
volumes:
39+
mysql:

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dependencies:
1313
- numpy
1414
- ipykernel
1515
- pip:
16+
- datajoint
1617
- openpyxl
1718
- plotly
1819
- python-dotenv

img/schema.svg

Lines changed: 61 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)