Skip to content

Commit

Permalink
Merge branch 'release/0.1.0' into main
Browse files Browse the repository at this point in the history
erikvw committed Nov 28, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents dcbd126 + 19ec24a commit 4e4c567
Showing 43 changed files with 1,802 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .coveragrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[run]
include = edc_form_runners/*
omit = edc_form_runners/tests/*,edc_form_runners/migrations/*
branch = 1
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://EditorConfig.org

root = true

[*]
charset = utf-8
indent_style = space
end_of_line = lf
insert_final_newline = true
max_line_length = 95
trim_trailing_whitespace = true

[*.{py,rst,ini}]
indent_size = 4

[*.{html,yml}]
indent_size = 2

[LICENSE.txt]
end_of_line = crlf
insert_final_newline = false

[Makefile]
indent_style = tab
68 changes: 68 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
name: build

on: [push, pull_request]

jobs:
build:
name: build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }})
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ['3.11']
django-version: ['4.2', 'dev']
services:
mysql:
image: mysql:latest
env:
MYSQL_DATABASE: mysql
MYSQL_ROOT_PASSWORD: mysql
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Install pycups and words dependency
run: |
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo apt-get -y update
sudo apt-get install libcups2-dev wamerican
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
- name: Cache
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
restore-keys: |
${{ matrix.python-version }}-v1-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r https://raw.githubusercontent.com/clinicedc/edc/develop/requirements.tests/tox.txt
- name: Tox tests
run: |
tox -v
env:
DJANGO: ${{ matrix.django-version }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
name: Python ${{ matrix.python-version }}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
_version.py
.etc/*
.env
django_crypto_fields
.pydevproject
.project
.settings/
db.sqlite3
.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
49 changes: 49 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
exclude: tests/etc/user-*

repos:
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
args:
- "-x *test*.py"

- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
language_version: python3.11

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
args:
- "--config=setup.cfg"

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: requirements-txt-fixer
files: requirements/.*\.txt$
- id: trailing-whitespace
- id: check-added-large-files
- id: fix-byte-order-marker
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
- id: detect-private-key

- repo: https://github.com/adrienverge/yamllint
rev: v1.32.0
hooks:
- id: yamllint
args:
- "--strict"
13 changes: 13 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# allow "on" until yamllint stops checking keys for truthy!
# https://github.com/adrienverge/yamllint/issues/158
---
extends: default

rules:
comments-indentation: disable
braces: disable
line-length:
max: 120
truthy:
level: error
allowed-values: ['true', 'false', 'on']
Empty file added AUTHORS
Empty file.
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CHANGES

0.1.0
-----
- initial release
Loading

0 comments on commit 4e4c567

Please sign in to comment.