-
Notifications
You must be signed in to change notification settings - Fork 0
Add package structure #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| blank_issues_enabled: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # PR Type | ||
| [Feature | Fix | Documentation | Other() ] | ||
|
|
||
| # Short Description | ||
| ... | ||
|
|
||
| # Tests Added | ||
| ... | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
amrit110 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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", | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.