Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .coverage
Binary file not shown.
6 changes: 0 additions & 6 deletions .coveragerc

This file was deleted.

6 changes: 3 additions & 3 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version = 1

test_patterns = ["klib/tests/**"]
test_patterns = ["tests/**"]

[[analyzers]]
name = "python"
enabled = true

[analyzers.meta]
runtime_version = "3.x.x"
[analyzers.meta]
runtime_version = "3.x.x"
27 changes: 9 additions & 18 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Flake8 🐍 PyTest ´
name: pylint 🐍 pytest ´

on:
push:
Expand All @@ -13,7 +13,7 @@ jobs:
build:
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: [3.7, 3.8, 3.9] # , "3.10"
platform: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.platform }}
Expand All @@ -27,26 +27,17 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install poetry
poetry config virtualenvs.in-project true
poetry install -v

- name: Lint with flake8
- name: Lint with pylint
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=90 --statistics
poetry run pylint src/

- name: Test with pytest and generate coverage report
run: |
pip install pytest
pytest

- name: Codecov
run: |
pip install coverage
coverage run -m unittest discover
coverage report
poetry run pytest

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2
17 changes: 9 additions & 8 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@ jobs:
- name: Set up latest Python Version
uses: actions/setup-python@v1
with:
python-version: "3.x"
- name: Install dependencies (incl. packages and setuptools ...)
python-version: "3.9.*"
- name: Install Poetry and dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install -r requirements.txt
python -m pip install poetry
poetry config virtualenvs.in-project true
poetry install -v
- name: Build and publish 📦 to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
PUBLISH_TOKEN: ${{ secrets.POETRY_PUBLISH_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
source .venv/bin/activate
poetry config pypi-token.pypi $PUBLISH_TOKEN
poetry publish --build
135 changes: 123 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,129 @@
# Folders and files
# Byte-compiled / optimized / DLL files
__pycache__/
.pytest_cache
.ipynb_checkpoints
.vscode/
/build/
/dist/
/misc/
*.code-workspace
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
*.zip
/klib/scripts/*.png
.installed.cfg
*.egg
MANIFEST

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
/tests/reports

# Sphinx
docs/build/
# Sphinx documentation
docs/_build/
docs/source/_build
docs/source/_static
docs/source/_templates

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .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

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# 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/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/


/misc/
.vscode/
10 changes: 0 additions & 10 deletions .isort.cfg

This file was deleted.

4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import os
import sys

from klib._version import __version__
# from klib._version import __version__

sys.path.insert(0, os.path.abspath("."))

Expand All @@ -24,7 +24,7 @@
author = "Andreas Kanz"

# The full version, including alpha/beta/rc tags
release = __version__
# release = __version__


# -- General configuration ---------------------------------------------------
Expand Down
64 changes: 38 additions & 26 deletions examples/klib_data_cleaning.ipynb

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion klib/_version.py

This file was deleted.

Loading