A starter template for data science work using Pixi. Created by Brian Mc Donald
Replace this file with a README specific to your project
- Install Quarto, the tool/format for publishing to different formats
- Install Pixi to manage packages. On MacOS
curl -fsSL https://pixi.sh/install.sh | bashand on Windows Powershell:iwr -useb https://pixi.sh/install.ps1 | iex - Run
pixi init .to create a new Pixi project. It creates a pixi.toml and pixi.lock file. - Run
pixi add <packagename>to add pacakges. Example:pixi add python ruff polars matploltib requests - Do exploration in notebooks - ipynb's will keep cell output, which is good for exploratory analysis but is messy for version control.
- When code is maturing, move it to files in src. The examples can be changed as needed.
- Create quarto files for the analysis and formats you want, calling the code from src - dashboards, websites, pptx pdf.
- Run
quarto renderin the quarto directory to render the quarto files and check that the outputs appear in the Reports directory. - If you wish to publish a directory as a static site, you can use this Github Action to copy a directory to a gh-pages branch, which you can then configure using Github Pages.
- Run
ruff formatto format all files in a directory to keep your code clean. The Ruff VSCode extension is convenient. - Use .gitignore to exclude certain files and directories from version control. Definitely exclude .DS_Store, .pixi, .env. Consider excluding data, reports and notebooks.
- Use Pixi tasks to simplify running commands or scripts. Example
pixi task add cow cowpy "Hello User"orpixi task add fetch python data_get.py --option all, then runningpixi run coworpixi run fetch - Use
pixi updateorpixi upgradeto update package versions
