Skip to content

Commit

Permalink
Merge branch 'release/4.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnymillergh committed Mar 4, 2023
2 parents 6fe606b + c2f7fc7 commit 0099602
Show file tree
Hide file tree
Showing 40 changed files with 1,170 additions and 693 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
!Pipfile
!Pipfile.lock
!python_boilerplate
!setup.cfg
17 changes: 12 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,25 @@ jobs:
compilation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
- uses: actions/checkout@v3
# The actions/cache step below uses this id to get the exact python version
- id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.10.6"
python-version: "3.11.2"
architecture: x64
# https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages
cache: "pipenv"
# https://github.com/actions/cache/blob/main/examples.md#python---pipenv
- uses: actions/cache@v3
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
- name: Install Dependencies with pipenv
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
pip install pipenv
pipenv install --deploy --dev
pipenv install --quiet --deploy --dev
- run: pipenv run isort --recursive --diff .
- run: pipenv run black --check .
- run: pipenv run flake8
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
repos:
# https://github.com/pre-commit/pre-commit-hooks/releases/tag/v4.3.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand Down Expand Up @@ -47,7 +47,7 @@ repos:
language: system
# https://github.com/pytest-dev/pytest/issues/5502#issuecomment-1020761655
# Prevent Pytest logging error like: ValueError: I/O operation on closed file.
entry: pipenv run pytest --cov --cov-report html --html=./build/.pytest_report/report.html --self-contained-html --log-cli-level=DEBUG -n auto
entry: env LOG_LEVEL=DEBUG pipenv run pytest --cov --cov-report html --html=./build/.pytest_report/report.html --self-contained-html --log-cli-level=DEBUG -n auto
types: [ python ]
pass_filenames: false
- id: pytest-cov
Expand All @@ -56,6 +56,6 @@ repos:
language: system
# https://github.com/pytest-dev/pytest/issues/5502#issuecomment-1020761655
# Prevent Pytest logging error like: ValueError: I/O operation on closed file.
entry: pipenv run pytest --cov --cov-fail-under=85 --capture=no --log-cli-level=INFO -n auto
entry: env LOG_LEVEL=ERROR pipenv run pytest --cov --cov-fail-under=85 --capture=no --log-cli-level=ERROR -n auto
types: [ python ]
pass_filenames: false
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
FROM python:3.10-slim AS base
FROM python:3.11-slim AS base

# Setup env
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONFAULTHANDLER 1


FROM base AS python-deps

# Install pipenv and compilation dependencies
RUN pip install pipenv
RUN pip install pipenv==2022.10.25
RUN apt-get update && apt-get install -y --no-install-recommends gcc

# Install python dependencies in /.venv
COPY Pipfile .
COPY Pipfile.lock .
RUN PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy

RUN PIPENV_VENV_IN_PROJECT=1 pipenv install --quiet --deploy

FROM base AS runtime

Expand Down
50 changes: 25 additions & 25 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,72 +4,72 @@ url = "https://pypi.python.org/simple"
verify_ssl = true

[requires]
# https://docs.python.org/3/whatsnew/3.10.html
python_version = "3.10"
# https://docs.python.org/3/whatsnew/3.11.html
python_version = "3.11"

[packages]
# Foundamental dependencies
# Loguru is a library which aims to bring enjoyable logging in Python. https://pypi.org/project/loguru/
loguru = "==0.6.0"
# pyhocon is a HOCON parser for Python. Additionally we provide a tool (pyhocon) to convert any HOCON content into json,
# yaml and properties format. https://pypi.org/project/pyhocon/
pyhocon = "==0.3.59"
pyhocon = "==0.3.60"
# Data manipulation dependencies
# NumPy is a Python library used for working with arrays. https://pypi.org/project/numpy/
numpy = "==1.23.2"
numpy = "==1.24.2"
# pandas is a Python package that provides fast, flexible, and expressive data structures designed to make working
# with "relational" or "labeled" data both easy and intuitive. https://pypi.org/project/pandas/
pandas = "==1.4.3"
pandas = "==1.5.3"
# Python enhancement dependencies
# Arrow is a Python library that offers a sensible and human-friendly approach to creating, manipulating,
# formatting and converting dates, times and timestamps. https://pypi.org/project/arrow/
arrow = "==1.2.2"
arrow = "==1.2.3"
# ORM dependencies
# Peewee is a simple and small ORM. https://pypi.org/project/peewee/
peewee = "==3.15.1"
peewee = "==3.16.0"
# Template engine dependencies
# Jinja is a fast, expressive, extensible templating engine. https://pypi.org/project/Jinja2/
jinja2 = "==3.1.2"
# Tool dependencies
# Faker is a Python package that generates fake data for you. https://pypi.org/project/Faker/
faker = "==14.1.0"
faker = "==17.6.0"
# A Python module to parse, validate and reformat standard numbers and codes in different formats.
# It contains a large collection of number formats. https://pypi.org/project/python-stdnum/
python-stdnum = "==1.17"
python-stdnum = "==1.18"
# Retrying library for Python. https://pypi.org/project/tenacity/
tenacity = "==8.0.1"
tenacity = "==8.2.2"
# Python plotting package. https://pypi.org/project/matplotlib/
matplotlib = "==3.5.3"
matplotlib = "==3.7.0"

[dev-packages]
# Black is the uncompromising Python code formatter. By using it, you agree to cede control over minutiae of
# hand-formatting. https://pypi.org/project/black/
black = "==22.6.0"
black = "==23.1.0"
# Naming Convention checker for Python. https://github.com/PyCQA/pep8-naming
pep8-naming = "==0.13.2"
pep8-naming = "==0.13.3"
# Linting & toolkit for checking your code base against coding style (PEP8). https://pypi.org/project/flake8/
flake8 = "==5.0.4"
flake8 = "==6.0.0"
# https://github.com/DmytroLitvinov/awesome-flake8-extensions
flake8-quotes = "==3.3.1"
flake8-quotes = "==3.3.2"
flake8-print = "==5.0.0"
flake8-use-fstring = "==1.4"
flake8-comprehensions = "==3.10.0"
flake8-comprehensions = "==3.10.1"
# isort your imports, so you don't have to. https://pypi.org/project/isort/
isort = "==5.10.1"
isort = "==5.12.0"
# Add type annotations to your Python programs, and use mypy to type check them. https://pypi.org/project/mypy/
mypy = "==0.971"
mypy = "==1.0.1"
# A framework for managing and maintaining multi-language pre-commit hooks. https://pypi.org/project/pre-commit/
pre-commit = "==2.20.0"
pre-commit = "==3.1.1"
# The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
# for applications and libraries. https://pypi.org/project/pytest/
pytest = "==7.1.2"
pytest = "==7.2.2"
# Thin-wrapper around the mock package for easier use with pytest. https://pypi.org/project/pytest-mock/
pytest-mock = "==3.8.2"
pytest-mock = "==3.10.0"
# This plugin produces coverage reports. https://pypi.org/project/pytest-cov/
pytest-cov = "==3.0.0"
pytest-cov = "==4.0.0"
# Plugin for generating HTML reports for pytest results. https://github.com/pytest-dev/pytest-html/
pytest-html = "==3.1.1"
pytest-html = "==3.2.0"
# pytest xdist plugin for distributed testing and loop-on-failing modes. https://github.com/pytest-dev/pytest-xdist/
pytest-xdist = "==2.5.0"
pytest-xdist = "==3.2.0"
# Call stack profiler for Python. Shows you why your code is slow! https://github.com/joerick/pyinstrument
pyinstrument = "==4.3.0"
pyinstrument = "==4.4.0"
Loading

1 comment on commit 0099602

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.