Skip to content

Commit 36d8d46

Browse files
authored
Merge pull request #21 from Sinaptik-AI/release/v0.1.2
Release v0.2.0
2 parents cfa51d6 + 19eed60 commit 36d8d46

File tree

94 files changed

+2701
-11396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+2701
-11396
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,21 @@ jobs:
5858
cd backend
5959
poetry install --all-extras --with dev --verbose
6060
61-
- name: Run python tests
61+
- name: Run python tests with coverage
6262
run: |
6363
cd backend
64-
poetry run pytest
64+
poetry run pytest --cov=app --cov-report=xml --cov-report=term-missing
65+
66+
- name: Upload coverage to Codecov
67+
uses: codecov/codecov-action@v4
68+
with:
69+
file: ./backend/coverage.xml
70+
token: ${{ secrets.CODECOV_TOKEN }}
71+
72+
- name: Run Ruff
73+
run: |
74+
cd backend
75+
poetry run ruff check .
6576
6677
- name: Install frontend dependencies
6778
run: |

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.env
22

3-
.DS_Store
3+
.DS_Store

.pre-commit-config.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
10+
- repo: https://github.com/psf/black
11+
rev: 24.3.0
12+
hooks:
13+
- id: black
14+
language_version: python3.11
15+
16+
- repo: https://github.com/pycqa/isort
17+
rev: 5.13.2
18+
hooks:
19+
- id: isort
20+
args: ["--profile", "black"]
21+
22+
- repo: https://github.com/astral-sh/ruff-pre-commit
23+
rev: v0.3.4
24+
hooks:
25+
- id: ruff
26+
args: [--fix, --exit-non-zero-on-fix]
27+
28+
- repo: local
29+
hooks:
30+
- id: pytest-check
31+
name: pytest-check
32+
entry: bash -c 'cd backend && poetry run pytest'
33+
language: system
34+
pass_filenames: false
35+
always_run: false
36+
files: ^(backend/|tests/)
37+
types: [python]
38+
39+
- id: coverage-check
40+
name: coverage-check
41+
entry: bash -c 'cd backend && poetry run coverage erase && poetry run coverage run -m pytest && poetry run coverage report -m && poetry run coverage xml'
42+
language: system
43+
pass_filenames: false
44+
always_run: false
45+
files: ^(backend/|tests/)
46+
types: [python]

.vscode/settings.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"[javascript]": {
4+
"editor.defaultFormatter": "esbenp.prettier-vscode"
5+
},
6+
"[typescript]": {
7+
"editor.defaultFormatter": "esbenp.prettier-vscode"
8+
},
9+
"[typescriptreact]": {
10+
"editor.defaultFormatter": "esbenp.prettier-vscode"
11+
},
12+
"prettier.configPath": "frontend/.prettierrc",
13+
"prettier.ignorePath": "frontend/.prettierignore",
14+
"[python]": {
15+
"editor.defaultFormatter": "charliermarsh.ruff"
16+
},
17+
"ruff.organizeImports": true,
18+
"ruff.fixAll": true,
19+
"ruff.path": ["backend"]
20+
}

backend/.coveragerc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[run]
2+
source = app
3+
omit =
4+
*/tests/*
5+
*/__init__.py
6+
7+
[report]
8+
exclude_lines =
9+
pragma: no cover
10+
def __repr__
11+
if self.debug:
12+
if __name__ == .__main__.:
13+
raise NotImplementedError
14+
pass
15+
except ImportError:
16+
def __str__

backend/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ __pycache__/
2222
!/instance/
2323
uploads/
2424
processed/
25+
26+
27+
# coverage
28+
.coverage
29+
coverage.xml

backend/alembic/versions/0371afa4fbf0_generate_chat_models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
from alembic import op
1212
import sqlalchemy as sa
13-
from sqlalchemy.dialects import sqlite
1413

1514
# revision identifiers, used by Alembic.
1615
revision: str = "0371afa4fbf0"

backend/alembic/versions/883990c30c41_update_asset_type_and_add_metadata.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
from alembic import op
1212
import sqlalchemy as sa
13-
from sqlalchemy.dialects import sqlite
1413

1514
# revision identifiers, used by Alembic.
1615
revision: str = "883990c30c41"

backend/alembic/versions/92f4fabcce75_merge_1df766359982_and_2484b46ee17d.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
"""
88
from typing import Sequence, Union
99

10-
from alembic import op
11-
import sqlalchemy as sa
1210

1311

1412
# revision identifiers, used by Alembic.

backend/alembic/versions/ccfafd40eaf9_merge_284ed84c1933_and_fc88c981b40e.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
"""
88
from typing import Sequence, Union
99

10-
from alembic import op
11-
import sqlalchemy as sa
1210

1311

1412
# revision identifiers, used by Alembic.

0 commit comments

Comments
 (0)