Skip to content

Commit

Permalink
Merge pull request #165 from k4cg/2.0-dev
Browse files Browse the repository at this point in the history
2.0
  • Loading branch information
jkowalleck authored Nov 26, 2019
2 parents 686d0c8 + ba7c9c8 commit ce5d73d
Show file tree
Hide file tree
Showing 142 changed files with 5,019 additions and 3,174 deletions.
45 changes: 45 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# .coveragerc to control coverage.py

[run]

data_file = .coverage
branch = True

source =
nichtparasoup

omit =
# Don't complain if non-runnable code isn't run:
*/__main__.py


[paths]

source =
./nichtparasoup
.tox/*/lib/python*/site-packages/nichtparasoup
.tox/pypy/site-packages/nichtparasoup


[report]

# TODO set proper value
fail_under = 0

exclude_lines =
# Have to re-enable the standard pragma
\#\s*pragma: no cover

# Don't complain if non-runnable code isn't run:
^if __name__ == ['"]__main__['"]:$
^\s*if False:
[html]
directory = htmlcov
[xml]
output = coverage.xml
39 changes: 34 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,61 @@ root = true
[*]
end_of_line = LF

[.editorconfig]
trim_trailing_whitespace = true
insert_final_newline = true

[*.py]
indent_style = space
indent_size = 4
tab_width = 4
trim_trailing_whitespace = true
insert_final_newline = true

[*.html]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true


[*.css]
indent_style = space
indent_size = 2
tab_width = 2
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

[*.js]
indent_style = space
indent_size = 2
tab_width = 2
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

[*.ini]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

[*.{yml, yaml}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
indent_style = space
indent_size = 3
trim_trailing_whitespace = false
insert_final_newline = true

[*.{rst, txt}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

[{*.cfg, .pypirc, .coveragerc, .flake8}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
16 changes: 16 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[flake8]

show-source = True

# ignore self markers of https://github.com/python-discord/flake8-annotations
ignore = TYP101,TYP102

exclude = .git,__pycache__,_OLD,_TEST,build,dist,.tox,*_cache,.eggs
setup.py
docs

max-complexity = 5

# allow up to 119 characters as this is the width of GitHub code review
max-line-length = 119

52 changes: 52 additions & 0 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Test & Build"

on:
push:
pull_request:
release:
types: [created]

jobs:
test:
name: Testing
strategy:
matrix:
os: ['ubuntu-latest']
pyhon: ['3.5', '3.6', '3.7', '3.8']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.pyhon_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.pyhon }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools tox
- name: Test with tox
run: |
python3 -m tox
publish:
name: Publishing
if: github.event_name == 'release' && github.event.action == 'created'
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools setuptools_scm wheel twine
- name: Build and publish
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
95 changes: 85 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@

## ignore our own log files
*.log
logs/*

## ignore our own custom config
./config.ini
_OLD/
_TEST/



## ignore python runtime files - based on https://github.com/github/gitignore/blob/master/Python.gitignore
## https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
Expand All @@ -40,17 +46,86 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

9 changes: 9 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[isort]
## read the docs: https://github.com/timothycrosley/isort/wiki/isort-Settings
# config shamelessly plugged from django
combine_as_imports = true
default_section = THIRDPARTY
include_trailing_comma = true
known_first_party = nichtparasoup
line_length = 119
multi_line_output = 5
53 changes: 53 additions & 0 deletions .travis.disabled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
## not using travisCI for this project anymore
## switched to github actions

version: ~> 1.0

os: "linux"
dist: "xenial"

language: "python"

cache: "pip"

install:
- "python3 -m pip install --upgrade pip setuptools"
- "python3 -m pip install --upgrade tox"

script: "python3 -m tox"

stages:
- name: "Testing"
- name: "Publishing"
if: "tag IS present"

jobs:
include:
- stage: "Testing"
dist: "trusty"
python: "3.5"
env: "TOXENV=py35-codecov"
- stage: "Testing"
python: "3.6"
env: "TOXENV=py36-codecov"
- stage: "Testing"
python: "3.7"
env: "TOXENV=py37-codecov"
- stage: "Testing"
python: "3.8"
env: "TOXENV=py38-codecov"
- stage: "Publishing"
name: "PYPI"
install:
- "python3 -m pip install --upgrade pip setuptools"
- "python3 -m pip install --upgrade twine wheel"
script: skip
deploy:
provider: "pypi"
username: "__token__"
password:
secure: "TODO"
distributions: "sdist bdist_wheel"
on:
branch: master
tags: true
Loading

0 comments on commit ce5d73d

Please sign in to comment.