cross language & cross platform
2024-12-03
https://github.com/knaaptime/rypyrx
pixi
and quarto
.devcontainer
and .github
configuration filesthis is a template repository; you can run it as-is to get a feel for the workflow, or clone and edit for your needs
go somewhere on your computer you keep your projects, then clone (or fork then clone to run from your own copy)
cd projects
git clone https://github.com/knaaptime/rypyrx.git
To open this repository exactly as it appears, just click the button
(you can use the same config elsewhere than github, but this is is nice)
wait for the VM to finish building, then click the plus to open a new terminal
then continue with the pixi run
commands
(currently you need pixi run quarto render paper --latex-engine=tectonic
or similar because pixi’s sandboxing gets in quarto’s way of finding tinytex 🤷♂️)
if you want to start a github codespace from another project (like if you forked your own version of this repo)
click ‘reopen in container’
if you need to add/change dependencies, edit the pixi.toml
file
notebooks
directoryI like jupyter notebooks for doing my main analysis
pixi.toml
file includes both Python and R kernels
install.packages
, but you won’t have the lockfile for those packages…pixi run jupyter lab
use quarto
to manage file execution order and generate outputs
paper
directorythis directory stores a standalone quarto project
_quarto.yml
file to include any pieces you need executedinclude
s to wrap them togetherI use a single index.qmd file as the main source document, then include each section as a different file
paper
directorypixi run quarto render paper
the output will be rendered to the default location at paper/_manuscript/
configure any preferences in the _quarto.yml file. Mine are
index.html
to make it easier to serveThere is a preconfigured github-action recipe in the .github
directory that will serve a static website from the slides
directory
(edit the names if you like, but i usually have slides to publish). Anything in this directory will be served, so you can also toss your paper in pdf/html in here when it’s ready for the public
one small config:
pages
settingsuse github actions
the config file is already setup. You’re done.
the slides
directory is another standalone quarto
project
index.qmd
file in slides
pixi run quarto render slides
commit everything you want public in slides
, then push it up.
cd slides
git add .
git commit -m 'add slides'
git push
everything will be available at https://{{yourgithubname}}.github.io/{{yourprojectname}}
use quarto extensions to make this look nice.
Elijah Knaap, Center for Open Geographical Science @ SDSU