Skip to content
This repository was archived by the owner on Jan 4, 2023. It is now read-only.

Commit 8e9248e

Browse files
authoredMar 3, 2021
Refactor the project organisation (#97)
* Start refactoring F2D * Add more refactoring * Move secondary files to tools/ + run black & isort * Run flake8 * Move progressbar to a dedicated file + do more housekeeping * Add tests for api call and request * Update README * Improve Parser and tests * Improve GraphQuery and add tests * Small fixes
1 parent 3793bc0 commit 8e9248e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+121952
-132461
lines changed
 

‎.github/workflows/lint_and_test.yml

+26-26
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,30 @@ name: fhir2dataset
33
on: [push]
44

55
jobs:
6-
build:
7-
name: Lint and test
8-
runs-on: ubuntu-18.04
9-
strategy:
10-
matrix:
11-
python-version: ["3.6", "3.7","3.8"]
6+
build:
7+
name: Lint and test
8+
runs-on: ubuntu-18.04
9+
strategy:
10+
matrix:
11+
python-version: ["3.6", "3.7", "3.8"]
1212

13-
steps:
14-
- uses: actions/checkout@v2
15-
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v2
17-
with:
18-
python-version: ${{ matrix.python-version }}
19-
- name: Install dependencies
20-
run: |
21-
python -m pip install --upgrade pip
22-
pip install -r requirements.txt
23-
pip install -r requirements-dev.txt
24-
npm install --prefix ./fhir2dataset/metadata
25-
- name: Lint with flake8
26-
run: |
27-
# stop the build if there are Python syntax errors or undefined names
28-
flake8 fhir2dataset --count --select=E9,F63,F7,F82 --show-source --statistics
29-
flake8 fhir2dataset --count --max-complexity=10 --max-line-length=100 --statistics
30-
- name: Test with pytest
31-
run: |
32-
python -m pytest -svv --log-level=DEBUG
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install -r requirements.txt
23+
pip install -r requirements-dev.txt
24+
npm install --prefix ./fhir2dataset/metadata
25+
- name: Lint with flake8
26+
run: |
27+
# stop the build if there are Python syntax errors or undefined names
28+
flake8 fhir2dataset --count --select=E9,F63,F7,F82 --show-source --statistics
29+
flake8 fhir2dataset --count --max-line-length=100 --statistics
30+
- name: Test with pytest
31+
run: |
32+
python -m pytest -svv --log-level=DEBUG

‎.pre-commit-config.yaml

+33-17
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,40 @@
11
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.3.0
4+
hooks:
5+
- id: check-added-large-files # Prevent giant files from being committed
6+
- id: check-ast # Check whether the files parse as valid python
7+
- id: check-json # Check json files for parseable syntax
8+
- id: check-merge-conflict # Check for files that contain merge conflict strings
9+
- id: check-toml # Checks toml files for parseable syntax
10+
- id: check-yaml # Check yaml files for parseable syntax
11+
- id: debug-statements # Check for debugger imports and `breakpoint()` calls in python
12+
- id: detect-private-key # Detect the presence of private keys
13+
- id: end-of-file-fixer # Ensures that files end with a newline
14+
- id: name-tests-test # Verify that test files are named correctly
15+
16+
- repo: https://github.com/pre-commit/mirrors-prettier
17+
rev: v2.2.1
18+
hooks:
19+
- id: prettier
20+
221
- repo: https://github.com/psf/black
322
rev: 20.8b1
423
hooks:
524
- id: black
6-
args: [--safe, --quiet, --line-length, "100"]
7-
language_version: python3
8-
- repo: https://gitlab.com/pycqa/flake8
9-
rev: "3.7.9"
25+
26+
- repo: https://github.com/PyCQA/isort
27+
rev: 5.6.4
28+
hooks:
29+
- id: isort
30+
31+
- repo: https://gitlab.com/PyCQA/flake8
32+
rev: 3.8.4
1033
hooks:
1134
- id: flake8
12-
args:
13-
[
14-
--count,
15-
--select,
16-
"E9,F63,F7,F82",
17-
--show-source,
18-
--statistics,
19-
--max-complexity,
20-
"10",
21-
--max-line-length,
22-
"100",
23-
]
24-
language_version: python3
35+
36+
- repo: https://github.com/PyCQA/bandit
37+
rev: 1.6.2
38+
hooks:
39+
- id: bandit
40+
args: [--exclude, tests]

0 commit comments

Comments
 (0)
This repository has been archived.