Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ RUN curl -L -o /usr/local/bin/pixi -fsSL --compressed "https://github.com/prefix
USER vscode
WORKDIR /home/vscode

RUN echo 'eval "$(pixi completion -s bash)"' >> /home/vscode/.bashrc
RUN echo 'eval "$(pixi completion -s bash)"' >> /home/vscode/.bashrc
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
# numpy file format
*.npy filter=lfs diff=lfs merge=lfs -text
# GitHub syntax highlighting
pixi.lock linguist-language=YAML merge=ourslock
pixi.lock linguist-language=YAML merge=ourslock
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
10 changes: 10 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: pre-commit

on: [pull_request]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pre-commit/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
with:
pypi-token: ${{ secrets.PYPI_API_TOKEN }}
gh-token: ${{ secrets.GITHUB_TOKEN }}
parse-changelog: true
parse-changelog: true
44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# To use:
#
# pre-commit run -a
#
# Or:
#
# pre-commit install # (runs every time you commit in git)
#
# To update this file:
#
# pre-commit autoupdate
#
# See https://github.com/pre-commit/pre-commit

repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-added-large-files
# - id: check-ast
# - id: check-case-conflict
# - id: check-docstring-first
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
args: ['--unsafe'] # Fixes errors parsing custom jinja templates
# - id: debug-statements
- id: end-of-file-fixer
# - id: mixed-line-ending
# - id: trailing-whitespace
# - id: fix-byte-order-marker

# Formatter for python
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.3
hooks:
# Run the linter.
- id: ruff
types_or: [ python, pyi ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi ]
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"ryanluker.vscode-coverage-gutters",
"jjjermiah.pixi-vscode"
]
}
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
"/home/vscode/.local/lib/python3.10/site-packages/python_template/**": true
},
"python.analysis.autoImportCompletions": false //vscode gets it wrong more than right and mostly gets in the way
}
}
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@
## python_template

## [0.0.0]


3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,3 @@ There are two core tasks.
2. run \<cfg\>

This runs python with the file set in \<cfg\>



2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinxcontrib-napoleon
sphinx-rtd-theme
sphinx-autoapi
sphinx-autoapi
553 changes: 350 additions & 203 deletions pixi.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ test = [
"hypothesis>=6.104.2,<=6.116.0",
"ruff>=0.5.0,<=0.7.2",
"coverage>=7.5.4,<=7.6.4",
"pre-commit<=4.0.1"
]

[build-system]
Expand All @@ -60,6 +61,7 @@ py313 = ["py313","test"]


[tool.pixi.tasks]
pre-commit = "pre-commit run -a"
format = "black ."
check-clean-workspace = "git diff --exit-code"
ruff-lint = "ruff check . --fix"
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ echo 'eval "$(pixi completion --shell bash)"' >> ~/.bashrc

sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker || true
newgrp docker || true