Skip to content
Open
Show file tree
Hide file tree
Changes from all 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 .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**/logs
**/tests
**/__pycache__
**/.mypy_cache
**/.ty_cache
**/.pytest_cache
**/.vscode
**/junit
Expand Down
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,8 @@ venv.bak/
# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# ty
.ty_cache/

# Pyre type checker
.pyre/
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Another challenge you may face is each data scientist creating a low quality cod
- Multiple Dev Container samples (both CPU and GPU) with many common config steps already configured as following:
- Automated code quality checks (linter and auto formatter) and automated fix when possible with ruff on VSCode on save
- Automated code quality checks (linter and auto formatter) with ruff as precommit hook
- Type checking with [ty](https://github.com/astral-sh/ty) integrated as a VSCode extension for real-time feedback in the editor. ty is chosen over mypy for its significantly faster performance. ty is not included in CI or pre-commit hooks because it is still [pre-1.0](https://github.com/astral-sh/ty#version-policy) with no stable API ([milestones](https://github.com/astral-sh/ty/milestones)), meaning diagnostics may change between versions. Once ty stabilizes, the recommendation is to run it in CI in non-strict mode to catch real type errors without requiring full annotation coverage.
- Zero effort transition from local env to Azure Machine Learning (cloud based env) by leveraging the same Dockerfile
- Pre-configured VSCode extensions installed such as python, jupyter, shellcheck, code-spell-checker, git tools etc
- [Github Actions and Azure DevOps CI pipelines](#ci-pipeline) that run linter (ruff) and pytest with test result reporting and coverage reporting
Expand Down Expand Up @@ -226,6 +227,7 @@ ssh-add
## Future Roadmap

- Add Docker build caching to Azure DevOps MS hosted CI pipeline
- Once [ty reaches stable](https://github.com/astral-sh/ty/milestones), add type checking to CI and pre-commit hooks in non-strict mode (default rule set) to catch real type errors without requiring full annotation coverage

## Contributing

Expand Down
6 changes: 4 additions & 2 deletions notebooks/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"marchiore.csvtomarkdown",
"mechatroner.rainbow-csv",
"ms-azure-devops.azure-pipelines",
"ms-python.mypy-type-checker",
"astral-sh.ty",
"ms-python.python",
"ms-toolsai.jupyter",
"ms-vsliveshare.vsliveshare",
Expand All @@ -49,7 +49,9 @@
],
"settings": {
"autoDocstring.docstringFormat": "google",
"mypy-type-checker.importStrategy": "fromEnvironment",
// ty extension provides its own language server, so disable the one from ms-python.python
"python.languageServer": "None",
"ty.importStrategy": "fromEnvironment",
"python.testing.pytestEnabled": true,
"python.defaultInterpreterPath": "/usr/local/bin/python",
"[python]": {
Expand Down
2 changes: 1 addition & 1 deletion notebooks/.devcontainer/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [

[dependency-groups]
dev = [
"mypy==1.20.0",
"ty==0.0.29",
"pytest==9.0.2",
"pre-commit==4.5.1",
"pytest-cov==7.1.0",
Expand Down
169 changes: 26 additions & 143 deletions notebooks/.devcontainer/uv.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/.amlignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**/logs
**/tests
**/__pycache__
**/.mypy_cache
**/.ty_cache
**/.pytest_cache
**/.vscode
**/junit
Expand Down
6 changes: 4 additions & 2 deletions src/sample_cpu_project/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"marchiore.csvtomarkdown",
"mechatroner.rainbow-csv",
"ms-azure-devops.azure-pipelines",
"ms-python.mypy-type-checker",
"astral-sh.ty",
"ms-python.python",
"ms-toolsai.jupyter",
"ms-vsliveshare.vsliveshare",
Expand All @@ -49,7 +49,9 @@
],
"settings": {
"autoDocstring.docstringFormat": "google",
"mypy-type-checker.importStrategy": "fromEnvironment",
// ty extension provides its own language server, so disable the one from ms-python.python
"python.languageServer": "None",
"ty.importStrategy": "fromEnvironment",
"python.testing.pytestEnabled": true,
"python.defaultInterpreterPath": "/usr/local/bin/python",
"[python]": {
Expand Down
2 changes: 1 addition & 1 deletion src/sample_cpu_project/.devcontainer/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires-python = ">=3.11"
[dependency-groups]
dev = [
"ipykernel==7.2.0",
"mypy==1.20.0",
"ty==0.0.29",
"pytest==9.0.2",
"pre-commit==4.5.1",
"pytest-cov==7.1.0",
Expand Down
169 changes: 26 additions & 143 deletions src/sample_cpu_project/.devcontainer/uv.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/sample_pytorch_gpu_project/.amlignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**/logs
**/tests
**/__pycache__
**/.mypy_cache
**/.ty_cache
**/.pytest_cache
**/.vscode
**/junit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"marchiore.csvtomarkdown",
"mechatroner.rainbow-csv",
"ms-azure-devops.azure-pipelines",
"ms-python.mypy-type-checker",
"astral-sh.ty",
"ms-python.python",
"ms-toolsai.jupyter",
"ms-vsliveshare.vsliveshare",
Expand All @@ -51,7 +51,9 @@
],
"settings": {
"autoDocstring.docstringFormat": "google",
"mypy-type-checker.importStrategy": "fromEnvironment",
// ty extension provides its own language server, so disable the one from ms-python.python
"python.languageServer": "None",
"ty.importStrategy": "fromEnvironment",
"python.testing.pytestEnabled": true,
"python.defaultInterpreterPath": "/usr/local/bin/python",
"[python]": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies = [
[dependency-groups]
dev = [
"ipykernel==7.2.0",
"mypy==1.20.0",
"ty==0.0.29",
"pytest==9.0.2",
"pre-commit==4.5.1",
"pytest-cov==7.1.0",
Expand Down
Loading