Skip to content

Commit 90ddb7d

Browse files
authored
Merge pull request #3 from VectorInstitute/add_new_package_structure
Add package structure
2 parents 3194dcc + eb797eb commit 90ddb7d

File tree

16 files changed

+1448
-1
lines changed

16 files changed

+1448
-1
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
### Describe the bug
11+
A clear and concise description of what the bug is.
12+
13+
### To Reproduce
14+
Code snippet or clear steps to reproduce behaviour.
15+
16+
### Expected behavior
17+
A clear and concise description of what you expected to happen.
18+
19+
### Screenshots
20+
If applicable, add screenshots to help explain your problem.
21+
22+
### Version
23+
- Version info such as v0.1.5
24+
25+
### Additional context
26+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
### Is your feature request related to a problem? Please describe.
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
### Describe the solution you'd like
14+
A clear and concise description of what you want to happen.
15+
16+
### Describe alternatives you've considered
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
### Additional context
20+
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/pull_request_template.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# PR Type
2+
[Feature | Fix | Documentation | Other ]
3+
4+
# Short Description
5+
...
6+
7+
# Tests Added
8+
...

.github/workflows/code_checks.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: code checks
2+
permissions:
3+
contents: read
4+
pull-requests: write
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- .pre-commit-config.yaml
12+
- .github/workflows/code_checks.yml
13+
- '**.py'
14+
- uv.lock
15+
- pyproject.toml
16+
- '**.ipynb'
17+
pull_request:
18+
branches:
19+
- main
20+
paths:
21+
- .pre-commit-config.yaml
22+
- .github/workflows/code_checks.yml
23+
- '**.py'
24+
- uv.lock
25+
- pyproject.toml
26+
- '**.ipynb'
27+
28+
jobs:
29+
run-code-check:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/[email protected]
33+
34+
- name: Install uv
35+
uses: astral-sh/setup-uv@c7f87aa956e4c323abf06d5dec078e358f6b4d04
36+
with:
37+
# Install a specific version of uv.
38+
version: "0.7.6"
39+
enable-cache: true
40+
41+
- name: "Set up Python"
42+
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
43+
with:
44+
python-version-file: ".python-version"
45+
46+
- name: Install the project
47+
run: uv sync --all-extras --dev
48+
49+
- name: Install dependencies and check code
50+
run: |
51+
source .venv/bin/activate
52+
pre-commit run --all-files
53+
54+
- name: pip-audit (gh-action-pip-audit)
55+
uses: pypa/gh-action-pip-audit@1220774d901786e6f652ae159f7b6bc8fea6d266
56+
with:
57+
virtual-environment: .venv/

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Python-generated files
2+
__pycache__/
3+
*.py[oc]
4+
build/
5+
dist/
6+
wheels/
7+
*.egg-info
8+
9+
# Virtual environments
10+
.venv
11+
12+
# Lint & Test
13+
.mypy_cache/
14+
.pytest_cache/
15+
.ruff_cache/
16+
17+
# Vscode
18+
.vscode
19+
20+
# macos
21+
*.DS_Store
22+
23+
# ipynb checkpoints
24+
**.ipynb_checkpoints
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
"""Example implementation for an example topic."""
2+
3+
from aieng.topic.impl.example_impl import example_impl
4+
5+
__all__ = ["example_impl"]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"""Example implementation module."""
2+
3+
4+
def example_impl() -> str:
5+
"""Show an example implementation function."""
6+
return "example_impl"

aieng-topic-impl/pyproject.toml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[dependency-groups]
6+
dev = [
7+
"codecov>=2.1.13",
8+
"mypy>=1.14.1",
9+
"nbqa>=1.9.1",
10+
"pip-audit>=2.7.3",
11+
"pre-commit>=4.1.0",
12+
"pytest>=8.3.4",
13+
"pytest-asyncio>=0.25.2",
14+
"pytest-cov>=6.0.0",
15+
"pytest-mock>=3.14.0",
16+
"ruff>=0.9.2",
17+
]
18+
19+
[project]
20+
name = "aieng-topic-impl"
21+
version = "0.1.0"
22+
description = "AI Engineering example implementation"
23+
authors = [{name = "Vector AI Engineering", email = "[email protected]"}]
24+
requires-python = ">=3.11,<4.0"
25+
readme = "README.md"
26+
license = "MIT"
27+
dependencies = []
28+
29+
[tool.hatch.build.targets.sdist]
30+
include = ["aieng/"]
31+
32+
[tool.hatch.build.targets.wheel]
33+
include = ["aieng/"]
34+
35+
[tool.mypy]
36+
ignore_missing_imports = true
37+
install_types = true
38+
pretty = true
39+
namespace_packages = true
40+
explicit_package_bases = true
41+
non_interactive = true
42+
warn_unused_configs = true
43+
allow_any_generics = false
44+
allow_subclassing_any = false
45+
allow_untyped_calls = false
46+
allow_untyped_defs = false
47+
allow_incomplete_defs = false
48+
check_untyped_defs = true
49+
allow_untyped_decorators = false
50+
warn_redundant_casts = true
51+
warn_unused_ignores = true
52+
warn_return_any = true
53+
implicit_reexport = false
54+
strict_equality = true
55+
extra_checks = true
56+
57+
[tool.ruff]
58+
include = ["*.py", "pyproject.toml", "*.ipynb"]
59+
line-length = 88
60+
61+
[tool.ruff.format]
62+
quote-style = "double"
63+
indent-style = "space"
64+
docstring-code-format = true
65+
66+
[tool.ruff.lint]
67+
select = [
68+
"A", # flake8-builtins
69+
"B", # flake8-bugbear
70+
"COM", # flake8-commas
71+
"C4", # flake8-comprehensions
72+
"RET", # flake8-return
73+
"SIM", # flake8-simplify
74+
"ICN", # flake8-import-conventions
75+
"Q", # flake8-quotes
76+
"RSE", # flake8-raise
77+
"D", # pydocstyle
78+
"E", # pycodestyle
79+
"F", # pyflakes
80+
"I", # isort
81+
"W", # pycodestyle
82+
"N", # pep8-naming
83+
"ERA", # eradicate
84+
"PL", # pylint
85+
]
86+
fixable = ["A", "B", "COM", "C4", "RET", "SIM", "ICN", "Q", "RSE", "D", "E", "F", "I", "W", "N", "ERA", "PL"]
87+
ignore = [
88+
"B905", # `zip()` without an explicit `strict=` parameter
89+
"E501", # line too long
90+
"D203", # 1 blank line required before class docstring
91+
"D213", # Multi-line docstring summary should start at the second line
92+
"PLR2004", # Replace magic number with named constant
93+
"PLR0913", # Too many arguments
94+
"COM812", # Missing trailing comma
95+
]
96+
97+
# Ignore import violations in all `__init__.py` files.
98+
[tool.ruff.lint.per-file-ignores]
99+
"__init__.py" = ["E402", "F401", "F403", "F811"]
100+
101+
[tool.ruff.lint.pep8-naming]
102+
ignore-names = ["X*", "setUp"]
103+
104+
[tool.ruff.lint.isort]
105+
lines-after-imports = 2
106+
107+
[tool.ruff.lint.pydocstyle]
108+
convention = "numpy"
109+
110+
[tool.ruff.lint.pycodestyle]
111+
max-doc-length = 88
112+
113+
[tool.pytest.ini_options]
114+
markers = [
115+
"integration_test: marks tests as integration tests",
116+
]

0 commit comments

Comments
 (0)