Skip to content

Commit

Permalink
Merge pull request #1134 from Nytelife26/chore/update
Browse files Browse the repository at this point in the history
chore: modernize proselint
  • Loading branch information
suchow committed May 16, 2021
2 parents cb619ee + 9ff059e commit 8854413
Show file tree
Hide file tree
Showing 23 changed files with 1,525 additions and 208 deletions.
2 changes: 0 additions & 2 deletions .coveralls.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/cd-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "CD: PyPI"
on:
release:
types: [created]
jobs:
release:
name: Release
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
matrix:
python: [3.9]
steps:
- name: "[INIT] Checkout repository"
uses: actions/checkout@v2
- name: "[INIT] Install Python ${{ matrix.python }}"
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: "[INIT] Restore dependency cache"
id: cache-restore
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-py${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
- name: "[INIT] Install dependencies"
if: ${{ !steps.cache-restore.outputs.cache-hit }}
run: pip install poetry && poetry install
- name: "[EXEC] Build"
run: poetry build
- name: "[EXEC] Publish to PyPI"
run: poetry run twine upload dist/*
env:
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASS }}
35 changes: 35 additions & 0 deletions .github/workflows/cd-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "CD: Site"
on:
release:
types: [created]
jobs:
build-site:
name: Build Site
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
matrix:
python: [3.9]
ruby: [3.0.0]
steps:
- name: "[INIT] Checkout repository"
uses: actions/checkout@v2
- name: "[INIT] Install Python ${{ matrix.python }}"
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: "[INIT] Install Ruby ${{ matrix.ruby }}"
uses: ruby/setup-ruby@v1.70.1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: "[EXEC] Insert demo"
run: python scripts/insert_demo.py
- name: "[EXEC] Build site"
run: cd site && jekyll build
- name: "[EXEC] Push to s3"
run: s3_website push
- name: "[POST] Verify crawl"
run: "cd .. && wget --spider -e robots=off -w 1 -r -p http://www.proselint.com"
23 changes: 23 additions & 0 deletions .github/workflows/ci-danger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "CI: Danger"
on: [pull_request]
jobs:
danger:
name: Danger
if: "!(contains(github.event.head_commit.message, '[skip_ci]'))"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
matrix:
ruby: [3.0.0]
steps:
- name: "[INIT] Checkout repository"
uses: actions/checkout@v2
- name: "[INIT] Install Ruby ${{ matrix.ruby }}"
uses: ruby/setup-ruby@v1.70.1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: "[EXEC] Run Danger"
run: bundle exec danger
79 changes: 79 additions & 0 deletions .github/workflows/ci-lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: "CI: Lint & Test"
on: [push, pull_request]
jobs:
lint:
name: Lint
if: "!(contains(github.event.head_commit.message, '[skip_ci]'))"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
matrix:
python: [3.9]
steps:
- name: "[INIT] Checkout repository"
uses: actions/checkout@v2
- name: "[INIT] Install Python ${{ matrix.python }}"
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: "[INIT] Restore dependency cache"
id: cache-restore
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-py${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
- name: "[INIT] Install dependencies"
if: ${{ !steps.cache-restore.outputs.cache-hit }}
run: pip install poetry && poetry install
- name: "[EXEC] Lint"
run: poetry run pycodestyle --config pyproject.toml && poetry run pydocstyle
test-cover:
name: Test & Cover
if: "!(contains(github.event.head_commit.message, '[skip_ci]'))"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
matrix:
python: [3.6, 3.7, 3.8, 3.9, pypy3]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: "[INIT] Checkout repository"
uses: actions/checkout@v2
- name: "[INIT] Install Python ${{ matrix.python }}"
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: "[INIT] Restore dependency cache"
id: cache-restore
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-py${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
- name: "[INIT] Install dependencies"
if: ${{ !steps.cache-restore.outputs.cache-hit }}
run: pip install poetry && poetry install
- name: "[EXEC] Test"
run: poetry run coverage run -m pytest --continue-on-collection-errors
- name: "[EXEC] Upload coverage to Coveralls"
run: poetry run coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
COVERALLS_FLAG_NAME: run-${{ matrix.os }}-py${{ matrix.python }}
COVERALLS_PARALLEL: true
cover:
name: Finalize Coverage Report
if: "!(contains(github.event.head_commit.message, '[skip_ci]'))"
needs: test-cover
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: "[POST] Finalize Coveralls collection"
run: pip3 install coveralls && coveralls --finish --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
63 changes: 0 additions & 63 deletions .travis.yml

This file was deleted.

12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
A guide to how you can contribute to proselint can be found at http://proselint.com/contributing.
A guide to how you can contribute to proselint can be found on [our website].

Work on proselint happens over at http://github.com/amperser/proselint. To contribute, create a new branch off master and then open a pull request. Your code should run cleanly through pep8 and pep257 linters. Comments, bug reports, and other feedback can be provided through GitHub issues.
Work on proselint happens over at [our GitHub]. To contribute, create a new
branch off master and then open a pull request. Your code should run cleanly
through `pycodestyle` and `pydocstyle` linters (pro tip \- outside of CI,
use `pycodestyle --config=pyproject.toml && pydocstyle -se` for more
descriptive information on what's causing your lint failures). Comments,
bug reports, and other feedback can be provided through GitHub issues.

[our website]: http://proselint.com/contributing
[our GitHub]: http://github.com/amperser/proselint
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ source "https://rubygems.org"

gem "danger"
gem "danger-prose"
gem "jekyll-gist"
gem "jekyll"
gem "jekyll-sitemap"
gem "s3_website"
gem "compass"
gem "kramdown"
18 changes: 0 additions & 18 deletions appveyor.yml

This file was deleted.

Empty file removed bump
Empty file.
5 changes: 3 additions & 2 deletions clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from apscheduler.schedulers.blocking import BlockingScheduler
import gmail
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from worker import conn
import requests
import hashlib
Expand Down Expand Up @@ -101,4 +101,5 @@ def check_email():

print("Email {} has been replied to.".format(hash))


scheduler.start()
Loading

0 comments on commit 8854413

Please sign in to comment.