-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' of github.com:Scale3-Labs/langtrace-python…
…-sdk into development
- Loading branch information
Showing
7 changed files
with
676 additions
and
68 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,21 @@ | ||
[flake8] | ||
ignore = | ||
# line too long, defer to black | ||
E501 | ||
|
||
# allow line breaks before binary ops | ||
W503 | ||
|
||
# allow line breaks after binary ops | ||
W504 | ||
|
||
# allow whitespace before ':' (https://github.com/psf/black#slices) | ||
E203 | ||
|
||
exclude = | ||
.git | ||
.venv*/ | ||
venv*/ | ||
target | ||
__pycache__ | ||
*/build/lib/* |
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,35 @@ | ||
# This action requires that any PR targeting the main branch should touch at | ||
# least one CHANGELOG file. If a CHANGELOG entry is not required, add the "Skip | ||
# Changelog" label to disable this action. | ||
|
||
name: changelog | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, labeled, unlabeled] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
changelog: | ||
runs-on: ubuntu-latest | ||
if: | | ||
!contains(github.event.pull_request.labels.*.name, 'Skip Changelog') | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Check for CHANGELOG changes | ||
run: | | ||
# Only the latest commit of the feature branch is available | ||
# automatically. To diff with the base branch, we need to | ||
# fetch that too (and we only need its latest commit). | ||
git fetch origin ${{ github.base_ref }} --depth=1 | ||
if [[ $(git diff --name-only FETCH_HEAD | grep CHANGELOG) ]] | ||
then | ||
echo "A CHANGELOG was modified. Looks good!" | ||
else | ||
echo "No CHANGELOG was modified." | ||
echo "Please add a CHANGELOG entry, or add the \"Skip Changelog\" label if not required." | ||
false | ||
fi |
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,34 +1,95 @@ | ||
name: Publish Python 🐍 distributions 📦 to PyPI | ||
name: Versioning | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- development | ||
|
||
jobs: | ||
build-n-publish: | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI | ||
versioning: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
- name: Install pypa/setuptools | ||
run: >- | ||
python -m | ||
pip install wheel | ||
- name: Extract tag name | ||
id: tag | ||
run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3) | ||
- name: Update version in setup.py | ||
run: >- | ||
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py | ||
- name: Build a binary wheel | ||
run: >- | ||
python setup.py sdist bdist_wheel | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install hatch | ||
- name: Bump version | ||
run: | | ||
hatch version patch | ||
git push origin development | ||
- name: Tag release | ||
run: | | ||
git tag $(hatch version) | ||
git push origin --tags | ||
# name: Publish Python 🐍 distributions 📦 to PyPI | ||
|
||
# on: | ||
# push: | ||
# branches: | ||
# - development | ||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# python-version: ['3.9'] | ||
|
||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Install Poetry | ||
# run: pipx install poetry | ||
# - name: Set up Python ${{ matrix.python-version }} | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: ${{ matrix.python-version }} | ||
# cache: 'poetry' | ||
# - name: Install dependencies | ||
# run: poetry install | ||
# - name: Test with Pytest | ||
# run: poetry run pytest | ||
# - name: Lint with flake8 | ||
# run: poetry run flake8 | ||
# release: | ||
# needs: build | ||
# if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# python-version: ["3.9"] | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: Install Poetry | ||
# run: pipx install poetry | ||
# - name: Set up Python ${{ matrix.python-version }} | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: ${{ matrix.python-version }} | ||
|
||
# - name: Install dependencies | ||
# run: poetry install | ||
# - name: Prepare package for release | ||
# env: | ||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# run: | | ||
# git config user.name github-actions | ||
# git config user.email github-actions@github.com | ||
# poetry run semantic-release publish | ||
# - name: Publish to PyPI 📦 | ||
# uses: pypa/gh-action-pypi-publish@release/v1 | ||
# with: | ||
# user: __token__ | ||
# password: ${{ secrets.PYPI_TOKEN }} | ||
|
||
|
||
|
Oops, something went wrong.