Skip to content

Commit 4fe96ed

Browse files
author
sindchad
committed
Apply Vector AI Engineering uv template
1 parent aca7195 commit 4fe96ed

34 files changed

+4113
-0
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@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb
36+
with:
37+
# Install a specific version of uv.
38+
version: "0.5.21"
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/

.github/workflows/docs.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: docs
2+
permissions:
3+
contents: write
4+
pull-requests: write
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- .pre-commit-config.yaml
12+
- .github/workflows/docs.yml
13+
- '**.py'
14+
- '**.ipynb'
15+
- '**.html'
16+
- '**.js'
17+
- '**.md'
18+
- uv.lock
19+
- pyproject.toml
20+
- mkdocs.yml
21+
- '**.png'
22+
- '**.svg'
23+
pull_request:
24+
branches:
25+
- main
26+
paths:
27+
- .pre-commit-config.yaml
28+
- .github/workflows/docs.yml
29+
- '**.py'
30+
- '**.ipynb'
31+
- '**.js'
32+
- '**.html'
33+
- uv.lock
34+
- pyproject.toml
35+
- '**.md'
36+
- mkdocs.yml
37+
- '**.png'
38+
- '**.svg'
39+
40+
jobs:
41+
build:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Checkout code
45+
uses: actions/[email protected]
46+
47+
- name: Install uv
48+
uses: astral-sh/[email protected]
49+
with:
50+
version: "0.5.21"
51+
enable-cache: true
52+
53+
- name: Set up Python
54+
uses: actions/setup-python@v5
55+
with:
56+
python-version-file: ".python-version"
57+
58+
- name: Install the project
59+
run: uv sync --all-extras --group docs
60+
61+
- name: Build docs
62+
run: uv run mkdocs build
63+
64+
- name: Create .nojekyll file
65+
run: touch site/.nojekyll
66+
67+
- name: Upload artifact
68+
uses: actions/upload-artifact@v4
69+
with:
70+
name: docs-site
71+
path: site/
72+
retention-days: 1
73+
74+
deploy:
75+
needs: build
76+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
77+
runs-on: ubuntu-latest
78+
steps:
79+
- name: Checkout code
80+
uses: actions/[email protected]
81+
82+
- name: Configure Git Credentials
83+
run: |
84+
git config user.name github-actions[bot]
85+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
86+
87+
- name: Download artifact
88+
uses: actions/download-artifact@v4
89+
with:
90+
name: docs-site
91+
path: site
92+
93+
- name: Ensure .nojekyll exists
94+
run: touch site/.nojekyll
95+
96+
- name: Deploy to Github pages
97+
uses: JamesIves/[email protected]
98+
with:
99+
branch: gh-pages
100+
folder: site
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: integration tests
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+
- .github/workflows/docs_build.yml
14+
- .github/workflows/docs_deploy.yml
15+
- .github/workflows/unit_tests.yml
16+
- .github/workflows/integration_tests.yml
17+
- '**.py'
18+
- '**.ipynb'
19+
- uv.lock
20+
- pyproject.toml
21+
- '**.rst'
22+
- '**.md'
23+
pull_request:
24+
branches:
25+
- main
26+
paths:
27+
- .pre-commit-config.yaml
28+
- .github/workflows/code_checks.yml
29+
- .github/workflows/docs_build.yml
30+
- .github/workflows/docs_deploy.yml
31+
- .github/workflows/unit_tests.yml
32+
- .github/workflows/integration_tests.yml
33+
- '**.py'
34+
- '**.ipynb'
35+
- uv.lock
36+
- pyproject.toml
37+
- '**.rst'
38+
- '**.md'
39+
40+
jobs:
41+
integration-tests:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/[email protected]
45+
46+
- name: Install uv
47+
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb
48+
with:
49+
# Install a specific version of uv.
50+
version: "0.5.21"
51+
enable-cache: true
52+
53+
- name: "Set up Python"
54+
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
55+
with:
56+
python-version-file: ".python-version"
57+
58+
- name: Install the project
59+
run: uv sync --all-extras --dev
60+
61+
- name: Run check code
62+
run: |
63+
uv run pytest -m "integration_test" --cov src/aixpert --cov-report=xml tests
64+
65+
# Uncomment this once this repo is configured on Codecov
66+
# - name: Upload coverage to Codecov
67+
# uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24
68+
# with:
69+
# token: ${{ secrets.CODECOV_TOKEN }}
70+
# slug: VectorInstitute/aixpert
71+
# fail_ci_if_error: true
72+
# verbose: true

.github/workflows/publish.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: publish package
2+
permissions:
3+
contents: read
4+
pull-requests: write
5+
6+
on:
7+
push:
8+
tags:
9+
- "v*"
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Install apt dependencies
16+
run: |
17+
sudo apt-get update
18+
sudo apt-get install libcurl4-openssl-dev libssl-dev
19+
- uses: actions/[email protected]
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb
23+
with:
24+
# Install a specific version of uv.
25+
version: "0.5.21"
26+
enable-cache: true
27+
28+
- name: "Set up Python"
29+
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
30+
with:
31+
python-version-file: ".python-version"
32+
33+
- name: Install the project
34+
run: uv sync --all-extras --dev
35+
36+
- name: Build package
37+
run: uv build
38+
39+
- name: Publish package
40+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
41+
with:
42+
user: __token__
43+
password: ${{ secrets.PYPI_API_TOKEN }}
44+
45+
- name: Create GitHub Release
46+
id: create_release
47+
uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # v1.16.0
48+
with:
49+
artifacts: "dist/*"
50+
generateReleaseNotes: true

0 commit comments

Comments
 (0)