forked from dmarkey/python-athena-udf
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Initial setup #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ae09ec3
Initial setup
svdimchenko 6181979
Fix tests ci
svdimchenko bff8c34
Fix tests workflow
svdimchenko aff3b94
Fix tests workflow
svdimchenko 6c48b2a
Fix tests workflow
svdimchenko 23a06e4
Fix tests workflow
svdimchenko 4b3f786
Fix tests workflow
svdimchenko ff09a72
Fix package name
svdimchenko 8a1009e
Add semantic.yml file
svdimchenko 9e971e8
Remove mypy check due to pyarrow
svdimchenko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,4 @@ | ||
| # Semantic Commit bot: https://github.com/Ezard/semantic-prs | ||
|
|
||
| # Always validate the PR title, and ignore the commits | ||
| titleOnly: true |
This file contains hidden or 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,48 @@ | ||
| name: ci | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| pre-commit: | ||
| name: 'Pre-commit checks' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
| - uses: pre-commit/action@v3.0.1 | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install and configure Poetry | ||
| uses: snok/install-poetry@v1 | ||
| with: | ||
| virtualenvs-create: true | ||
| virtualenvs-in-project: true | ||
| - name: Load cached venv | ||
| id: cached-poetry-dependencies | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: .venv | ||
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
| - name: Install dependencies | ||
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
| run: poetry install --no-interaction --no-root | ||
| - name: Install library | ||
| run: poetry install --no-interaction | ||
| - name: Run tests | ||
| run: | | ||
| source .venv/bin/activate | ||
| pytest |
This file contains hidden or 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,51 +1,21 @@ | ||
| name: Publish Python Package | ||
|
|
||
| on: | ||
| release: | ||
| types: [created] | ||
| push: | ||
| tags: | ||
| - "v*.*.*" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: pip | ||
| cache-dependency-path: setup.py | ||
| - name: Install dependencies | ||
| run: | | ||
| pip install '.[test]' | ||
| - name: Run tests | ||
| run: | | ||
| pytest | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
| needs: [test] | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| - uses: actions/checkout@v4 | ||
| - name: Build and publish to pypi | ||
| uses: JRubics/poetry-publish@v2.0 | ||
| with: | ||
| python-version: "3.11" | ||
| cache: pip | ||
| cache-dependency-path: setup.py | ||
| - name: Install dependencies | ||
| run: | | ||
| pip install setuptools wheel twine build | ||
| - name: Publish | ||
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
| run: | | ||
| python -m build | ||
| twine upload dist/* | ||
|
|
||
| pypi_token: ${{ secrets.PYPI_TOKEN }} | ||
| poetry_install_options: "--without dev" | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,11 +1,22 @@ | ||
| # IDE | ||
| .idea | ||
| .vscode | ||
|
|
||
| # Python virtualenv | ||
| .venv | ||
| venv | ||
|
|
||
| # Python artifacts | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
| venv | ||
| .eggs | ||
| .pytest_cache | ||
| *.egg-info | ||
|
|
||
| # MacOS | ||
| .DS_Store | ||
|
|
||
| # Build artifacts | ||
| dist | ||
| build |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.