-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from pragunbhutani/development
feat: migrating the project to use poetry
- Loading branch information
Showing
31 changed files
with
4,629 additions
and
174 deletions.
There are no files selected for viewing
This file contains 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,40 @@ | ||
name: Lint and Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: {} | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
name: Lint and test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Poetry | ||
run: pipx install poetry | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
cache: "poetry" | ||
|
||
- name: Install dev dependencies | ||
run: poetry install | ||
|
||
- name: Lint with Flake8 | ||
run: poetry run flake8 dbt_llm_tools tests | ||
|
||
- name: Lint with pylint | ||
run: poetry run pylint dbt_llm_tools tests | ||
|
||
- name: Test with pytest | ||
run: poetry run pytest tests |
This file contains 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,48 +1,37 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
push: | ||
branches: [main, staging] | ||
release: | ||
types: | ||
- published | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
release: | ||
name: Release to PyPI | ||
runs-on: ubuntu-latest | ||
environment: ${{ github.ref_name }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Poetry | ||
run: pipx install poetry | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
pip install setuptools wheel twine | ||
- name: Lint with pylint | ||
run: | | ||
pylint $(git ls-files '*.py') | ||
- name: Test with pytest | ||
run: | | ||
python -m unittest | ||
- name: Build and publish | ||
cache: "poetry" | ||
|
||
- name: Build | ||
run: poetry build | ||
|
||
- name: Publish | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
REPOSITORY_URL: ${{ vars.REPOSITORY_URL }} | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
echo $REPORSITORY_URL | ||
twine upload --repository-url $REPOSITORY_URL dist/* | ||
poetry config pypi-token.pypi $PYPI_TOKEN | ||
poetry publish |
This file contains 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
This file contains 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
This file contains 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,15 @@ | ||
from dbt_llm_tools.chatbot import Chatbot | ||
from dbt_llm_tools.dbt_model import DbtModel | ||
from dbt_llm_tools.dbt_project import DbtProject | ||
from dbt_llm_tools.documentation_generator import DocumentationGenerator | ||
from dbt_llm_tools.instructions import ( | ||
ANSWER_QUESTION_INSTRUCTIONS, | ||
INTERPRET_MODEL_INSTRUCTIONS, | ||
) | ||
from dbt_llm_tools.types import ( | ||
DbtModelDict, | ||
DbtModelDirectoryEntry, | ||
ParsedSearchResult, | ||
PromptMessage, | ||
) | ||
from dbt_llm_tools.vector_store import VectorStore |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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,4 +1,5 @@ | ||
from typing import TypedDict, Union | ||
|
||
from typing_extensions import NotRequired | ||
|
||
|
||
|
This file contains 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.