Skip to content

Cleanup project setup #176

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 8 commits into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @Doist/Integrations
* @Doist/Backend
24 changes: 19 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: tests

on: [pull_request, workflow_dispatch]

env:
POETRY_HOME: ${{ github.workspace }}/.poetry

jobs:
build-test:
runs-on: ubuntu-latest
Expand All @@ -11,18 +14,29 @@ jobs:
with:
fetch-depth: 1

- name: Read Python version
id: python-version
run: echo "version=$(cat .python-version)" >> $GITHUB_OUTPUT

- name: Read Poetry version
id: poetry-version
run: echo "version=$(cat .poetry-version)" >> $GITHUB_OUTPUT

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: ${{ steps.python-version.outputs.version }}

- name: Set up Poetry
run: |
python3 -m venv $POETRY_HOME
$POETRY_HOME/bin/pip install "poetry==${{ steps.poetry-version.outputs.version }}"

- name: Install dependencies
run: |
set -ex
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 - --yes
$HOME/.poetry/bin/poetry install
$POETRY_HOME/bin/poetry install --with dev

- name: Test with pytest
run: |
set -ex
$HOME/.poetry/bin/poetry run pytest
$POETRY_HOME/bin/poetry run pytest
36 changes: 24 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Release package

on:
push:
tags:
- 'v*'
push:
tags:
- "v*"

env:
POETRY_HOME: ${{ github.workspace }}/.poetry

jobs:
build-test:
Expand All @@ -14,23 +17,32 @@ jobs:
with:
fetch-depth: 1

- name: Read Python version
id: python-version
run: echo "version=$(cat .python-version)" >> $GITHUB_OUTPUT

- name: Read Poetry version
id: poetry-version
run: echo "version=$(cat .poetry-version)" >> $GITHUB_OUTPUT

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: ${{ steps.python-version.outputs.version }}

- name: Set up Poetry
run: |
python3 -m venv $POETRY_HOME
$POETRY_HOME/bin/pip install "poetry==${{ steps.poetry-version.outputs.version }}"

- name: Install dependencies
run: |
set -ex
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 - --yes
$HOME/.poetry/bin/poetry install
$POETRY_HOME/bin/poetry install --with publishing

- name: Build and publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
python -m build
python -m twine upload dist/*
$POETRY_HOME/bin/poetry run python -m build
$POETRY_HOME/bin/poetry run python -m twine upload dist/*
2 changes: 0 additions & 2 deletions .isort.cfg

This file was deleted.

1 change: 1 addition & 0 deletions .poetry-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.1.2
13 changes: 0 additions & 13 deletions mypy.ini

This file was deleted.

924 changes: 780 additions & 144 deletions poetry.lock

Large diffs are not rendered by default.

Loading