Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

### Describe the bug
A clear and concise description of what the bug is.

### To Reproduce
Code snippet or clear steps to reproduce behaviour.

### Expected behavior
A clear and concise description of what you expected to happen.

### Screenshots
If applicable, add screenshots to help explain your problem.

### Version
- Version info such as v0.1.5

### Additional context
Add any other context about the problem here.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

### Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

### Describe the solution you'd like
A clear and concise description of what you want to happen.

### Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

### Additional context
Add any other context or screenshots about the feature request here.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# PR Type
[Feature | Fix | Documentation | Other() ]

# Short Description
...

# Tests Added
...
57 changes: 57 additions & 0 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: code checks
permissions:
contents: read
pull-requests: write

on:
push:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/code_checks.yml
- '**.py'
- uv.lock
- pyproject.toml
- '**.ipynb'
pull_request:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/code_checks.yml
- '**.py'
- uv.lock
- pyproject.toml
- '**.ipynb'

jobs:
run-code-check:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

- name: Install uv
uses: astral-sh/setup-uv@c7f87aa956e4c323abf06d5dec078e358f6b4d04
with:
# Install a specific version of uv.
version: "0.7.6"
enable-cache: true

- name: "Set up Python"
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
with:
python-version-file: ".python-version"

- name: Install the project
run: uv sync --all-extras --dev

- name: Install dependencies and check code
run: |
source .venv/bin/activate
pre-commit run --all-files

- name: pip-audit (gh-action-pip-audit)
uses: pypa/gh-action-pip-audit@1220774d901786e6f652ae159f7b6bc8fea6d266
with:
virtual-environment: .venv/
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Python-generated files
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info

# Virtual environments
.venv

# Lint & Test
.mypy_cache/
.pytest_cache/
.ruff_cache/

# Vscode
.vscode

# macos
*.DS_Store

# ipynb checkpoints
**.ipynb_checkpoints
2 changes: 2 additions & 0 deletions aieng-topic-impl/aieng/topic/impl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Example implementation for an example topic."""

from aieng.topic.impl.example_impl import example_impl
6 changes: 6 additions & 0 deletions aieng-topic-impl/aieng/topic/impl/example_impl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""Example implementation module."""


def example_impl() -> str:
"""Show an example implementation function."""
return "example_impl"
116 changes: 116 additions & 0 deletions aieng-topic-impl/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[dependency-groups]
dev = [
"codecov>=2.1.13",
"mypy>=1.14.1",
"nbqa>=1.9.1",
"pip-audit>=2.7.3",
"pre-commit>=4.1.0",
"pytest>=8.3.4",
"pytest-asyncio>=0.25.2",
"pytest-cov>=6.0.0",
"pytest-mock>=3.14.0",
"ruff>=0.9.2",
]

[project]
name = "aieng-topic-impl"
version = "0.1.0"
description = "AI Engineering example implementation"
authors = [{name = "Vector AI Engineering", email = "[email protected]"}]
requires-python = ">=3.11,<4.0"
readme = "README.md"
license = "MIT"
dependencies = []

[tool.hatch.build.targets.sdist]
include = ["aieng/"]

[tool.hatch.build.targets.wheel]
include = ["aieng/"]

[tool.mypy]
ignore_missing_imports = true
install_types = true
pretty = true
namespace_packages = true
explicit_package_bases = true
non_interactive = true
warn_unused_configs = true
allow_any_generics = false
allow_subclassing_any = false
allow_untyped_calls = false
allow_untyped_defs = false
allow_incomplete_defs = false
check_untyped_defs = true
allow_untyped_decorators = false
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
implicit_reexport = false
strict_equality = true
extra_checks = true

[tool.ruff]
include = ["*.py", "pyproject.toml", "*.ipynb"]
line-length = 88

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true

[tool.ruff.lint]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"COM", # flake8-commas
"C4", # flake8-comprehensions
"RET", # flake8-return
"SIM", # flake8-simplify
"ICN", # flake8-import-conventions
"Q", # flake8-quotes
"RSE", # flake8-raise
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"W", # pycodestyle
"N", # pep8-naming
"ERA", # eradicate
"PL", # pylint
]
fixable = ["A", "B", "COM", "C4", "RET", "SIM", "ICN", "Q", "RSE", "D", "E", "F", "I", "W", "N", "ERA", "PL"]
ignore = [
"B905", # `zip()` without an explicit `strict=` parameter
"E501", # line too long
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"PLR2004", # Replace magic number with named constant
"PLR0913", # Too many arguments
"COM812", # Missing trailing comma
]

# Ignore import violations in all `__init__.py` files.
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401", "F403", "F811"]

[tool.ruff.lint.pep8-naming]
ignore-names = ["X*", "setUp"]

[tool.ruff.lint.isort]
lines-after-imports = 2

[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.ruff.lint.pycodestyle]
max-doc-length = 88

[tool.pytest.ini_options]
markers = [
"integration_test: marks tests as integration tests",
]
8 changes: 8 additions & 0 deletions aieng-topic-impl/tests/aieng/topic/impl/test_example_impl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""Test example implementation."""

from aieng.topic.impl import example_impl


def test_example_impl():
"""Test example implementation."""
assert example_impl() == "example_impl"
112 changes: 112 additions & 0 deletions implementations/implementation_a/topic_a_a.ipynb

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions implementations/implementation_a/topic_a_b.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "fdd2328b-83cf-4d4c-ba15-ae061bcb3748",
"metadata": {},
"source": [
"# Topic B"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
33 changes: 33 additions & 0 deletions implementations/implementation_b/topic_b_a.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "fdd2328b-83cf-4d4c-ba15-ae061bcb3748",
"metadata": {},
"source": [
"# Topic A"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ authors = [ {name = "Vector AI Engineering", email = "ai_engineering@vectorinsti
readme = "README.md"
repository = "https://github.com/VectorInstitute/aieng-template-implementation"
requires-python = ">=3.12"
dependencies = []
dependencies = [
"jupyterlab>=4.4.2",
]

[dependency-groups]
dev = [
Expand Down
Loading
Loading