Skip to content

Commit

Permalink
Final syntax with all supported functionality
Browse files Browse the repository at this point in the history
Implementation of the desired syntax and all supported functionality.
Preparing to release

Co-authored-by: Tanya Shemet <[email protected]>
  • Loading branch information
navado and tanyshak authored Apr 29, 2023
1 parent d630a12 commit 2c60a39
Show file tree
Hide file tree
Showing 99 changed files with 1,122 additions and 781 deletions.
67 changes: 21 additions & 46 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Release
on:
release:
types: [ published ]
branches:
- main
branches: [ main ]

jobs:
release:
Expand All @@ -15,52 +14,28 @@ jobs:
- name: Determine Version
id: release-version
run: |
echo "::set-output name=full::${{ github.ref_name }}"
echo "full=${{ github.ref_name }}" >> $GITHUB_OUTPUT
SIMPLE=$(echo ${{ github.ref_name }} | sed -e s/^v//)
echo "::set-output name=simple::$SIMPLE"
echo "simple=$SIMPLE" >> $GITHUB_OUTPUT
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: |
3.7
3.8
3.9
3.10
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
if [ -f dev-requirements.txt ]; then pip install -r dev-requirements.txt; fi
python3 -m pip install --upgrade build
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Build package
run: python3 -m build

- name: Upload Release Asset (source distribution)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/dbt-upsolver-${{ steps.release-version.outputs.simple }}.tar.gz
asset_name: dbt_upsolver.tar.gz
asset_content_type: application/tar+gz

- name: Upload Release Asset (built distribution)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
python-version: ">=3.7"

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/dbt_upsolver-${{ steps.release-version.outputs.simple }}-py3-none-any.whl
asset_name: dbt_upsolver-${{ steps.release-version.outputs.simple }}-py3-none-any.whl
asset_content_type: application/whl
password: ${{ secrets.PYPI_TOKEN }}
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.4.0
hooks:
- id: check-yaml
args: [--unsafe]
- id: check-json
- id: end-of-file-fixer
- id: trailing-whitespace
exclude_types:
- "markdown"
- id: check-case-conflict
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.3.0
hooks:
- id: black
args:
Expand All @@ -33,14 +35,14 @@ repos:
- "--check"
- "--diff"
- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
rev: 6.0.0
hooks:
- id: flake8
- id: flake8
alias: flake8-check
stages: [manual]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.782
rev: v1.2.0
hooks:
- id: mypy
args: [--show-error-codes, --ignore-missing-imports]
Expand All @@ -52,4 +54,3 @@ repos:
args: [--show-error-codes, --pretty, --ignore-missing-imports]
files: ^dbt/adapters
language: system

Loading

0 comments on commit 2c60a39

Please sign in to comment.