add project formating and structure
|
|
@ -1,2 +0,0 @@
|
||||||
# ds1001_final
|
|
||||||
Repo for the Final Project for Foundations of Data Science Course
|
|
||||||
0
.gitignore → ds1001_final/.gitignore
vendored
81
ds1001_final/Makefile
Normal file
|
|
@ -0,0 +1,81 @@
|
||||||
|
#################################################################################
|
||||||
|
# GLOBALS #
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
PROJECT_NAME = ds1001_final
|
||||||
|
PYTHON_VERSION = 3.12.1
|
||||||
|
PYTHON_INTERPRETER = python
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# COMMANDS #
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
## Install Python dependencies
|
||||||
|
.PHONY: requirements
|
||||||
|
requirements:
|
||||||
|
$(PYTHON_INTERPRETER) -m pip install -U pip
|
||||||
|
$(PYTHON_INTERPRETER) -m pip install -r requirements.txt
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Delete all compiled Python files
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
find . -type f -name "*.py[co]" -delete
|
||||||
|
find . -type d -name "__pycache__" -delete
|
||||||
|
|
||||||
|
|
||||||
|
## Lint using ruff (use `make format` to do formatting)
|
||||||
|
.PHONY: lint
|
||||||
|
lint:
|
||||||
|
ruff format --check
|
||||||
|
ruff check
|
||||||
|
|
||||||
|
## Format source code with ruff
|
||||||
|
.PHONY: format
|
||||||
|
format:
|
||||||
|
ruff check --fix
|
||||||
|
ruff format
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Run tests
|
||||||
|
.PHONY: test
|
||||||
|
test:
|
||||||
|
python -m pytest tests
|
||||||
|
|
||||||
|
|
||||||
|
## Set up Python interpreter environment
|
||||||
|
.PHONY: create_environment
|
||||||
|
create_environment:
|
||||||
|
@bash -c "if [ ! -z `which virtualenvwrapper.sh` ]; then source `which virtualenvwrapper.sh`; mkvirtualenv $(PROJECT_NAME) --python=$(PYTHON_INTERPRETER); else mkvirtualenv.bat $(PROJECT_NAME) --python=$(PYTHON_INTERPRETER); fi"
|
||||||
|
@echo ">>> New virtualenv created. Activate with:\nworkon $(PROJECT_NAME)"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# PROJECT RULES #
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Self Documenting Commands #
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
.DEFAULT_GOAL := help
|
||||||
|
|
||||||
|
define PRINT_HELP_PYSCRIPT
|
||||||
|
import re, sys; \
|
||||||
|
lines = '\n'.join([line for line in sys.stdin]); \
|
||||||
|
matches = re.findall(r'\n## (.*)\n[\s\S]+?\n([a-zA-Z_-]+):', lines); \
|
||||||
|
print('Available rules:\n'); \
|
||||||
|
print('\n'.join(['{:25}{}'.format(*reversed(match)) for match in matches]))
|
||||||
|
endef
|
||||||
|
export PRINT_HELP_PYSCRIPT
|
||||||
|
|
||||||
|
help:
|
||||||
|
@$(PYTHON_INTERPRETER) -c "${PRINT_HELP_PYSCRIPT}" < $(MAKEFILE_LIST)
|
||||||
61
ds1001_final/README.md
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
# dsfinalproject
|
||||||
|
|
||||||
|
<a target="_blank" href="https://cookiecutter-data-science.drivendata.org/">
|
||||||
|
<img src="https://img.shields.io/badge/CCDS-Project%20template-328F97?logo=cookiecutter" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
repo for the final project of the DS 1001 course
|
||||||
|
|
||||||
|
## Project Organization
|
||||||
|
|
||||||
|
```
|
||||||
|
├── LICENSE <- Open-source license if one is chosen
|
||||||
|
├── Makefile <- Makefile with convenience commands like `make data` or `make train`
|
||||||
|
├── README.md <- The top-level README for developers using this project.
|
||||||
|
├── data
|
||||||
|
│ ├── external <- Data from third party sources.
|
||||||
|
│ ├── interim <- Intermediate data that has been transformed.
|
||||||
|
│ ├── processed <- The final, canonical data sets for modeling.
|
||||||
|
│ └── raw <- The original, immutable data dump.
|
||||||
|
│
|
||||||
|
├── docs <- A default mkdocs project; see www.mkdocs.org for details
|
||||||
|
│
|
||||||
|
├── models <- Trained and serialized models, model predictions, or model summaries
|
||||||
|
│
|
||||||
|
├── notebooks <- Jupyter notebooks. Naming convention is a number (for ordering),
|
||||||
|
│ the creator's initials, and a short `-` delimited description, e.g.
|
||||||
|
│ `1.0-jqp-initial-data-exploration`.
|
||||||
|
│
|
||||||
|
├── pyproject.toml <- Project configuration file with package metadata for
|
||||||
|
│ scripts and configuration for tools like black
|
||||||
|
│
|
||||||
|
├── references <- Data dictionaries, manuals, and all other explanatory materials.
|
||||||
|
│
|
||||||
|
├── reports <- Generated analysis as HTML, PDF, LaTeX, etc.
|
||||||
|
│ └── figures <- Generated graphics and figures to be used in reporting
|
||||||
|
│
|
||||||
|
├── requirements.txt <- The requirements file for reproducing the analysis environment, e.g.
|
||||||
|
│ generated with `pip freeze > requirements.txt`
|
||||||
|
│
|
||||||
|
├── setup.cfg <- Configuration file for flake8
|
||||||
|
│
|
||||||
|
└── scripts <- Source code for use in this project.
|
||||||
|
│
|
||||||
|
├── __init__.py <- Makes scripts a Python module
|
||||||
|
│
|
||||||
|
├── config.py <- Store useful variables and configuration
|
||||||
|
│
|
||||||
|
├── dataset.py <- Scripts to download or generate data
|
||||||
|
│
|
||||||
|
├── features.py <- Code to create features for modeling
|
||||||
|
│
|
||||||
|
├── modeling
|
||||||
|
│ ├── __init__.py
|
||||||
|
│ ├── predict.py <- Code to run model inference with trained models
|
||||||
|
│ └── train.py <- Code to train models
|
||||||
|
│
|
||||||
|
└── plots.py <- Code to create visualizations
|
||||||
|
```
|
||||||
|
|
||||||
|
--------
|
||||||
|
|
||||||
|
Can't render this file because it is too large.
|
0
ds1001_final/data/raw/.gitkeep
Normal file
0
ds1001_final/docs/.gitkeep
Normal file
8
ds1001_final/finalproj/bin/chardetect
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/workspaces/ds1001_final/finalproj/bin/python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
from chardet.cli.chardetect import main
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||||
|
sys.exit(main())
|
||||||
8
ds1001_final/finalproj/bin/cookiecutter
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/workspaces/ds1001_final/finalproj/bin/python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
from cookiecutter.__main__ import main
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||||
|
sys.exit(main())
|
||||||
8
ds1001_final/finalproj/bin/markdown-it
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/workspaces/ds1001_final/finalproj/bin/python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
from markdown_it.cli.parse import main
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||||
|
sys.exit(main())
|
||||||
8
ds1001_final/finalproj/bin/slugify
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/workspaces/ds1001_final/finalproj/bin/python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
from slugify.__main__ import main
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||||
|
sys.exit(main())
|
||||||
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |