Skip to content

Commit

Permalink
Release 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pyprogrammerblog authored Oct 2, 2022
1 parent 59e4370 commit fba8c5d
Show file tree
Hide file tree
Showing 66 changed files with 3,469 additions and 833 deletions.
64 changes: 26 additions & 38 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,35 @@
# This is a basic workflow to help you get started with Actions
name: CI

name: Test Suite

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
branches:
- master
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10']
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Test dependencies
run: |
python -m pip install --upgrade pip
pip install pytest mock
- name: Test with pytest
run: |
pytest
# # to be done: https://github.com/marketplace/actions/coveralls-python#coveragepy-configuration
# coveralls_finish:
# needs: test
# runs-on: ubuntu-latest
# steps:
# - name: Coveralls Finished
# uses: AndreMiras/coveralls-python-action@develop
# with:
# parallel-finished: true

- name: Build broker
run: docker-compose build app

- name: Install python packages
run: docker-compose run --rm app poetry install

- name: Check your installed dependencies for security vulnerabilities
run: docker-compose run --rm app poetry check

- name: Test
run: docker-compose run --rm app poetry run pytest

- name: Flake8
run: docker-compose run --rm app poetry run flake8 arend

- name: MyPy
run: docker-compose run --rm app poetry run mypy arend --no-strict-optional --ignore-missing-imports

- name: Remove Services
run: docker-compose down
119 changes: 82 additions & 37 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,53 +1,98 @@
# From https://github.com/github/gitignore/blob/master/Python.gitignore
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# env vars
.env
# C extensions
*.so

# Pyc/pyo files.
*.py[co]

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
# Distribution / packaging
.Python
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
.venv
venv
*.egg
static_build_files/

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# eventual secrets file used in dynaconf (these usually contain passwords which should not be stored in the version control system)
.secrets.*

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

# Flask:
instance/
.webassets-cache

#Translations
# *.mo
# ^^^ No, django needs the .mo files as it doesn't compile them on the fly.
# Jupyter Notebook
.ipynb_checkpoints

#Mr Developer
.mr.developer.cfg
src
# IPython
profile_default/
ipython_config.py

# Ignore generated config files
etc/*.nginx.conf
etc/*.logrotate
# pyenv
.python-version

# Environments
# files created with the virtual environment (these are dependent on the developer environment so they should not be stored in the version control system)
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Ignore ide's
.idea/
.vscode
# files related with IDE VSC or IntelliJ
.idea/*
.vscode/*
**/.password
### VisualStudioCode Patch ###
# Ignore all local history of files
.history

# ignore docs
docs/_*

notebooks
*.ipynb
**/__pycache__
# db config file
odi_db_config.yml
config/db_config.yml
design/.DS_Store
.DS_Store
flake8.txt
.dockerignore
/source/
/docs/_build/
/.devcontainer/
21 changes: 12 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
default_language_version:
python: python3

repos:
- repo: https://github.com/pre-commit/mirrors-isort
rev: 'v4.3.21'
hooks:
- id: isort
exclude: 'settings'
- repo: https://github.com/ambv/black
rev: stable
rev: 22.6.0
hooks:
- id: black
exclude: 'setup.py'
args: [--line-length=79]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-merge-conflict
- id: check-yaml
- id: check-json
- id: check-toml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: flake8
# NB The "exclude" setting in setup.cfg is ignored by pre-commit
# exclude: '|'
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
hooks:
- id: mypy
files: ^arend/
args: [--no-strict-optional, --ignore-missing-imports]
23 changes: 10 additions & 13 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@
# Required
version: 2

build:
os: ubuntu-20.04
tools:
python: '3.10'
jobs:
post_install:
- pip install poetry==1.2.0b1
- poetry config virtualenvs.create false
- poetry install --with doc

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
fail_on_warning: false

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf

python:
version: 3.7
# use system_packages for numpy; the rest is mocked by autodoc_mock_imports
system_packages: true
install:
- method: setuptools
path: . # setup.py includes a hack that emulates --no-deps for RTD
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Changelog
===================================

0.0.1 (2022-XX-XX)
-------------------

- Initial project structure.

- Test suite.
10 changes: 0 additions & 10 deletions CHANGES.rst

This file was deleted.

19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM python:3.10.2

LABEL maintainer="Jose-Maria Vazquez-Jimenez"
RUN apt-get update

# Set timezone, not really necessary...
ENV TZ=Europe/Amsterdam
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# install basic python packages: setuptools, pip3, virtualenv
RUN pip3 install --upgrade setuptools && pip3 install pip virtualenv

# Let's go with poetry...
ENV POETRY_VERSION=1.1.13 VENV_PATH="/code/.venv" POETRY_HOME="/opt/poetry"
RUN curl -sSL https://install.python-poetry.org | python3 - --version $POETRY_VERSION
ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH"

VOLUME /code
WORKDIR /code
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021
Copyright (c) 2021, Python Retry.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -14,8 +14,8 @@ copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

Loading

0 comments on commit fba8c5d

Please sign in to comment.