-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DX: define developer environment with
uv
(#11)
Co-authored-by: GitHub <[email protected]>
- Loading branch information
Showing
20 changed files
with
2,187 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
set -ex | ||
curl -LsSf https://astral.sh/uv/install.sh | sh | ||
source $HOME/.cargo/env | ||
uv export \ | ||
--extra jupyter \ | ||
> requirements.txt | ||
uv pip install \ | ||
--requirement requirements.txt \ | ||
--system | ||
uv cache clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python-3.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,5 @@ indent_size = unset | |
[*.{py,toml}] | ||
indent_size = 4 | ||
|
||
[setup.cfg] | ||
[uv.lock] | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
layout anaconda | ||
uv sync --all-extras --quiet | ||
source .venv/bin/activate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Update | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: |- | ||
${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }} | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- epic/* | ||
paths: | ||
- .pre-commit-config.yaml | ||
- uv.lock | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lock: | ||
uses: ComPWA/actions/.github/workflows/lock.yml@v2 | ||
secrets: | ||
token: ${{ secrets.PAT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: PR linting | ||
on: | ||
pull_request: | ||
types: | ||
- edited | ||
- labeled | ||
- opened | ||
- reopened | ||
- synchronize | ||
- unlabeled | ||
|
||
jobs: | ||
lint-pr: | ||
uses: ComPWA/actions/.github/workflows/pr-linting.yml@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,4 @@ build/ | |
*.egg-info/ | ||
*.svg | ||
benchmark-results/ | ||
condaenv.*.requirements.txt | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,20 +9,6 @@ requires = [ | |
authors = [ | ||
{name = "Common Partial Wave Analysis", email = "[email protected]"}, | ||
] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: MIT License", | ||
"Natural Language :: English", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python", | ||
"Topic :: Software Development", | ||
"Typing :: Typed", | ||
] | ||
dependencies = [ | ||
"PyYAML", | ||
"jax", | ||
|
@@ -47,7 +33,7 @@ maintainers = [ | |
{name = "Common Partial Wave Analysis", email = "[email protected]"}, | ||
] | ||
name = "jax-mini-benchmark" | ||
requires-python = ">=3.9" | ||
requires-python = ">=3.12" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
|
@@ -64,7 +50,7 @@ jupyter = [ | |
"python-lsp-server[rope]", | ||
] | ||
sty = [ | ||
"pre-commit", | ||
"pre-commit-uv", | ||
"ruff", | ||
] | ||
|
||
|
@@ -88,6 +74,8 @@ jax_benchmark = ["py.typed"] | |
where = ["src"] | ||
|
||
[tool.setuptools_scm] | ||
local_scheme = "no-local-version" | ||
version_scheme = "only-version" | ||
write_to = "src/jax_benchmark/_version.py" | ||
|
||
[tool.pyright] | ||
|
@@ -98,6 +86,7 @@ exclude = [ | |
"**/.mypy_cache", | ||
"**/.pytest_cache", | ||
"**/.tox", | ||
"**/.venv/", | ||
"**/__pycache__", | ||
"**/_build", | ||
".ruff_cache/**", | ||
|
@@ -116,7 +105,6 @@ extend-include = ["*.ipynb"] | |
preview = true | ||
show-fixes = true | ||
src = ["src"] | ||
target-version = "py39" | ||
|
||
[tool.ruff.format] | ||
docstring-code-format = true | ||
|
@@ -202,6 +190,5 @@ sort_first = [ | |
"tool.setuptools", | ||
"tool.setuptools_scm", | ||
] | ||
sort_table_keys = true | ||
spaces_indent_inline_array = 4 | ||
trailing_comma_inline_array = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
from __future__ import annotations | ||
|
||
import argparse | ||
import os | ||
import socket | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
from __future__ import annotations | ||
|
||
import argparse | ||
import logging | ||
import timeit | ||
|
Oops, something went wrong.