Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lhjohn committed Dec 17, 2024
0 parents commit 799dcae
Show file tree
Hide file tree
Showing 8 changed files with 195 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
push:
branches:
- '**'
pull_request:
branches:
- '**'

env:
UV_SYSTEM_PYTHON: 1

jobs:
uv-example:
name: python
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Set up Python
run: uv python install

- name: Install the project
run: uv sync --all-extras --dev

- name: Run tests
run: uv run pytest tests
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Python-generated files
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info

# Virtual environments
.venv

# Project files
.idea/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
Empty file added README.md
Empty file.
6 changes: 6 additions & 0 deletions hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def main():
print("Hello from context!")


if __name__ == "__main__":
main()
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[project]
name = "context"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"numpy>=2.2.0",
"torch>=2.5.1+cpu",
]

[dependency-groups]
dev = [
"pytest>=8.3.4",
]

[tool.uv.sources]
numpy = { index = "numpy" }
torch = { index = "pytorch" }

[[tool.uv.index]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cpu"

[[tool.uv.index]]
name = "numpy"
url = "https://pypi.org/simple"
3 changes: 3 additions & 0 deletions tests/test_edge-list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

def test_addition():
assert (1 + 1) == 2
113 changes: 113 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 799dcae

Please sign in to comment.