Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
dermatologist committed Sep 17, 2021
2 parents 29868a2 + 10a6e62 commit 7a4d073
Show file tree
Hide file tree
Showing 47 changed files with 1,290 additions and 494 deletions.
28 changes: 28 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# .coveragerc to control coverage.py
[run]
branch = True
source = fhiry
# omit = bad_file.py

[paths]
source =
src/
*/site-packages/

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
20 changes: 20 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6
ARG VARIANT=3.7
FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT}

# [Option] Install Node.js
ARG INSTALL_NODE="true"
ARG NODE_VERSION="lts/*"
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
# COPY requirements.txt /tmp/pip-tmp/
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
# && rm -rf /tmp/pip-tmp

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

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
47 changes: 47 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "Python 3",
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {
// Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9
"VARIANT": "3.8",
// Options
"INSTALL_NODE": "false",
"NODE_VERSION": "lts/*"
}
},
"containerEnv": {
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}",
"GITHUB_USER": "${localEnv:GITHUB_USER}"
},
"workspaceFolder": "/fhiry",
"workspaceMount": "src=fhiry,dst=/fhiry,type=volume,volume-driver=local",
// Set *default* container specific settings.json values on container create.
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.languageServer": "Pylance",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"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"
],
// 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": "pip3 install --user -r requirements.txt -r dev-requirements.txt",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}
25 changes: 25 additions & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Configurations for todo: https://probot.github.io/apps/todo/
# Automatically add issues from @todo with @body
# /**
# * @todo What needs to be done
# * @body How to do it.
# */

# https://github.com/behaviorbot/welcome
newIssueWelcomeComment: >
Thank you for raising this issue. We will try and get back to you as soon as possible.
Be sure to star ✨ the repository for a priority response!
Please make sure you have given us as much context as possible.
newPRWelcomeComment: >
Thank you for submitting a pull request.
Please make sure you have followed our contributing guidelines in CONTRIBUTING.md. We will review it as soon as possible.
Be sure to star ✨ the repository.
firstPRMergeComment: >
Congrats on merging your first pull request! 🎉🎉🎉
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: "weekly"
# open-pull-requests-limit: 10

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
27 changes: 27 additions & 0 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Generate changelog

on:
push:
branches:
- "release/**"

jobs:
build:

runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout Latest Commit
uses: actions/checkout@v2

- name: Generate changelog
uses: charmixer/auto-changelog-action@v1
with:
token: ${{ secrets.github_token }}

- name: Commit changes
uses: EndBug/add-and-commit@v7
with:
default_author: github_actions
add: '*.md'
29 changes: 29 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Generate and puplish gh-pages
# https://docs.github.com/en/actions/guides/building-and-testing-python
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r dev-requirements.txt
- name: Create docs
run: |
make -C docs/ html
- name: Deploy Docs 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/_build/html # The folder the action should deploy.
33 changes: 0 additions & 33 deletions .github/workflows/pr.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Upload Python Package to PyPi
# https://docs.github.com/en/actions/guides/building-and-testing-python
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
- name: Build and publish
run: |
python setup.py bdist_wheel
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Python Test

on:
push:
branches:
- develop
pull_request:
branches:
- master
- develop

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.7]

steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt -r requirements.txt
- name: Test with pytest
run: |
pytest
29 changes: 29 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Python Test

on:
push:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.8]

steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt -r requirements.txt
- name: Test with tox
run: |
tox
18 changes: 13 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.py[cod]
*.so
*.cfg
!.isort.cfg
!setup.cfg
*.orig
*.log
Expand All @@ -11,15 +12,16 @@ __pycache__/*
.cache/*
.*.swp
*/.ipynb_checkpoints/*
.env
.DS_Store

# Project files
.ropeproject
.project
.pydevproject
.settings
.idea
.venv
conda
.vscode
tags

# Package files
*.egg
Expand All @@ -30,16 +32,22 @@ conda
# Unittest and coverage
htmlcov/*
.coverage
.coverage.*
.tox
junit.xml
junit*.xml
coverage.xml
.pytest_cache/

# Build and docs folder/files
build/*
dist/*
sdist/*
docs/api/*
docs/_rst/*
docs/_build/*
cover/*
MANIFEST
data/*

# Per-project virtualenvs
.venv*/
.conda*/
Loading

0 comments on commit 7a4d073

Please sign in to comment.