Skip to content

Commit

Permalink
Merge branch 'feature/import'
Browse files Browse the repository at this point in the history
  • Loading branch information
blooop committed Oct 8, 2024
2 parents 4eb6081 + c9c39e1 commit c156e1c
Show file tree
Hide file tree
Showing 39 changed files with 1,229 additions and 453 deletions.
14 changes: 14 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM mcr.microsoft.com/devcontainers/python:0-3.10

RUN apt-get update && apt install git-lfs

RUN python -m pip install --upgrade pip \
&& python -m pip install 'flit>=3.8.0'

ENV FLIT_ROOT_INSTALL=1

COPY pyproject.toml .
RUN touch README.md \
&& mkdir -p src/deps_rocker \
&& python -m flit install --only-deps --deps develop \
&& rm -r pyproject.toml README.md src
27 changes: 27 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "deps_rocker",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
// "onCreateCommand": "pre-commit install --hook-type commit-msg",
"postCreateCommand": "flit install --symlink;",
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.pylint",
"ms-python.black-formatter",
"njpwerner.autodocstring",
"charliermarsh.ruff",
"mhutchie.git-graph",
"eamodio.gitlens",
"tamasfe.even-better-toml",
"Codium.codium",
"ms-azuretools.vscode-docker",
"ryanluker.vscode-coverage-gutters"
]
}
},
}
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
strategy:
matrix:
environment: [py308, py309, py310, py311, py312]

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -30,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 }}
1 change: 1 addition & 0 deletions .vscode/active_file.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/home/ags/deps_rocker/test/test_basic.py
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"files.exclude": {
"**/__pycache__/**": true,
"/home/vscode/.local/lib/python3.10/site-packages/template_rocker/**": true
"/home/vscode/.local/lib/python3.10/site-packages/deps_rocker/**": true
},
"python.analysis.autoImportCompletions": false //vscode gets it wrong more than right and mostly gets in the way
}
42 changes: 42 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
{
"label": "run <cfg>",
"type": "shell",
<<<<<<< HEAD
"command": "RUNFILE=$(cat ${workspaceFolder}/.vscode/active_file.cfg); echo Running file: $RUNFILE; python3 $RUNFILE",
=======
"command": "RUNFILE=$(cat ${workspaceFolder}/.vscode/active_file.cfg); echo Running file: $RUNFILE; pixi run python3 $RUNFILE",
>>>>>>> template/main
"problemMatcher": [],
"group": {
"kind": "build",
Expand All @@ -25,19 +29,42 @@
"label": "autoformat",
"detail": "Use ruff and black to automatically fix and format the code",
"type": "shell",
<<<<<<< HEAD
"command": "ruff check . --fix && black ."
},
{
"label": "autoformat, commit and push",
"detail": "Use ruff and black to automatically fix and format the code and commit changes",
"type": "shell",
"dependsOn": [
"autoformat"
],
"command": "git commit -a -m 'fix: autoformatted and ruff --fix all code' || true && git push"
},
{
"label": "pylint",
"detail": "Run pylint on files tracked by git",
"type": "shell",
"command": "pylint $(git ls-files '*.py') "
=======
"command": "pixi run fmt"
},
{
"label": "lint",
"detail": "Run pylint on files tracked by git",
"type": "shell",
"command": "pixi run lint"
>>>>>>> template/main
},
{
"label": "code coverage",
"detail": "Run code coverage and print a coverage report, also update coverage.xml for in the in-editor coverage gutter",
"type": "shell",
<<<<<<< HEAD
"command": "coverage run -m pytest; coverage xml -o coverage.xml"
=======
"command": "pixi run coverage"
>>>>>>> template/main
},
{
"label": "code coverage report",
Expand All @@ -46,7 +73,11 @@
"dependsOn": [
"code coverage"
],
<<<<<<< HEAD
"command": "coverage report -m"
=======
"command": "pixi run coverage-report"
>>>>>>> template/main
},
{
"label": "pytest duration",
Expand All @@ -56,9 +87,20 @@
},
{
"label": "check CI",
<<<<<<< HEAD
"detail": "Runs the basic formatting and linting checks performed by CI",
"type": "shell",
"dependsOn": [
"autoformat",
"pylint",
"code coverage report"
],
"dependsOrder": "sequence",
=======
"detail": "Runs the basic formatting and linting and tests performed by CI",
"type": "shell",
"command": "pixi run ci-no-cover"
>>>>>>> template/main
},
{
"label": "check CI, commit and push",
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## template_rocker
## python_template

## [0.0.0]

Expand Down
Loading

0 comments on commit c156e1c

Please sign in to comment.