Skip to content

Commit ffbae8f

Browse files
authored
Merge branch 'master' into add-datatypes
2 parents 3da6078 + 3438b2b commit ffbae8f

File tree

9 files changed

+124
-105
lines changed

9 files changed

+124
-105
lines changed

.circleci/config.yml

-74
This file was deleted.

.github/workflows/ci.yaml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: ✅ CI
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize, closed]
6+
7+
concurrency:
8+
group: ci-${{ github.event.pull_request.number || github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
lint:
13+
name: 🚨 Lint code
14+
runs-on: ubuntu-22.04
15+
timeout-minutes: 10
16+
steps:
17+
- name: 👩‍💻 Checkout code
18+
uses: actions/checkout@v3
19+
20+
- name: 🐍 Setup Python
21+
uses: actions/setup-python@v3
22+
with:
23+
python-version: "3.7"
24+
25+
- name: 📦 Install deps
26+
run: |
27+
pip install black==23.3.0
28+
29+
- name: 🚨 Lint code
30+
run: |
31+
black --check --line-length 80 tests kf_lib_data_ingest
32+
33+
test:
34+
name: ✅ Unit test
35+
runs-on: ubuntu-22.04
36+
timeout-minutes: 10
37+
strategy:
38+
matrix:
39+
python-version: [3.7]
40+
steps:
41+
- name: 👩‍💻 Checkout code
42+
uses: actions/checkout@v3
43+
44+
- name: 🐍 Setup Python ${{ matrix.python-version }}
45+
uses: actions/setup-python@v3
46+
with:
47+
python-version: ${{ matrix.python-version }}
48+
49+
- name: 🔐 Setup SSH Key
50+
run: |
51+
mkdir -p ~/.ssh
52+
echo "${{ secrets.GH_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
53+
chmod 600 ~/.ssh/id_rsa
54+
ssh-keyscan github.com >> ~/.ssh/known_hosts
55+
56+
- name: 📦 Install deps
57+
run: |
58+
pip install --upgrade virtualenv
59+
virtualenv -p python3 venv
60+
source venv/bin/activate
61+
pip uninstall -y setuptools
62+
pip install setuptools>61
63+
pip install -e .
64+
pip install -r dev-requirements.txt
65+
66+
- name: ✅ Unit Test
67+
run: |
68+
source venv/bin/activate
69+
pytest ./tests
70+

.github/workflows/docs.yaml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: 🛠️ Doc site
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
concurrency:
9+
group: docs-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
docs:
14+
name: 📝 Build docs site
15+
runs-on: ubuntu-22.04
16+
timeout-minutes: 10
17+
steps:
18+
- name: 👩‍💻 Checkout code
19+
uses: actions/checkout@v3
20+
21+
- name: 🐍 Setup Python
22+
uses: actions/setup-python@v3
23+
with:
24+
python-version: "3.7"
25+
26+
- name: 📦 Install deps
27+
run: |
28+
cd kf-lib-data-ingest
29+
pip install --upgrade virtualenv
30+
virtualenv -p python3 venv
31+
source venv/bin/activate
32+
pip uninstall -y setuptools
33+
pip install setuptools>61
34+
pip install -r doc-requirements.txt
35+
36+
- name: 👷 Build site
37+
run: |
38+
source venv/bin/activate
39+
doc8 docs/source
40+
make -C docs html
41+
42+
- name: 🚀 Deploy to github pages
43+
run: |
44+
source venv/bin/activate
45+
./scripts/deploy-ghpages.sh
46+

.github/workflows/test.yml

-20
This file was deleted.

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,7 @@ test_graph.gml
8383
# dot files and folders
8484
.*
8585

86+
!.github/
87+
8688
# validation results
8789
validation_results/

dev-requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ codacy-coverage==1.3.11
44
moto==2.0.7
55
requests-mock==1.8.0
66
flake8
7-
black
7+
black==23.3.0
88
deepdiff
99
-r requirements.txt

kf_lib_data_ingest/common/concept_schema.py

-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ class VOLUME(QuantityMixin):
190190
EXTERNAL_COLLECTION_ID = None
191191

192192
class BIOSPECIMEN(SAMPLE):
193-
194193
class CONCENTRATION(QuantityMixin):
195194
pass
196195

kf_lib_data_ingest/common/stage.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,6 @@ def _postrun_validation(self, validation_mode=None, report_kwargs={}):
230230
report_kwargs=report_kwargs,
231231
)
232232
if self.validation_success:
233-
self.logger.info(
234-
f"✅ {self.stage_type.__name__} passed validation!"
235-
)
233+
self.logger.info(f"✅ {self.stage_type.__name__} passed validation!")
236234
else:
237-
self.logger.info(
238-
f"❌ {self.stage_type.__name__} failed validation!"
239-
)
235+
self.logger.info(f"❌ {self.stage_type.__name__} failed validation!")

kf_lib_data_ingest/etl/configuration/log.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
}
1919

2020
VERBOTEN_PATTERNS['"access_token":".+"'] = '"access_token":"<ACCESS_TOKEN>"'
21-
VERBOTEN_PATTERNS["'Authorization': '.+'"] = (
22-
"'Authorization': '<AUTHORIZATION>'"
23-
)
21+
VERBOTEN_PATTERNS[
22+
"'Authorization': '.+'"
23+
] = "'Authorization': '<AUTHORIZATION>'"
2424

2525

2626
class NoTokenFormatter(logging.Formatter):

0 commit comments

Comments
 (0)