-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install and configure linter and formatter, check some lint issues, f…
…ormat the code and add some github actions (#3) * Install and configure linter and formatter, check some lint issues, format the code and add some github actions * Update blitz/ui/components/gpt_chat_components.py with default value for text_is_finished Co-authored-by: pbrochar <[email protected]> --------- Co-authored-by: pbrochar <[email protected]>
- Loading branch information
Showing
37 changed files
with
664 additions
and
437 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 |
---|---|---|
@@ -1,30 +1,96 @@ | ||
name: documentation | ||
name: Lint & Test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
#---------------------------------------------- | ||
# check-out repo and set-up python | ||
#---------------------------------------------- | ||
- uses: actions/checkout@v4 | ||
- name: Configure Git Credentials | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
- uses: actions/setup-python@v4 | ||
- name: Set up python | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- uses: actions/cache@v3 | ||
python-version: '3.12' | ||
#---------------------------------------------- | ||
# ----- install & configure poetry ----- | ||
#---------------------------------------------- | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
#---------------------------------------------- | ||
# load pip cache if cache exists | ||
#---------------------------------------------- | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: lint-venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
#---------------------------------------------- | ||
# install and run linters | ||
#---------------------------------------------- | ||
- name: Install dev dependencies | ||
run: poetry install --with=dev --no-root | ||
- name: Ruff | ||
run: poetry run ruff check blitz/ | ||
- name: Mypy | ||
run: poetry run mypy blitz/ | ||
test: | ||
needs: lint | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ "ubuntu-latest", "macos-latest" ] | ||
# python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] | ||
python-version: [ "3.12" ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
#---------------------------------------------- | ||
# check-out repo and set-up python | ||
#---------------------------------------------- | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
- name: Set up python ${{ matrix.python-version }} | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
#---------------------------------------------- | ||
# ----- install & configure poetry ----- | ||
#---------------------------------------------- | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
- run: poetry install --with=doc | ||
- run: poetry run mkdocs gh-deploy --force | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
#---------------------------------------------- | ||
# load cached venv if cache exists | ||
#---------------------------------------------- | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: test-venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
#---------------------------------------------- | ||
# install dependencies if cache does not exist | ||
#---------------------------------------------- | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction | ||
#---------------------------------------------- | ||
# add matrix specifics and run test suite | ||
#---------------------------------------------- | ||
- name: Run tests | ||
run: | | ||
source .venv/bin/activate | ||
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Build & Deploy Documentation | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure Git Credentials | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- uses: actions/cache@v3 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
- run: poetry install --with=doc | ||
- run: poetry run mkdocs gh-deploy --force |
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
__all__ = [ | ||
"BlitzCore", | ||
] | ||
__version__ = "0.1.0" |
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
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
Oops, something went wrong.