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
9 changes: 5 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ runs:
# The default image natively supports bash, c/c++, dotnet, go, java, julia, python, ruby, rust
# For new languages, see https://github.com/actions/runner-images/blob/5dd62e7/images/linux first

- uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ inputs.python-version }}
cache: pip
version: "0.8.22"
enable-cache: true

- name: deps-python
run: pip install --user -r requirements.txt
run: uv sync --locked --all-extras --dev
shell: bash

- uses: denoland/setup-deno@v2
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ aoc commands are:

### Installation

This project runs using [`uv`](https://github.com/astral-sh/uv)

```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Install deps
uv sync

# And now aoc can work
./aoc run
```
Expand Down Expand Up @@ -129,7 +131,7 @@ To participate, you'll have to create your own files containing your solutions (
create them).

You can add other functions & modules if you need to. Any external dependency should be added to the appropriate files
(`requirements.txt`, `package.json`, and so on).
(`pyproject.toml`, `package.json`, and so on).

Once you tested your solution you can submit it by making a PR and a GitHub action will check that your code generates
the same outputs as others' code.
Expand Down
2 changes: 1 addition & 1 deletion aoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env -S uv run --script

from tool.AOC import AOC

Expand Down
16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[project]
name = "adventofcode-2024"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"Cython>=0.29.32",
"numpy>=1.23.5,<2",
"pytest==7.4.3",
"tabulate>=0.9.0,<1",
"Jinja2>=3.1.2",
"sympy==1.12",
"networkx==3.4.2",
"pathos==0.3.3",
]
8 changes: 0 additions & 8 deletions requirements.txt

This file was deleted.

278 changes: 278 additions & 0 deletions uv.lock

Large diffs are not rendered by default.