Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ use flake

dotenv

ninja .venv
export VIRTUAL_ENV="${PWD}/.venv"
PATH_add .venv/bin
# layout uv
# based on https://github.com/direnv/direnv/pull/1352
watch_file .python-version pyproject.toml uv.lock
uv sync --all-extras --all-packages --dev
Comment thread
jeremyschlatter marked this conversation as resolved.
source_env .venv/bin/activate

MATPLOTLIBRC=$(expand_path matplotlibrc)
export MATPLOTLIBRC
11 changes: 4 additions & 7 deletions build.ninja
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
rule uv_sync
command = uv sync --all-extras --all-packages --dev
build python_deps: phony pyproject.toml uv.lock .python-version

rule hello
command = uv run hello $out
Expand All @@ -11,12 +10,10 @@ rule latexmk
rule typst_compile
command = typst compile --ignore-system-fonts $in $out

build .venv: uv_sync

# TODO: replace the /template/ with the actual project name
# XXX: Update when python or data dependencies change
build paper-latex/hello.pdf: hello | .venv pyproject.toml src/template/hello.py src/template/stuff.py
build paper-typst/hello.svg: hello | .venv pyproject.toml src/template/hello.py src/template/stuff.py
# XXX: Update when data dependencies change
build paper-latex/hello.pdf: hello | python_deps src/template/hello.py src/template/stuff.py
build paper-typst/hello.svg: hello | python_deps src/template/hello.py src/template/stuff.py

build figures: phony paper-latex/hello.pdf paper-typst/hello.svg

Expand Down
2 changes: 1 addition & 1 deletion paper-typst/hello.svg

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No visual diff, just a metadata change:

diff --git a/paper-typst/hello.svg b/paper-typst/hello.svg
index 542ceec..77d2826 100644
--- a/paper-typst/hello.svg
+++ b/paper-typst/hello.svg
@@ -10,7 +10,7 @@
     <dc:format>image/svg+xml</dc:format>
     <dc:creator>
      <cc:Agent>
-      <dc:title>Matplotlib v3.10.0, https://matplotlib.org/</dc:title>
+      <dc:title>Matplotlib v3.10.8, https://matplotlib.org/</dc:title>
      </cc:Agent>
     </dc:creator>
    </cc:Work>

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading