From e8ba8d530ab1da2432b8b247daeef8fb730f34fe Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 11:14:18 +0100 Subject: [PATCH 01/20] parquet included --- MANIFEST.in | 2 +- requirements.txt | 1 - sdrf_pipelines/__init__.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index e99df536..c8662a15 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,4 +5,4 @@ include README.md include LICENSE # Include the data files -recursive-include sdrf_pipelines *.xml *.yml +recursive-include sdrf_pipelines *.xml *.yml *.parquet diff --git a/requirements.txt b/requirements.txt index e503651b..ca30a5e2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ pandas click - # https://github.com/multimeric/PandasSchema does not seem to be maintained # anymore, and right now it thows a pandas deprecation warning, in the # future it will stop working. diff --git a/sdrf_pipelines/__init__.py b/sdrf_pipelines/__init__.py index 4d046134..ba9baa36 100644 --- a/sdrf_pipelines/__init__.py +++ b/sdrf_pipelines/__init__.py @@ -1 +1 @@ -__version__ = "0.0.28" +__version__ = "0.0.29" \ No newline at end of file From 2ef80c05e8964270cf72d7e5480d785e007a1e0a Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 11:17:09 +0100 Subject: [PATCH 02/20] parquet included --- sdrf_pipelines/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdrf_pipelines/__init__.py b/sdrf_pipelines/__init__.py index ba9baa36..a3024cf7 100644 --- a/sdrf_pipelines/__init__.py +++ b/sdrf_pipelines/__init__.py @@ -1 +1 @@ -__version__ = "0.0.29" \ No newline at end of file +__version__ = "0.0.29" From e600123900ab8c597ce0cecb045640f4710741b9 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 11:24:32 +0100 Subject: [PATCH 03/20] parquet included --- .github/workflows/conda-build.yml | 2 +- sdrf_pipelines/parse_sdrf.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index 1d929ee4..a22bb936 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -56,5 +56,5 @@ jobs: - name: Test other commands run: | conda activate sdrf-pipelines - parse_sdrf validate-sdrf --sdrf_file tests/data/reference/PDC000126/PDC000126.sdrf.tsv --check_ms + parse_sdrf validate-sdrf --sdrf_file tests/data/reference/PDC000126/PDC000126.sdrf.tsv shell: bash -l {0} diff --git a/sdrf_pipelines/parse_sdrf.py b/sdrf_pipelines/parse_sdrf.py index 6ffb7d22..f4ed2405 100755 --- a/sdrf_pipelines/parse_sdrf.py +++ b/sdrf_pipelines/parse_sdrf.py @@ -145,6 +145,9 @@ def maxquant_from_sdrf( @click.option( "--skip_experimental_design_validation", help="Disable the validation of experimental design", is_flag=True ) +@click.option( + "--use_ols_cache_only", help="Use ols cache for validation of the terms and not OLS internet service", is_flag=True +) @click.pass_context def validate_sdrf( ctx, @@ -153,6 +156,7 @@ def validate_sdrf( skip_ms_validation: bool, skip_factor_validation: bool, skip_experimental_design_validation: bool, + use_cache_only: bool, ): """ Command to validate the SDRF file. The validation is based on the template provided by the user. From c2192f160ceb441f3cc14ccff3280f7b14b46892 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 13:56:02 +0100 Subject: [PATCH 04/20] ols cache disable --- sdrf_pipelines/ols/ols.py | 9 ++++++--- sdrf_pipelines/ols/unimod.parquet | Bin 0 -> 18604 bytes sdrf_pipelines/parse_sdrf.py | 7 ++++--- sdrf_pipelines/sdrf/sdrf.py | 16 +++++++-------- sdrf_pipelines/sdrf/sdrf_schema.py | 31 ++++++++++++++++++++++++----- tests/test_ontology.py | 10 ++++++++++ 6 files changed, 54 insertions(+), 19 deletions(-) create mode 100644 sdrf_pipelines/ols/unimod.parquet diff --git a/sdrf_pipelines/ols/ols.py b/sdrf_pipelines/ols/ols.py index c7666f85..2f676aa0 100644 --- a/sdrf_pipelines/ols/ols.py +++ b/sdrf_pipelines/ols/ols.py @@ -275,16 +275,19 @@ def get_ancestors(self, ont, iri): logger.warning("Term was found but ancestor lookup returned an empty response: %s", response.json()) raise ex - def search(self, term: str, ontology: str, exact=True, **kwargs): + def search(self, term: str, ontology: str, exact=True, use_ols_cache_only: bool = False, **kwargs): """ Search a term in the OLS @:param term: The name of the term @:param ontology: The name of the ontology @:param exact: Forces exact match if not `None` """ - terms = self.ols_search(term, ontology=ontology, exact=exact, **kwargs) - if terms is None and self.use_cache: + if use_ols_cache_only: terms = self.cache_search(term, ontology) + else: + terms = self.ols_search(term, ontology=ontology, exact=exact, **kwargs) + if terms is None and self.use_cache: + terms = self.cache_search(term, ontology) return terms def _perform_ols_search(self, params, name, exact, retry_num=0): diff --git a/sdrf_pipelines/ols/unimod.parquet b/sdrf_pipelines/ols/unimod.parquet new file mode 100644 index 0000000000000000000000000000000000000000..ed8c630850794b337e4e41f1c228f2f24f1e19a9 GIT binary patch literal 18604 zcmeHvby!@>vM&%cSON?doB+Yyb#QklxVsFlf#8H-!7YJc!QDN$yF>8c?)C<<_da{? zbMAZhd+*%$*IB=wTHV#v)z!7SdwLf2ArDk!1V94{W}yJHtkQsOEC2)=1O#CiJjBz5 zu02=pOjjEYJB-4c7XK3X7QQP+T8}&F!Y7t9(K4UZzEW90;+9Rp^zN*>`Tlz6;r^`o z;r8O;c6HPC;p*D6>EqDU#fg)5Q_;}W-IY6^Zu8L8jc&Ro|5C>l-AaAUQimtzQKNt- z{fnjakXyR#`kx1WQq2b|b7yy$jY}C9TASWG^R}rsg`np6!Go+5kFDE#!DA256>ZW| z#xK%Xd+RK}gt9#c^y1F7g*)5(+=M?~{r(!W(01e=bMLRjYl-Wou>8-2+vmY%-C&~N zcJM+wRnJL-jG7AX5!AabfFQuc`)%OaXB~O^T&(eW{(@ZZJiFRvsYWmYz6vT5*EX-+ z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TD%MYBKVnfPz>l3CIU%y%|4|1}p3#H`E>twr68fBD?S zSWVQ;(3+F^Nso=Dm7$HSodFZe(>#$;)&Rc+VsVkMVR)Q(|FF|q)ySW(H~m{cojc# z#azuatW`me^45>?oXTLr0WOJ%J}D9WeZP2=c)T9>13_m48%1XWF-{xfC(Xhl;70Ud zd6ma{@ctwIxPO2zgrJJJK53+0j02qC~%Kl0?6@PaGcbiRf2?;75RfkO%*tqW=Z??~RK9 literal 0 HcmV?d00001 diff --git a/sdrf_pipelines/parse_sdrf.py b/sdrf_pipelines/parse_sdrf.py index f4ed2405..9de5e396 100755 --- a/sdrf_pipelines/parse_sdrf.py +++ b/sdrf_pipelines/parse_sdrf.py @@ -156,7 +156,7 @@ def validate_sdrf( skip_ms_validation: bool, skip_factor_validation: bool, skip_experimental_design_validation: bool, - use_cache_only: bool, + use_ols_cache_only: bool, ): """ Command to validate the SDRF file. The validation is based on the template provided by the user. @@ -169,6 +169,7 @@ def validate_sdrf( @param skip_ms_validation: flag to skip the validation of mass spectrometry fields @param skip_factor_validation: flag to skip the validation of factor values @param skip_experimental_design_validation: flag to skip the validation of experimental design + @param use_ols_cache_only: flag to use the OLS cache for validation of the terms and not OLS internet service """ if sdrf_file is None: @@ -180,10 +181,10 @@ def validate_sdrf( template = DEFAULT_TEMPLATE df = SdrfDataFrame.parse(sdrf_file) - errors = df.validate(template) + errors = df.validate(template, use_ols_cache_only) if not skip_ms_validation: - errors = errors + df.validate(MASS_SPECTROMETRY) + errors = errors + df.validate(MASS_SPECTROMETRY, use_ols_cache_only) if not skip_factor_validation: errors = errors + df.validate_factor_values() diff --git a/sdrf_pipelines/sdrf/sdrf.py b/sdrf_pipelines/sdrf/sdrf.py index 958aaef5..9e446cc7 100644 --- a/sdrf_pipelines/sdrf/sdrf.py +++ b/sdrf_pipelines/sdrf/sdrf.py @@ -69,27 +69,27 @@ def parse(sdrf_file: str): return SdrfDataFrame(df) - def validate(self, template: str): + def validate(self, template: str, use_ols_cache_only: bool = False) -> List[LogicError]: """ Validate a corresponding SDRF :return: """ errors = [] if template != MASS_SPECTROMETRY: - errors = default_schema.validate(self) + errors = default_schema.validate(self, use_ols_cache_only=use_ols_cache_only) if template == HUMAN_TEMPLATE: - errors = errors + human_schema.validate(self) + errors = errors + human_schema.validate(self, use_ols_cache_only=use_ols_cache_only) elif template == VERTEBRATES_TEMPLATE: - errors = errors + vertebrates_chema.validate(self) + errors = errors + vertebrates_chema.validate(self, use_ols_cache_only=use_ols_cache_only) elif template == NON_VERTEBRATES_TEMPLATE: - errors = errors + nonvertebrates_chema.validate(self) + errors = errors + nonvertebrates_chema.validate(self, use_ols_cache_only=use_ols_cache_only) elif template == PLANTS_TEMPLATE: - errors = errors + plants_chema.validate(self) + errors = errors + plants_chema.validate(self, use_ols_cache_only=use_ols_cache_only) elif template == CELL_LINES_TEMPLATE: - errors = errors + cell_lines_schema.validate(self) + errors = errors + cell_lines_schema.validate(self, use_ols_cache_only=use_ols_cache_only) elif template == MASS_SPECTROMETRY: - errors = mass_spectrometry_schema.validate(self) + errors = mass_spectrometry_schema.validate(self, use_ols_cache_only=use_ols_cache_only) return errors diff --git a/sdrf_pipelines/sdrf/sdrf_schema.py b/sdrf_pipelines/sdrf/sdrf_schema.py index 381ce846..bbd03f80 100644 --- a/sdrf_pipelines/sdrf/sdrf_schema.py +++ b/sdrf_pipelines/sdrf/sdrf_schema.py @@ -92,6 +92,11 @@ def validate_optional(self, series): warnings.append(w) return warnings + def set_ols_strategy(self, use_ols_cache_only: bool = False): + for validation in self.validations: + if isinstance(validation, OntologyTerm): + validation.set_ols_strategy(use_ols_cache_only=use_ols_cache_only) + class OntologyTerm(_SeriesValidation): """ @@ -100,6 +105,7 @@ class OntologyTerm(_SeriesValidation): def __init__(self, ontology_name: str = None, not_available: bool = False, not_applicable: bool = False, **kwargs): super().__init__(**kwargs) + self._use_ols_cache_only = False self._ontology_name = ontology_name self._not_available = not_available self._not_applicable = not_applicable @@ -140,9 +146,16 @@ def validate(self, series: pd.Series) -> pd.Series: ontology_terms = None else: if self._ontology_name is not None: - ontology_terms = client.search(term[TERM_NAME], ontology=self._ontology_name, exact="true") + ontology_terms = client.search( + term[TERM_NAME], + ontology=self._ontology_name, + exact="true", + use_ols_cache_only=self._use_ols_cache_only, + ) else: - ontology_terms = client.search(term[TERM_NAME], exact="true") + ontology_terms = client.search( + term[TERM_NAME], exact="true", use_cache_only=self._use_ols_cache_only + ) if ontology_terms is not None: query_labels = [o["label"].lower() for o in ontology_terms] @@ -154,6 +167,13 @@ def validate(self, series: pd.Series) -> pd.Series: labels.append(NOT_APPLICABLE) return series.apply(lambda cell_value: self.validate_ontology_terms(cell_value, labels)) + def set_ols_strategy(self, use_ols_cache_only: bool = False): + """ + Set the strategy to use the OLS cache only + :param use_ols_cache_only: boolean + """ + self._use_ols_cache_only = use_ols_cache_only + class SDRFSchema(Schema): _special_columns = {"sourcename", "assayname", "materialtype", "technologytype"} @@ -168,7 +188,7 @@ def __new__(cls, ordered: bool = False, min_columns: int = 0) -> Any: obj._min_columns = min_columns return obj - def validate(self, panda_sdrf: sdrf = None) -> typing.List[LogicError]: + def validate(self, panda_sdrf: sdrf = None, use_ols_cache_only: bool = False) -> typing.List[LogicError]: errors = [] # Check the minimum number of columns @@ -195,7 +215,7 @@ def validate(self, panda_sdrf: sdrf = None) -> typing.List[LogicError]: errors.extend(error_columns_order) # Check that the term is present in ontology - error_ontology_terms = self.validate_columns(panda_sdrf) + error_ontology_terms = self.validate_columns(panda_sdrf, use_ols_cache_only=use_ols_cache_only) if error_ontology_terms is not None: for error in error_ontology_terms: errors.append(error) @@ -301,10 +321,11 @@ def _get_column_pairs(self, panda_sdrf): column_pairs.append((panda_sdrf[column.name], column)) return column_pairs, errors - def validate_columns(self, panda_sdrf): + def validate_columns(self, panda_sdrf, use_ols_cache_only: bool = False): # Iterate over each pair of schema columns and data frame series and run validations column_pairs, errors = self._get_column_pairs(panda_sdrf) for series, column in column_pairs: + column.set_ols_strategy(use_ols_cache_only=use_ols_cache_only) errors += column.validate(series) return sorted(errors, key=lambda e: e.row) diff --git a/tests/test_ontology.py b/tests/test_ontology.py index 96d9e9a0..18f2757b 100644 --- a/tests/test_ontology.py +++ b/tests/test_ontology.py @@ -8,6 +8,16 @@ def test_ontology(): assert len(ontology_list) > 0 +def test_ontology_cache(): + ols = OlsClient() + ontology_list = ols.ols_search( + "homo sapiens", + ontology="NCBITaxon", + ) + print(ontology_list) + assert len(ontology_list) > 0 + + def test_ontology_from_cache(): ols = OlsClient() ontology_list = ols.cache_search("homo sapiens", ontology="NCBITaxon") From 1fc57e58071aaef0ffa972ee2accac0a7c918e82 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 14:01:17 +0100 Subject: [PATCH 05/20] ols cache disable --- sdrf_pipelines/ols/ols.py | 2 +- sdrf_pipelines/sdrf/sdrf_schema.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdrf_pipelines/ols/ols.py b/sdrf_pipelines/ols/ols.py index 2f676aa0..ebfc4c67 100644 --- a/sdrf_pipelines/ols/ols.py +++ b/sdrf_pipelines/ols/ols.py @@ -275,7 +275,7 @@ def get_ancestors(self, ont, iri): logger.warning("Term was found but ancestor lookup returned an empty response: %s", response.json()) raise ex - def search(self, term: str, ontology: str, exact=True, use_ols_cache_only: bool = False, **kwargs): + def search(self, term: str, ontology: str = None, exact=True, use_ols_cache_only: bool = False, **kwargs): """ Search a term in the OLS @:param term: The name of the term diff --git a/sdrf_pipelines/sdrf/sdrf_schema.py b/sdrf_pipelines/sdrf/sdrf_schema.py index bbd03f80..ee8744a5 100644 --- a/sdrf_pipelines/sdrf/sdrf_schema.py +++ b/sdrf_pipelines/sdrf/sdrf_schema.py @@ -154,7 +154,7 @@ def validate(self, series: pd.Series) -> pd.Series: ) else: ontology_terms = client.search( - term[TERM_NAME], exact="true", use_cache_only=self._use_ols_cache_only + term = term[TERM_NAME], exact="true", use_cache_only=self._use_ols_cache_only ) if ontology_terms is not None: From e73add793153f1706c71162716567ae7f565fc6e Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 14:03:18 +0100 Subject: [PATCH 06/20] ols cache disable --- sdrf_pipelines/sdrf/sdrf_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdrf_pipelines/sdrf/sdrf_schema.py b/sdrf_pipelines/sdrf/sdrf_schema.py index ee8744a5..9d859188 100644 --- a/sdrf_pipelines/sdrf/sdrf_schema.py +++ b/sdrf_pipelines/sdrf/sdrf_schema.py @@ -154,7 +154,7 @@ def validate(self, series: pd.Series) -> pd.Series: ) else: ontology_terms = client.search( - term = term[TERM_NAME], exact="true", use_cache_only=self._use_ols_cache_only + term=term[TERM_NAME], exact="true", use_cache_only=self._use_ols_cache_only ) if ontology_terms is not None: From afc108465e8355b365e25ced51f50bfb33893dae Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 14:07:13 +0100 Subject: [PATCH 07/20] Test cache only validation. --- .github/workflows/conda-build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index a22bb936..412489ad 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -53,8 +53,14 @@ jobs: parse_sdrf --help shell: bash -l {0} - - name: Test other commands + - name: Test validation of SDRF file run: | conda activate sdrf-pipelines parse_sdrf validate-sdrf --sdrf_file tests/data/reference/PDC000126/PDC000126.sdrf.tsv shell: bash -l {0} + + - name: Test validation of SDRF file with cache only + run: | + conda activate sdrf-pipelines + parse_sdrf validate-sdrf --sdrf_file tests/data/reference/PDC000126/PDC000126.sdrf.tsv --use_ols_cache_only + shell: bash -l {0} \ No newline at end of file From 294633280f96e5048708d71c8b3509c66f38e7b3 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 14:14:53 +0100 Subject: [PATCH 08/20] Test cache only validation. --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3f2827c8..4d46474a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,7 +1,7 @@ # recipe/meta.yaml package: name: sdrf-pipelines - version: "0.0.27" + version: "0.0.29" source: path: ../ From 57d25ff755fdcb832b8fcd7ad659cf14cac940b8 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 14:47:46 +0100 Subject: [PATCH 09/20] Test cache only validation. --- MANIFEST.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MANIFEST.in b/MANIFEST.in index c8662a15..50a60dcb 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,3 +6,5 @@ include LICENSE # Include the data files recursive-include sdrf_pipelines *.xml *.yml *.parquet +recursive-include sdrf_pipelines *.parquet +include sdrf_pipelines/ols/*.parquet \ No newline at end of file From 7aedae967708eefe7e8b7e5e62e831c485c41790 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 14:47:48 +0100 Subject: [PATCH 10/20] Test cache only validation. --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index cae80cb8..dcbaf191 100644 --- a/setup.py +++ b/setup.py @@ -34,6 +34,7 @@ def get_version(rel_path): data_files=[("", ["LICENSE", "sdrf_pipelines/openms/unimod.xml", "sdrf_pipelines/sdrf_merge/param2sdrf.yml"])], package_data={ "sdrf-pipelines": ["*.xml", "*.parquet", "*.yml"], + "sdrf_pipelines": ["*.xml", "*.parquet", "*.yml"], }, url="https://github.com/bigbio/sdrf-pipelines", packages=find_packages(), From 36982d0ae81e6624cd5b5e9c7b2e47d2305181f1 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 15:43:09 +0100 Subject: [PATCH 11/20] Test cache only validation. --- .github/workflows/conda-build.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index 412489ad..02360105 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -38,12 +38,6 @@ jobs: source $CONDA/etc/profile.d/conda.sh conda activate sdrf-pipelines conda build recipe - shell: bash -l {0} - - - name: Install the built package - run: | - source $CONDA/etc/profile.d/conda.sh - conda activate sdrf-pipelines conda install --use-local sdrf-pipelines shell: bash -l {0} From 0efbcff29bc6020af3c040de07d6ddc337d3f7fd Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 15:52:52 +0100 Subject: [PATCH 12/20] Test cache only validation. --- .github/workflows/conda-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index 02360105..5d78ae7c 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -38,7 +38,8 @@ jobs: source $CONDA/etc/profile.d/conda.sh conda activate sdrf-pipelines conda build recipe - conda install --use-local sdrf-pipelines + conda remove sdrf-pipelines --force + conda install --use-local /usr/share/miniconda/envs/sdrf-pipelines/conda-bld/ sdrf-pipelines shell: bash -l {0} - name: Test the installed package From f69deac338b8a7080c3f7e76c9779507f91c30ba Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 15:59:33 +0100 Subject: [PATCH 13/20] Test cache only validation. --- .github/workflows/conda-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index 5d78ae7c..b1950da4 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -39,7 +39,7 @@ jobs: conda activate sdrf-pipelines conda build recipe conda remove sdrf-pipelines --force - conda install --use-local /usr/share/miniconda/envs/sdrf-pipelines/conda-bld/ sdrf-pipelines + conda install --use-local sdrf-pipelines shell: bash -l {0} - name: Test the installed package From 750c21afa1be148399aa06499942e5f5a2624264 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 16:05:49 +0100 Subject: [PATCH 14/20] Test cache only validation. --- .github/workflows/conda-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index b1950da4..cefb8e30 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -39,7 +39,7 @@ jobs: conda activate sdrf-pipelines conda build recipe conda remove sdrf-pipelines --force - conda install --use-local sdrf-pipelines + conda install --use-local /usr/share/miniconda/envs/sdrf-pipelines/conda-bld/noarch/ sdrf-pipelines shell: bash -l {0} - name: Test the installed package From ada626df002169f5c43eaf0edbb39ffed605c1c1 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 16:15:01 +0100 Subject: [PATCH 15/20] Test cache only validation. --- .github/workflows/conda-build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index cefb8e30..85eb46e1 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -37,9 +37,7 @@ jobs: run: | source $CONDA/etc/profile.d/conda.sh conda activate sdrf-pipelines - conda build recipe - conda remove sdrf-pipelines --force - conda install --use-local /usr/share/miniconda/envs/sdrf-pipelines/conda-bld/noarch/ sdrf-pipelines + conda build recipe && install --use-local /usr/share/miniconda/envs/sdrf-pipelines/conda-bld/noarch/ sdrf-pipelines shell: bash -l {0} - name: Test the installed package From 2ad0006ffeff69fd18812c4e45946efd82070fa9 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 16:21:57 +0100 Subject: [PATCH 16/20] Test cache only validation. --- .github/workflows/conda-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index 85eb46e1..f82a204e 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -37,7 +37,7 @@ jobs: run: | source $CONDA/etc/profile.d/conda.sh conda activate sdrf-pipelines - conda build recipe && install --use-local /usr/share/miniconda/envs/sdrf-pipelines/conda-bld/noarch/ sdrf-pipelines + conda build recipe && conda install --use-local /usr/share/miniconda/envs/sdrf-pipelines/conda-bld/noarch/ sdrf-pipelines shell: bash -l {0} - name: Test the installed package From 0bd482b59d136bacc43a0205b0ddf7ea898d6690 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 16:29:55 +0100 Subject: [PATCH 17/20] Test cache only validation. --- .github/workflows/conda-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index f82a204e..8e556fe5 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -37,7 +37,7 @@ jobs: run: | source $CONDA/etc/profile.d/conda.sh conda activate sdrf-pipelines - conda build recipe && conda install --use-local /usr/share/miniconda/envs/sdrf-pipelines/conda-bld/noarch/ sdrf-pipelines + conda build recipe && conda install --use-local sdrf-pipelines shell: bash -l {0} - name: Test the installed package From d2663f9662799f1973458916db0d6357521ede24 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 16:37:42 +0100 Subject: [PATCH 18/20] Test cache only validation. --- .github/workflows/conda-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index 8e556fe5..44036124 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -37,7 +37,7 @@ jobs: run: | source $CONDA/etc/profile.d/conda.sh conda activate sdrf-pipelines - conda build recipe && conda install --use-local sdrf-pipelines + conda build recipe shell: bash -l {0} - name: Test the installed package From b5ccd2a8beff12c6287c0651e32ab2e4941983c8 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 16:47:01 +0100 Subject: [PATCH 19/20] Test cache only validation. --- .github/workflows/conda-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index 44036124..5f3b13eb 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -37,7 +37,8 @@ jobs: run: | source $CONDA/etc/profile.d/conda.sh conda activate sdrf-pipelines - conda build recipe + PACKAGE_PATH=$(find /usr/share/miniconda/envs/sdrf-pipelines/conda-bld/noarch/ -name "sdrf-pipelines-*.tar.bz2" | head -n 1) + conda build recipe && conda install --offline "$PACKAGE_PATH" shell: bash -l {0} - name: Test the installed package From 10e06d9c1730b7ab2225709965edeea7b3627418 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Mon, 5 Aug 2024 16:53:07 +0100 Subject: [PATCH 20/20] Test cache only validation. --- .github/workflows/conda-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index 5f3b13eb..1e498440 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -37,8 +37,9 @@ jobs: run: | source $CONDA/etc/profile.d/conda.sh conda activate sdrf-pipelines + conda build recipe PACKAGE_PATH=$(find /usr/share/miniconda/envs/sdrf-pipelines/conda-bld/noarch/ -name "sdrf-pipelines-*.tar.bz2" | head -n 1) - conda build recipe && conda install --offline "$PACKAGE_PATH" + conda install --offline "$PACKAGE_PATH" shell: bash -l {0} - name: Test the installed package