This is a template repository for the individual assignment on Quarto reproducible reports using Python from the DSCI 522 (Workflows for data science) course. Instructions for this assignment can be found on the DSCI 522 course website.
If you are using Windows or Mac, make sure Docker Desktop is running.
- Clone this GitHub repository.
- Navigate to the root of this project on your computer using the command line and enter the following command:
docker compose up
- In the terminal, look for a URL that starts with
http://127.0.0.1:8888/lab?token=
(for an example, see the highlighted text in the terminal below). Copy and paste that URL into your browser.
- To run the analysis, open a terminal (in the docker jupyter lab) and run the following commands:
python scripts/generate_figures.py --input_dir="data/00030067-eng.csv" \
--out_dir="results"
quarto render reports/qmd_example.qmd --to html
quarto render reports/qmd_example.qmd --to pdf
- To shut down the container and clean up the resources,
type
Cntrl
+C
in the terminal where you launched the container, and then typedocker compose rm
conda
(version 23.9.0 or higher)conda-lock
(version 2.5.7 or higher)
-
Add the dependency to the
environment.yml
file on a new branch. -
Run
conda-lock -k explicit --file environment.yml -p linux-64
to update theconda-linux-64.lock
file. -
Re-build the Docker image locally to ensure it builds and runs properly.
-
Push the changes to GitHub. A new Docker image will be built and pushed to Docker Hub automatically. It will be tagged with the SHA for the commit that changed the file.
-
Update the
docker-compose.yml
file on your branch to use the new container image (make sure to update the tag specifically). -
Send a pull request to merge the changes into the
main
branch.
The non-software content of this template repository is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) License. The software content of this template repository licensed under the MIT License. See the license file for more information.