Skip to content

Commit

Permalink
update and simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
alexferl committed Dec 8, 2023
1 parent db3cd9d commit 0b707f0
Show file tree
Hide file tree
Showing 19 changed files with 69 additions and 378 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,18 @@ on:
- master
jobs:
build:
runs-on: '${{ matrix.os }}'
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os:
- ubuntu-latest
python-version:
- '3.11'
- "3.11"
steps:
- name: 'Set up Python ${{ matrix.python-version }}'
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v2
with:
python-version: '${{ matrix.python-version }}'
python-version: "${{ matrix.python-version }}"
- uses: actions/checkout@v2
- run: pip install pytest-cov codecov
- run: pip install -r requirements-dev.txt
- run: pytest
#- run: pytest --cov=./python_boilerplate
#- run: codecov
- run: make test
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
args: ['--fix=lf']
description: Forces to replace line ending by the UNIX 'lf' character.
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.11.0
hooks:
- id: black
language_version: python3
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
.PHONY: help dev test lint pre-commit
.PHONY: help dev test lint pre-commit freeze

.DEFAULT: help
help:
@echo "make dev"
@echo " prepare development environment"
@echo "make test"
@echo " run tests"
@echo "make freeze"
@echo " freeze requirements"
@echo "make lint"
@echo " run black"
@echo "make pre-commit"
Expand All @@ -15,7 +17,11 @@ dev:
pipenv install --dev

test:
pipenv run pytest
pipenv run test

freeze:
pipenv requirements > requirements.txt
pipenv requirements --dev > requirements-dev.txt

lint:
pipenv run black .
Expand Down
11 changes: 6 additions & 5 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ verify_ssl = true
name = "pypi"

[packages]
vyper-config = "==1.2.1"


[dev-packages]
black = "==23.9.1"
pre-commit = "==3.4.0"
pretend = "==1.0.9"
pytest = "==7.4.2"
black = "==23.11.0"
pre-commit = "==3.5.0"

[scripts]
test = "python -m unittest"
229 changes: 39 additions & 190 deletions Pipfile.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# python-boilerplate
A minimalistic Python boilerplate with [pytest](https://docs.pytest.org/en/stable/),
[black](https://github.com/psf/black) and [pre-commit](https://pre-commit.com/).
A minimalistic Python boilerplate with [black](https://github.com/psf/black) and [pre-commit](https://pre-commit.com/).

## Requirements
- Python 3.11+
Expand Down
1 change: 0 additions & 1 deletion app/__init__.py

This file was deleted.

30 changes: 0 additions & 30 deletions app/app.py

This file was deleted.

51 changes: 0 additions & 51 deletions app/config.py

This file was deleted.

Empty file removed app/util/__init__.py
Empty file.
27 changes: 0 additions & 27 deletions app/util/config.py

This file was deleted.

33 changes: 0 additions & 33 deletions app/util/logging.py

This file was deleted.

1 change: 0 additions & 1 deletion config/config.local.toml

This file was deleted.

18 changes: 7 additions & 11 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
-i https://pypi.org/simple
black==23.9.1; python_version >= '3.8'
black==23.11.0; python_version >= '3.8'
cfgv==3.4.0; python_version >= '3.8'
click==8.1.7; python_version >= '3.7'
distlib==0.3.7
filelock==3.12.4; python_version >= '3.8'
identify==2.5.30; python_version >= '3.8'
iniconfig==2.0.0; python_version >= '3.7'
filelock==3.13.1; python_version >= '3.8'
identify==2.5.33; python_version >= '3.8'
mypy-extensions==1.0.0; python_version >= '3.5'
nodeenv==1.8.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'
packaging==23.2; python_version >= '3.7'
pathspec==0.11.2; python_version >= '3.7'
platformdirs==3.11.0; python_version >= '3.7'
pluggy==1.3.0; python_version >= '3.8'
pre-commit==3.4.0; python_version >= '3.8'
pretend==1.0.9
pytest==7.4.2; python_version >= '3.7'
platformdirs==4.1.0; python_version >= '3.8'
pre-commit==3.5.0; python_version >= '3.8'
pyyaml==6.0.1; python_version >= '3.6'
setuptools==68.2.2; python_version >= '3.8'
virtualenv==20.24.5; python_version >= '3.7'
setuptools==69.0.2; python_version >= '3.8'
virtualenv==20.25.0; python_version >= '3.7'
5 changes: 0 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
-i https://pypi.org/simple
distconfig3==1.0.1
pyyaml==6.0.1; python_version >= '3.6'
toml==0.10.2; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'
vyper-config==1.2.1; python_version >= '3.8'
watchdog==3.0.0; python_version >= '3.7'
7 changes: 0 additions & 7 deletions run.py

This file was deleted.

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[metadata]
name = py-xid
name = python-boilerplate
version = file: VERSION
author = Alexandre Ferland
author_email = [email protected]
Expand Down
Empty file removed tests/__init__.py
Empty file.
2 changes: 0 additions & 2 deletions tests/test_app.py

This file was deleted.

0 comments on commit 0b707f0

Please sign in to comment.