Skip to content

Commit

Permalink
Merge branch 'release/3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnymillergh committed Sep 6, 2022
2 parents 8c9f5be + c0620c5 commit 48d2269
Show file tree
Hide file tree
Showing 44 changed files with 1,145 additions and 220 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test
name: Python CI with pipenv

on:
pull_request: {}
Expand Down Expand Up @@ -41,4 +41,4 @@ jobs:
run: docker build . -t python_boilerplate:smoke-test-tag
- name: Smoke test docker image
run: |
docker run --rm python_boilerplate:smoke-test-tag 10
docker run --rm python_boilerplate:smoke-test-tag param_3_from_command_line
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,7 @@ dmypy.json
# Pyre type checker
.pyre/

# pyinstrument
.profiles/

# End of https://www.gitignore.io/api/python
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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 --capture=no --log-cli-level=INFO
entry: pipenv run pytest --cov --cov-report html --capture=no --log-cli-level=DEBUG
types: [python]
pass_filenames: false

Expand All @@ -48,6 +48,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=70 --capture=no --log-cli-level=INFO
entry: pipenv run pytest --cov --cov-fail-under=85 --capture=no --log-cli-level=INFO
types: [python]
pass_filenames: false
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# [3.0.0](https://github.com/johnnymillergh/muscle-and-fitness-server/compare/2.0.0...3.0.0) (2022-09-06)


### Features

* **$loguru:** add level icon for log ([4e1cb15](https://github.com/johnnymillergh/python_boilerplate/commit/4e1cb159173ca370161450fbd898c4c71c547570))
* **$loguru:** change data output directory ([06ff16f](https://github.com/johnnymillergh/python_boilerplate/commit/06ff16f77388a4ab5081163066baf1dacc6967a6))
* **$loguru:** correct function reference for log ([11fbddc](https://github.com/johnnymillergh/python_boilerplate/commit/11fbddcfb3239ba7a701d32abdf55062a910035c))
* **$Loguru:** log file with hostname ([ab378b0](https://github.com/johnnymillergh/python_boilerplate/commit/ab378b07bf5edc3a6388ac1c15deeb1cfeaa672e))
* **$Loguru:** log more details for exception ([af5260b](https://github.com/johnnymillergh/python_boilerplate/commit/af5260b9c40e1d3a464e53d85e407edafca9ce25))
* **$pandas:** integrate matplotlib; filter Sony's game ([2a7d993](https://github.com/johnnymillergh/python_boilerplate/commit/2a7d9930b6f4356494adf7d24391aa08c3c3835a))
* **$peewee:** auto-register table by `@peewee` decorator ([ecd0cde](https://github.com/johnnymillergh/python_boilerplate/commit/ecd0cdedec526136e8f259514037d2553cbf3f28))
* **$profile:** sort profile HTML by original Python package ([5e7a651](https://github.com/johnnymillergh/python_boilerplate/commit/5e7a651a6934ccfad034326d4f130c134e5d357c))
* **$pytest:** integrate pyinstrument to profile test cases ([513d456](https://github.com/johnnymillergh/python_boilerplate/commit/513d4569a70baa8a02741e633f4b9ea5be339156))
* **$SQLite:** retain logs before the program exits ([f310130](https://github.com/johnnymillergh/python_boilerplate/commit/f310130a79be9f392332017f4186c4957f8d15cf))
* **$startup:** record current user and command line when startup ([8ed5022](https://github.com/johnnymillergh/python_boilerplate/commit/8ed5022f66440b3e2f5d37372117dabf2cedc9b5))
* **$Tenacity:** integrate Python retry library with Tenacity ([edff79a](https://github.com/johnnymillergh/python_boilerplate/commit/edff79aa5a492ef9a017e24e5d752cd0f05ec1c3))
* **$trace:** support function calling trace with SQLite persistence ([3b3b57a](https://github.com/johnnymillergh/python_boilerplate/commit/3b3b57a39d986772bdf97518efa630c8ef77a96c))
* record current user and host name ([7602d50](https://github.com/johnnymillergh/python_boilerplate/commit/7602d50277c6e0e329a7d8134496d2db1e0fc394))


### Performance Improvements

* **$Path:** use object-oriented filesystem paths ([d67cce1](https://github.com/johnnymillergh/python_boilerplate/commit/d67cce1a057df059d4e8768f7530169147e0f0f6))
* **$SQLite:** use recommended setting for SQLite ([dc4274d](https://github.com/johnnymillergh/python_boilerplate/commit/dc4274d6918151a8067357e5785fe991e3273450))
* profile pytest UT with pyinstrument ([ba55445](https://github.com/johnnymillergh/python_boilerplate/commit/ba554458824c6acbcc646750b7f2be0f7c3ad808))



# [2.0.0](https://github.com/johnnymillergh/muscle-and-fitness-server/compare/1.0.0...2.0.0) (2022-08-28)


Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ WORKDIR /app
COPY . .

RUN pwd
RUN ls -R -l -h
RUN ls -l -h

# Run the executable
ENTRYPOINT ["python", "-m", "python_boilerplate"]
CMD ["10"]
CMD ["param_1_from_command_line", "param_2_from_command_line"]
11 changes: 6 additions & 5 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,32 @@ 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"

# Data manipulation dependencies
# NumPy is a Python library used for working with arrays. https://pypi.org/project/numpy/
numpy = "==1.23.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"

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

# ORM dependencies
# Peewee is a simple and small ORM. https://pypi.org/project/peewee/
peewee = "==3.15.1"

# 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"
# 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"
# Retrying library for Python. https://pypi.org/project/tenacity/
tenacity = "==8.0.1"
# Python plotting package. https://pypi.org/project/matplotlib/
matplotlib = "==3.5.3"

[dev-packages]
# Black is the uncompromising Python code formatter. By using it, you agree to cede control over minutiae of
Expand All @@ -61,3 +60,5 @@ pytest = "==7.1.2"
pytest-mock = "==3.8.2"
# This plugin produces coverage reports. https://pypi.org/project/pytest-cov/
pytest-cov = "==3.0.0"
# Call stack profiler for Python. Shows you why your code is slow! https://github.com/joerick/pyinstrument
pyinstrument = "==4.3.0"
Loading

0 comments on commit 48d2269

Please sign in to comment.