Skip to content

Commit c2e4c95

Browse files
authored
Merge pull request #232 from trz42/ingest_bundles_2
new method for ingesting tarballs via a single staging PR
2 parents f237987 + 76b3d34 commit c2e4c95

17 files changed

+2730
-1
lines changed

.flake8

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This file is part of the EESSI filesystem layer,
2+
# see https://github.com/EESSI/filesystem-layer
3+
#
4+
# author: Thomas Roeblitz (@trz42)
5+
#
6+
# license: GPLv2
7+
#
8+
9+
[flake8]
10+
exclude =
11+
scripts/check-stratum-servers.py,
12+
scripts/automated_ingestion/automated_ingestion.py,
13+
scripts/automated_ingestion/eessitarball.py,
14+
scripts/automated_ingestion/utils.py
15+
16+
# ignore "Black would make changes" produced by flake8-black
17+
# see also https://github.com/houndci/hound/issues/1769
18+
extend-ignore = BLK100
19+
20+
max-line-length = 120
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This file is part of the EESSI filesystem layer,
2+
# see https://github.com/EESSI/filesystem-layer
3+
#
4+
# author: Thomas Roeblitz (@trz42)
5+
#
6+
# license: GPLv2
7+
#
8+
9+
name: Run tests
10+
on: [push, pull_request]
11+
# Declare default permissions as read only.
12+
permissions: read-all
13+
jobs:
14+
test:
15+
runs-on: ubuntu-24.04
16+
strategy:
17+
matrix:
18+
# for now, only test with Python 3.9+ (since we're testing in Ubuntu 24.04)
19+
#python: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
20+
python: ['3.9', '3.10', '3.11']
21+
fail-fast: false
22+
steps:
23+
- name: checkout
24+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
25+
26+
- name: set up Python
27+
uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # v4.3.0
28+
with:
29+
python-version: ${{matrix.python}}
30+
31+
- name: Install required Python packages + pytest + flake8
32+
run: |
33+
python -m pip install --upgrade pip
34+
python -m pip install -r scripts/automated_ingestion/requirements.txt
35+
python -m pip install pytest
36+
python -m pip install --upgrade flake8
37+
38+
- name: Run test suite (without coverage)
39+
run: |
40+
./scripts/automated_ingestion/pytest.sh scripts/automated_ingestion --verbose
41+
42+
- name: Run test suite (with coverage)
43+
run: |
44+
python -m pip install pytest-cov
45+
./scripts/automated_ingestion/pytest.sh scripts/automated_ingestion -q --cov=scripts/automated_ingestion/eessi_logging.py
46+
47+
- name: Run flake8 to verify PEP8-compliance of Python code
48+
run: |
49+
flake8 scripts/automated_ingestion --exclude=scripts/automated_ingestion/automated_ingestion.py,scripts/automated_ingestion/eessitarball.py

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
build
22
hosts
3+
.coverage
4+
**/__pycache__
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[run]
2+
omit =
3+
scripts/automated_ingestion/automated_ingestion.py
4+
scripts/automated_ingestion/eessitarball.py
5+
scripts/automated_ingestion/utils.py
6+
scripts/automated_ingestion/unit_tests/*.py

scripts/automated_ingestion/automated_ingestion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def parse_args():
8181
return args
8282

8383

84-
@pid.decorator.pidfile('automated_ingestion.pid')
84+
@pidfile('shared_lock.pid') # noqa: F401
8585
def main():
8686
"""Main function."""
8787
args = parse_args()

0 commit comments

Comments
 (0)