Skip to content

Commit c489383

Browse files
committed
Create pyproject.toml
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
1 parent b19380f commit c489383

18 files changed

Lines changed: 225 additions & 289 deletions

‎.github/workflows/black.yml‎

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
1-
# This is a basic workflow to help you get started with Actions
1+
name: Black / Auto Formatter
22

3-
name: Black
4-
5-
# Controls when the workflow will run
63
on:
7-
# Triggers the workflow on push or pull request events but only for the main branch
8-
push:
9-
branches: [ main ]
10-
pull_request:
11-
branches: [ main ]
12-
13-
# Allows you to run this workflow manually from the Actions tab
144
workflow_dispatch:
5+
156
jobs:
16-
linter_name:
17-
name: runner / black formatter
7+
black:
188
runs-on: ubuntu-latest
199
steps:
2010
- uses: actions/checkout@v2
2111
- name: Check files using the black formatter
2212
uses: rickstaa/action-black@v1
2313
id: action_black
2414
with:
25-
black_args: "."
15+
black_args: "--config pyproject.toml ."
2616
- name: Annotate diff changes using reviewdog
2717
if: steps.action_black.outputs.is_formatted == 'true'
2818
uses: reviewdog/action-suggester@v1

‎.github/workflows/main.yml‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎.github/workflows/mypy.yml‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎.github/workflows/pull-request.yml‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Pull Request
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
workflow_dispatch:
8+
9+
jobs:
10+
linting:
11+
name: Static Analysis
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Black
16+
uses: rickstaa/action-black@v1
17+
id: action_black
18+
with:
19+
black_args: "--config pyproject.toml src"
20+
- name: Annotate diff changes using reviewdog
21+
if: steps.action_black.outputs.is_formatted == 'true'
22+
uses: reviewdog/action-suggester@v1
23+
with:
24+
tool_name: blackfmt
25+
fail_on_error: true
26+
- name: Bandit
27+
uses: jpetrucciani/bandit-check@1.6.2
28+
- name: Pylint
29+
uses: dciborow/action-pylint@0.0.3
30+
with:
31+
github_token: ${{ secrets.github_token }}
32+
reporter: github-pr-review
33+
workdir: src
34+
level: warning
35+
- name: Pyright
36+
uses: jakebailey/pyright-action@v1.1.0
37+
with:
38+
project: pyproject.toml
39+
40+
testing:
41+
name: Pytest
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v2
45+
- uses: actions/setup-python@v1
46+
with:
47+
python-version: '3.x'
48+
cache: 'pip'
49+
- name: Unit Testing
50+
run: |
51+
python -m pip install --upgrade pip
52+
python -m pip install pytest flit
53+
54+
python -m flit install
55+
python -m pytest tests

‎.github/workflows/pylint.yml‎

Lines changed: 0 additions & 26 deletions
This file was deleted.

‎.github/workflows/pypi-publish.yml‎

Lines changed: 0 additions & 30 deletions
This file was deleted.

‎.github/workflows/pypi-test-publish.yml‎

Lines changed: 0 additions & 30 deletions
This file was deleted.

‎.github/workflows/pyright.yml‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎.github/workflows/pytest.yml‎

Lines changed: 0 additions & 32 deletions
This file was deleted.

‎.github/workflows/twine-test.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Twine / Publish to Test PyPi
2+
3+
on:
4+
workflow_dispatch
5+
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-python@v2.2.2
12+
with:
13+
python-version: 3.7
14+
- run: |
15+
python -m pip install --upgrade pip
16+
python -m pip install wheel twine
17+
- uses: pypa/gh-action-pypi-publish@release/v1
18+
with:
19+
user: __token__
20+
password: ${{ secrets.TEST_PYPI_PASSWORD }}
21+
repository_url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)