Skip to content

Commit 8be80a6

Browse files
authored
Merge pull request #1 from elixir-europe/fix_gh_workflow
Fix gh workflow
2 parents 0dd5166 + a952888 commit 8be80a6

6 files changed

Lines changed: 45 additions & 41 deletions

File tree

.github/workflows/test-mars.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Test MARS
22
on:
33
push:
44
paths:
5-
- "mars-cli/**"
5+
- "mars_lib/**"
66
pull_request:
77
paths:
8-
- "mars-cli/**"
8+
- "mars_lib/**"
99
branches:
1010
- main
1111
workflow_dispatch:
@@ -17,11 +17,11 @@ jobs:
1717
os: [ubuntu-latest, windows-latest]
1818
python-version: ["3.9", "3.13"]
1919
runs-on: ${{ matrix.os }}
20-
env:
21-
working-directory: ./mars-cli
2220

2321
steps:
24-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
23+
with:
24+
submodules: 'recursive'
2525
- name: Set up Python
2626
uses: actions/setup-python@v5
2727
with:

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "MARS"]
2+
path = MARS
3+
url = https://github.com/elixir-europe/MARS.git

MARS

Submodule MARS added at ed97522

tests/test_biosample_external_references.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_load_json_file():
3636

3737

3838
def test_handle_input_dict():
39-
input = "../test-data/ISA-BH2023-ALL/isa-bh2023-all.json"
39+
input = "MARS/test-data/ISA-BH2023-ALL/isa-bh2023-all.json"
4040
assert handle_input_dict(input)
4141

4242
not_a_json = "./tests/fixtures/bad_json.json"

tests/test_ftp_upload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_upload_success():
2323
uploader = FTPUploader("webin2.ebi.ac.uk", creds["username"], creds["password"])
2424
uploader.upload(
2525
[
26-
Path("../test-data/ENA_TEST2.R1.fastq.gz"),
26+
Path("MARS/test-data/ENA_TEST2.R1.fastq.gz"),
2727
Path("./tests/fixtures/not_a_json_file.txt"),
2828
]
2929
)

tests/test_isa_json.py

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
def test_load_isa_json():
2828
# Should test the validation process of the ISA JSON file where root level = investigation.
2929
valid_isa_json01 = load_isa_json(
30-
"../test-data/ISA-BH2023-ALL/isa-bh2023-all.json", True
30+
"MARS/test-data/ISA-BH2023-ALL/isa-bh2023-all.json", True
3131
)
3232
assert len(valid_isa_json01.investigation.studies) == 1
3333
assert valid_isa_json01.investigation.studies[0].identifier == "BH2023"
3434

3535
# Should test the validation process of the ISA JSON file where root has 'investigation' as key.
36-
valid_isa_json02 = load_isa_json("../test-data/biosamples-input-isa.json", False)
36+
valid_isa_json02 = load_isa_json("MARS/test-data/biosamples-input-isa.json", False)
3737
assert len(valid_isa_json02.investigation.studies) == 1
3838
assert valid_isa_json02.investigation.studies[0].title == "Arabidopsis thaliana"
3939

@@ -43,7 +43,7 @@ def test_load_isa_json():
4343

4444
def test_reduce_isa_json_for_target_repo():
4545
good_isa_json = load_isa_json(
46-
"../test-data/ISA-BH2023-ALL/isa-bh2023-all.json", True
46+
"MARS/test-data/ISA-BH2023-ALL/isa-bh2023-all.json", True
4747
)
4848

4949
filtered_isa_json = reduce_isa_json_for_target_repo(
@@ -60,7 +60,7 @@ def test_reduce_isa_json_for_target_repo():
6060

6161
def test_reduce_isa_json_for_biosamples():
6262
good_isa_json = load_isa_json(
63-
"../test-data/ISA-BH2023-ALL/isa-bh2023-all.json", True
63+
"MARS/test-data/ISA-BH2023-ALL/isa-bh2023-all.json", True
6464
)
6565

6666
filtered_isa_json = reduce_isa_json_for_target_repo(
@@ -180,7 +180,7 @@ def test_person_phone_nr_validator():
180180

181181
def test_update_study_materials_no_accession_categories():
182182
# This file has no characteristics for accessions
183-
json_path = "../test-data/biosamples-original-isa-no-accesion-char.json"
183+
json_path = "MARS/test-data/biosamples-original-isa-no-accesion-char.json"
184184
with open(json_path) as json_file:
185185
json_data = json.load(json_file)
186186

@@ -214,7 +214,7 @@ def test_update_study_materials_no_accession_categories():
214214

215215
def test_update_study_materials_with_accession_categories():
216216
# This file has no characteristics for accessions
217-
json_path = "../test-data/biosamples-original-isa.json"
217+
json_path = "MARS/test-data/biosamples-original-isa.json"
218218
with open(json_path) as json_file:
219219
json_data = json.load(json_file)
220220

@@ -308,45 +308,45 @@ def test_filename_validation():
308308

309309
def test_map_data_files_to_repositories():
310310
isa_json = load_isa_json(
311-
file_path="../test-data/ISA-BH2024-ALL/isa-bh2024-all.json",
311+
file_path="MARS/test-data/ISA-BH2024-ALL/isa-bh2024-all.json",
312312
investigation_is_root=True,
313313
)
314314
exact_match_files = [
315-
"../test-data/ISA-BH2024-ALL/cnv-seq-data-0.fastq",
316-
"../test-data/ISA-BH2024-ALL/cnv-seq-data-1.fastq",
317-
"../test-data/ISA-BH2024-ALL/cnv-seq-data-2.fastq",
318-
"../test-data/ISA-BH2024-ALL/cnv-seq-data-3.fastq",
319-
"../test-data/ISA-BH2024-ALL/metpro-analysis.txt",
320-
"../test-data/ISA-BH2024-ALL/ms-data-metpro--1.mzml",
321-
"../test-data/ISA-BH2024-ALL/ms-data-metpro--2.mzml",
322-
"../test-data/ISA-BH2024-ALL/ms-data-metpro--3.mzml",
323-
"../test-data/ISA-BH2024-ALL/ms-data-metpro--4.mzml",
324-
"../test-data/ISA-BH2024-ALL/rna-seq-data-0.fastq",
325-
"../test-data/ISA-BH2024-ALL/rna-seq-data-1.fastq",
326-
"../test-data/ISA-BH2024-ALL/rna-seq-data-2.fastq",
327-
"../test-data/ISA-BH2024-ALL/rna-seq-data-3.fastq",
315+
"MARS/test-data/ISA-BH2024-ALL/cnv-seq-data-0.fastq",
316+
"MARS/test-data/ISA-BH2024-ALL/cnv-seq-data-1.fastq",
317+
"MARS/test-data/ISA-BH2024-ALL/cnv-seq-data-2.fastq",
318+
"MARS/test-data/ISA-BH2024-ALL/cnv-seq-data-3.fastq",
319+
"MARS/test-data/ISA-BH2024-ALL/metpro-analysis.txt",
320+
"MARS/test-data/ISA-BH2024-ALL/ms-data-metpro--1.mzml",
321+
"MARS/test-data/ISA-BH2024-ALL/ms-data-metpro--2.mzml",
322+
"MARS/test-data/ISA-BH2024-ALL/ms-data-metpro--3.mzml",
323+
"MARS/test-data/ISA-BH2024-ALL/ms-data-metpro--4.mzml",
324+
"MARS/test-data/ISA-BH2024-ALL/rna-seq-data-0.fastq",
325+
"MARS/test-data/ISA-BH2024-ALL/rna-seq-data-1.fastq",
326+
"MARS/test-data/ISA-BH2024-ALL/rna-seq-data-2.fastq",
327+
"MARS/test-data/ISA-BH2024-ALL/rna-seq-data-3.fastq",
328328
]
329329

330330
check_map = dict(
331331
{
332332
"metabolights": [
333-
"../test-data/ISA-BH2024-ALL/metpro-analysis.txt",
334-
"../test-data/ISA-BH2024-ALL/ms-data-metpro--1.mzml",
335-
"../test-data/ISA-BH2024-ALL/ms-data-metpro--2.mzml",
336-
"../test-data/ISA-BH2024-ALL/ms-data-metpro--3.mzml",
337-
"../test-data/ISA-BH2024-ALL/ms-data-metpro--4.mzml",
333+
"MARS/test-data/ISA-BH2024-ALL/metpro-analysis.txt",
334+
"MARS/test-data/ISA-BH2024-ALL/ms-data-metpro--1.mzml",
335+
"MARS/test-data/ISA-BH2024-ALL/ms-data-metpro--2.mzml",
336+
"MARS/test-data/ISA-BH2024-ALL/ms-data-metpro--3.mzml",
337+
"MARS/test-data/ISA-BH2024-ALL/ms-data-metpro--4.mzml",
338338
],
339339
"arrayexpress": [
340-
"../test-data/ISA-BH2024-ALL/rna-seq-data-0.fastq",
341-
"../test-data/ISA-BH2024-ALL/rna-seq-data-1.fastq",
342-
"../test-data/ISA-BH2024-ALL/rna-seq-data-2.fastq",
343-
"../test-data/ISA-BH2024-ALL/rna-seq-data-3.fastq",
340+
"MARS/test-data/ISA-BH2024-ALL/rna-seq-data-0.fastq",
341+
"MARS/test-data/ISA-BH2024-ALL/rna-seq-data-1.fastq",
342+
"MARS/test-data/ISA-BH2024-ALL/rna-seq-data-2.fastq",
343+
"MARS/test-data/ISA-BH2024-ALL/rna-seq-data-3.fastq",
344344
],
345345
"eva": [
346-
"../test-data/ISA-BH2024-ALL/cnv-seq-data-0.fastq",
347-
"../test-data/ISA-BH2024-ALL/cnv-seq-data-1.fastq",
348-
"../test-data/ISA-BH2024-ALL/cnv-seq-data-2.fastq",
349-
"../test-data/ISA-BH2024-ALL/cnv-seq-data-3.fastq",
346+
"MARS/test-data/ISA-BH2024-ALL/cnv-seq-data-0.fastq",
347+
"MARS/test-data/ISA-BH2024-ALL/cnv-seq-data-1.fastq",
348+
"MARS/test-data/ISA-BH2024-ALL/cnv-seq-data-2.fastq",
349+
"MARS/test-data/ISA-BH2024-ALL/cnv-seq-data-3.fastq",
350350
],
351351
}
352352
)
@@ -361,7 +361,7 @@ def test_map_data_files_to_repositories():
361361
map_data_files_to_repositories(not_enough_files, isa_json)
362362

363363
too_many_files = exact_match_files.copy()
364-
one_too_many = "../test-data/ISA-BH2024-ALL/one-too-many.fastq"
364+
one_too_many = "MARS/test-data/ISA-BH2024-ALL/one-too-many.fastq"
365365
too_many_files.append(one_too_many)
366366

367367
result_maps = map_data_files_to_repositories(too_many_files, isa_json)

0 commit comments

Comments
 (0)