Skip to content

Commit

Permalink
Update project from template
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeNaccarato committed Jan 17, 2024
1 parent e283d7b commit 4179b02
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 612c807
_commit: be9e466
_src_path: gh:blakeNaccarato/copier-python
actions_runner: ubuntu-latest
active: true
Expand Down
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,17 @@ repos:
hooks:
- id: "end-of-file-fixer"
- id: "trailing-whitespace"
- repo: "https://github.com/DavidAnson/markdownlint-cli2"
rev: "v0.11.0"
hooks:
- id: "markdownlint-cli2-fix"
- repo: "https://github.com/srstevenson/nb-clean"
rev: "3.2.0"
hooks:
- id: "nb-clean"
args:
- "--remove-empty-cells"
- "--preserve-notebook-metadata"
- "--preserve-cell-metadata"
- "tags"
- "--"
Expand All @@ -93,10 +98,6 @@ repos:
|docs/.*
|tests/.*
)$
- repo: "https://github.com/DavidAnson/markdownlint-cli2"
rev: "v0.11.0"
hooks:
- id: "markdownlint-cli2-fix"
- repo: "https://github.com/charliermarsh/ruff-pre-commit"
rev: "v0.1.11"
hooks:
Expand Down
11 changes: 8 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"editor.formatOnSaveMode": "file",
"editor.formatOnType": false,
"editor.codeActionsOnSave": {
"source.fixAll.ruff": "always",
"source.organizeImports.ruff": "always"
"source.fixAll": "always",
"source.organizeImports": "always"
},
//* Files
//? Related autoformatting of whitespace conventions
Expand All @@ -56,10 +56,15 @@
//* Notebook
//? https://github.com/microsoft/vscode/issues/195223#issuecomment-1800137313
"notebook.insertFinalNewline": false,
//? Avoid code actions on notebook save for now, Ruff misbehaves in certain cases
//? Code actions on notebook save partially work now
//? Need to raise an issue about `notebook.source.organizeImports` not behaving
//? https://github.com/astral-sh/ruff-lsp/issues/320
"notebook.formatOnCellExecution": true,
"notebook.formatOnSave.enabled": true,
"notebook.codeActionsOnSave": {
"notebook.source.fixAll": "explicit",
"source.organizeImports": "explicit"
},

//! GitHub Actions
"github-actions.workflows.pinned.workflows": [".github/workflows/main.yml"],
Expand Down
7 changes: 2 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ xfail_strict = true

[tool.pyright]
include = ["src", "tests", "docs"]
stubPath = "submodules/typings"
useLibraryCodeForTypes = true
typeCheckingMode = "strict"
# Default "true" in strict
Expand Down Expand Up @@ -161,14 +162,10 @@ preview = false
unsafe-fixes = false
cache-dir = ".cache/.ruff_cache"
fixable = ["ALL"]
extend-exclude = ["submodules"]
extend-exclude = ["submodules/**"]
extend-include = ["*.ipynb"]
select = ["ALL"]
src = ["src", "tests"]
target-version = "py311"
extend-unfixable = [
"F841", # Unused variables
]
extend-ignore = [
"ANN", # Don't require type annotations
"ARG005", # Allow unused lambda argument. For consistency across df pipelines.
Expand Down

0 comments on commit 4179b02

Please sign in to comment.