Skip to content

Commit

Permalink
Python project template update (#20)
Browse files Browse the repository at this point in the history
* quarto version

* Cruft update

* autoformat
  • Loading branch information
grst authored Sep 21, 2024
1 parent 6b086f7 commit a623b82
Show file tree
Hide file tree
Showing 10 changed files with 200 additions and 135 deletions.
5 changes: 3 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/scverse/cookiecutter-scverse",
"commit": "66a3c30e185cf0deb57a95329b5f3fec7b9f1352",
"commit": "4c8f4683073074b201a45b173d91b2a352d4a194",
"checkout": null,
"context": {
"cookiecutter": {
Expand All @@ -10,8 +10,9 @@
"author_full_name": "Gregor Sturm",
"author_email": "[email protected]",
"github_user": "sturmgre",
"project_repo": "ssh://[email protected]:7999/binfdevops/dso.git",
"github_repo": "dso",
"license": "MIT License",
"ide_integration": true,
"_copy_without_render": [
".github/workflows/build.yaml",
".github/workflows/test.yaml",
Expand Down
5 changes: 1 addition & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{yml,yaml}]
indent_size = 2

[.cruft.json]
[{*.{yml,yaml,toml},.cruft.json}]
indent_size = 2

[Makefile]
Expand Down
11 changes: 1 addition & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,15 @@ buck-out/
# Compiled files
.venv/
__pycache__/
.mypy_cache/
.ruff_cache/
.*cache/

# Distribution / packaging
/build/
/dist/
/*.egg-info/

# Tests and coverage
/.pytest_cache/
/.cache/
/data/
/node_modules/

# docs
/docs/generated/
/docs/_build/

# IDEs
/.idea/
/.vscode/
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ repos:
# Check that there are no merge conflicts (could be generated by template sync)
- id: check-merge-conflict
args: [--assume-in-merge]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.2.4"
hooks:
- id: pyproject-fmt
- repo: local
hooks:
- id: forbid-to-commit
Expand Down
7 changes: 7 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
overrides:
# JSON with comments and trailing commas
- files: .vscode/*.json
options:
parser: json5
quoteProps: preserve
singleQuote: false
18 changes: 18 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"recommendations": [
// GitHub integration
"github.vscode-github-actions",
"github.vscode-pull-request-github",
// Language support
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"tamasfe.even-better-toml",
// Dependency management
"ninoseki.vscode-mogami",
// Linting and formatting
"editorconfig.editorconfig",
"charliermarsh.ruff",
"esbenp.prettier-vscode",
],
}
33 changes: 33 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Build Documentation",
"type": "debugpy",
"request": "launch",
"module": "sphinx",
"args": ["-M", "html", ".", "_build"],
"cwd": "${workspaceFolder}/docs",
"console": "internalConsole",
"justMyCode": false,
},
{
"name": "Python: Debug Test",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"purpose": ["debug-test"],
"console": "internalConsole",
"justMyCode": false,
"env": {
"PYTEST_ADDOPTS": "--color=yes",
},
"presentation": {
"hidden": true,
},
},
],
}
18 changes: 18 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"[python][jsonc][yaml]": {
"editor.formatOnSave": true,
},
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.fixAll": "always",
"source.organizeImports": "always",
},
},
"[jsonc][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"python.analysis.typeCheckingMode": "basic",
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": ["-vv", "--color=yes"],
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ dso was initially developed by
* [Daniel Schreyer](https://github.com/dschreyer)
* [Alexander Peltzer](https://github.com/apeltzer)

DSO depends on many great open source projects, most notably [dvc](https://github.com/iterative/dvc), [hiyapyco](https://github.com/zerwes/hiyapyco) and [jinja2](https://jinja.palletsprojects.com/).
DSO depends on many great open source projects, most notably [dvc](https://github.com/iterative/dvc), [hiyapyco](https://github.com/zerwes/hiyapyco) and [jinja2](https://jinja.palletsprojects.com/).
Loading

0 comments on commit a623b82

Please sign in to comment.