Skip to content

Commit

Permalink
Revert "Create pyproject.toml"
Browse files Browse the repository at this point in the history
  • Loading branch information
dciborow authored May 2, 2022
1 parent 83f5dfd commit e01c9ce
Show file tree
Hide file tree
Showing 42 changed files with 655 additions and 713 deletions.
18 changes: 10 additions & 8 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bi
&& rm -rf /tmp/conda-tmp

RUN conda install -y python=3.8 \
&& python3.8 -m pip install --upgrade pip \
&& python3.8 -m pip install \
pytest \
pytest-cov \
flit \
pre-commit
&& python3.8 -m pip install --upgrade pip tox

COPY requirements.test.txt /tmp/
RUN python3.8 -m pip install -r /tmp/requirements.test.txt

COPY .pre-commit-config.yaml .
RUN git init . && pre-commit install-hooks
COPY requirements.txt /tmp/
RUN python3.8 -m pip install -r /tmp/requirements.txt

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
16 changes: 8 additions & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/python-3-miniconda
{
"name": "Miniconda (Python 3)",
"build": {
"build": {
"context": "..",
"dockerfile": "Dockerfile",
"args": {
"NODE_VERSION": "none"
}
},

// Set *default* container specific settings.json values on container create.
"settings": {
"settings": {
"python.defaultInterpreterPath": "/opt/conda/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
Expand All @@ -24,20 +25,19 @@
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.pylint",
"ms-python.black-formatter",
"ms-vsliveshare.vsliveshare",
"ryanluker.vscode-coverage-gutters",
"bungcip.better-toml"
"ms-python.vscode-pylance"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "python --version",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/noop.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This file is copied into the container along with environment.yml* from the
parent folder. This is done to prevent the Dockerfile COPY instruction from
parent folder. This is done to prevent the Dockerfile COPY instruction from
failing if no environment.yml is found.
16 changes: 0 additions & 16 deletions .flake8

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/CI.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This is a basic workflow to help you get started with Actions

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
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: "."
- 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
22 changes: 22 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: wemake-python-styleguide

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: wemake-python-styleguide
uses: wemake-services/wemake-python-styleguide@0.15.3
env:
GITHUB_TOKEN: ${{ github.token }}
with:
path: ${{ secrets.PACKAGE }}
reporter: github-pr-review
27 changes: 27 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This is a basic workflow to help you get started with Actions

name: MyPy

# 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
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run mypy with reviewdog
# You may pin to the exact commit or the version.
# uses: tsuyoshicho/action-mypy@2160e947d397ac0be7f02c911c3a5bea3f498575
uses: tsuyoshicho/action-mypy@v3.1.0
with:
reporter: github-pr-review
workdir: ${{ secrets.PACKAGE }}
33 changes: 0 additions & 33 deletions .github/workflows/publish.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PyLint
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:
pylint:
name: runner / pylint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dciborow/action-pylint@0.0.3
with:
github_token: ${{ secrets.github_token }}
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
reporter: github-pr-review
# Change reporter level if you need.
# GitHub Status Check won't become failure with warning.
workdir: ${{ secrets.PACKAGE }}
level: warning
30 changes: 30 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2.2.2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
- name: Install dependencies
run: |
python3.7 -m pip install --upgrade pip
python3.7 -m pip install virtualenv pip-tools
pip install ${{ secrets.PACKAGE }}
30 changes: 30 additions & 0 deletions .github/workflows/pypi-test-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test Upload Python Package

on:
workflow_dispatch

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2.2.2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_PASSWORD }}
repository_url: https://test.pypi.org/legacy/
- name: Install dependencies
run: |
python3.7 -m pip install --upgrade pip
python3.7 -m pip install virtualenv pip-tools
pip install --extra-index-url https://test.pypi.org/simple ${{ secrets.PACKAGE }}
27 changes: 27 additions & 0 deletions .github/workflows/pyright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This is a basic workflow to help you get started with Actions

name: pyright

# 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
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jordemort/action-pyright@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # You need this
reporter: github-pr-review # Change reporter.
- uses: ricardochaves/python-lint@v1.4.0
with:
python-root-list: ${{ secrets.PACKAGE }}
32 changes: 32 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This is a basic workflow to help you get started with Actions

name: PyTest

# 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:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Test dependencies
run: |
pip install -e .[all]
pytest tests
Loading

0 comments on commit e01c9ce

Please sign in to comment.