Skip to content

Commit

Permalink
Create pyproject.toml
Browse files Browse the repository at this point in the history
Update pypi-test-publish.yml

Update pypi-publish.yml

Delete black.toml

Update pyproject.toml

Update pyproject.toml

Update tox.ini

Update tox.ini

Update pyproject.toml

Update black.yml

Update black.yml

Update pyproject.toml

Update pyproject.toml

Update pyproject.toml

Update black.yml

rename python project dir with underscore

Update tests/test_methods.py

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

formatting

Update pyproject.toml

Update pyproject.toml

Update pyproject.toml

Update pyproject.toml

Update pyproject.toml

Update pyproject.toml

Update pyproject.toml

Update pyproject.toml

Update pyproject.toml

Update pyproject.toml

Delete mypy.yml

Update pyproject.toml

Update pyproject.toml

Update pyright.yml

Update pytest.yml

Update pyproject.toml

Update pyproject.toml

Update pyproject.toml

Update pyproject.toml

Update pyproject.toml

Update __init__.py

Update ai_python_package/__init__.py

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Apply suggestions from code review

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Co-authored-by: Brett Cannon <brett@python.org>

Update .github/workflows/black.yml

Delete tox.ini

Update pyproject.toml

Update pyproject.toml

Update pypi-publish.yml

Update pytest.yml

Create bandit.yml

Rename main.yml to wemake-python-styleguide.yml

Update pyproject.toml

Co-authored-by: Steve Dower <steve.dower@microsoft.com>

create source directory

Update pyproject.toml

Update pyproject.toml

cleanup

Update pyright.yml

Update pyright.yml

Update pytest.yml

Update pytest.yml

Update bandit.yml

Update bandit.yml

Update black.yml

Update pylint.yml

Update pyproject.toml

Update pyproject.toml

Update pytest.yml

Update __init__.py

Update pytest.yml

Update bandit.yml

Update bandit.yml

Update black.yml

Update pylint.yml

Update pyright.yml

Update pytest.yml

Update bandit.yml

Update black.yml

Update pylint.yml

Update pyright.yml

Update pytest.yml

Update pypi-publish.yml

Update pypi-test-publish.yml

Update pypi-test-publish.yml

Update and rename pypi-publish.yml to twine.yml

Update pypi-test-publish.yml

Rename pypi-test-publish.yml to twine-test.yml

Update pyright.yml

Update pyright.yml

Update wemake-python-styleguide.yml

Update bandit.yml

Update black.yml

Create pull-request.yml

Update pylint.yml

Update pyright.yml

Update pytest.yml

Update pull-request.yml

Update pull-request.yml

Update pull-request.yml

Update pull-request.yml

Update pyproject.toml

Update pull-request.yml

Update pull-request.yml

Delete bandit.yml

Update pull-request.yml

Update pull-request.yml

Delete pylint.yml

Delete pyright.yml

Delete pytest.yml

Delete wemake-python-styleguide.yml

Apply suggestions from code review

Update pull-request.yml

Update pull-request.yml

Update pull-request.yml

Update pull-request.yml

Create .pre-commit-config.yaml

Update .pre-commit-config.yaml

Create noxfile.py

Create nox.yml

Update requirements.test.txt
  • Loading branch information
dciborow committed Apr 22, 2022
1 parent b19380f commit d45691b
Show file tree
Hide file tree
Showing 22 changed files with 502 additions and 289 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
# This is a basic workflow to help you get started with Actions
name: Black / Auto Formatter

name: Black

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
linter_name:
name: runner / black formatter
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check files using the black formatter
uses: rickstaa/action-black@v1
id: action_black
with:
black_args: "."
black_args: "--config pyproject.toml ."
- name: Annotate diff changes using reviewdog
if: steps.action_black.outputs.is_formatted == 'true'
uses: reviewdog/action-suggester@v1
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/main.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/mypy.yml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/nox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI
on: [push, pull_request]
env:
FORCE_COLOR: "1"
PRE_COMMIT_COLOR: "always"
# See https://github.com/theacodes/nox/issues/545
# and https://github.com/pre-commit/pre-commit/issues/2178#issuecomment-1002163763
SETUPTOOLS_USE_DISTUTILS: "stdlib"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Install Nox-under-test
run: |
python -m pip install --disable-pip-version-check .
- name: Run tests on ${{ matrix.os }}
run: nox --non-interactive --error-on-missing-interpreter --session "tests-${{ matrix.python-version }}" -- --full-trace
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Nox-under-test
run: |
python -m pip install --disable-pip-version-check .
- name: Lint
run: nox --non-interactive --error-on-missing-interpreter --session "lint"
docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Nox-under-test
run: |
python -m pip install --disable-pip-version-check .
- name: Docs
run: nox --non-interactive --error-on-missing-interpreter --session "docs"
deploy:
needs: build
runs-on: ubuntu-20.04
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- name: Build sdist and wheel
run: pipx run build
- name: Publish distribution PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
55 changes: 55 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Pull Request
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
linting:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Black
uses: rickstaa/action-black@v1
id: action_black
with:
black_args: "--config pyproject.toml src"
- name: Annotate diff changes using reviewdog
if: steps.action_black.outputs.is_formatted == 'true'
uses: reviewdog/action-suggester@v1
with:
tool_name: blackfmt
fail_on_error: true
- name: Bandit
uses: jpetrucciani/bandit-check@1.6.2
- name: Pylint
uses: dciborow/action-pylint@0.0.3
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
workdir: src
level: warning
- name: Pyright
uses: jakebailey/pyright-action@v1.1.0
with:
project: pyproject.toml

testing:
name: Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.x'
cache: 'pip'
- name: Pytest
run: |
python -m pip install --upgrade pip
python -m pip install pytest flit
python -m flit install
python -m pytest tests
26 changes: 0 additions & 26 deletions .github/workflows/pylint.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/pypi-publish.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/pypi-test-publish.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/pyright.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/pytest.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/twine-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Twine / Publish to Test PyPi

on:
workflow_dispatch

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2.2.2
with:
python-version: 3.7
- run: |
python -m pip install --upgrade pip
python -m pip install wheel twine
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_PASSWORD }}
repository_url: https://test.pypi.org/legacy/
Loading

0 comments on commit d45691b

Please sign in to comment.