Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev -> main for release v.0.1.6 #19

Merged
merged 10 commits into from
Sep 2, 2024
2 changes: 1 addition & 1 deletion .github/workflows/lint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run linter

on:
pull_request:
branches: [main]
branches: [main, dev]

jobs:
flake8:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main]
pull_request:
branches: [main]
branches: [main, dev]

jobs:
pytest:
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=20000']
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,10 @@ def main():
'No reverse file given, yet given forward file has the "_1" suffix implying it\'s paired-end. '
+ "Either supply the reverse file, or supply a single-end file."
)
exit(1)
elif "_2" not in rev:
logging.error(
'The expected suffix "_2" for a supplied reverse file is missing. Please verify your inputs.'
)
exit(1)
else:
files_to_parse = [fwd, rev]

Expand Down
26 changes: 26 additions & 0 deletions mgnify_pipelines_toolkit/utils/get_mpt_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright 2024 EMBL - European Bioinformatics Institute
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import importlib.metadata


def main():

print(importlib.metadata.version("mgnify-pipelines-toolkit"))


if __name__ == "__main__":
main()
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mgnify_pipelines_toolkit"
version = "0.1.5"
version = "0.1.6"
readme = "README.md"
license = {text = "Apache Software License 2.0"}
authors = [
Expand Down Expand Up @@ -56,6 +56,7 @@ mapseq_to_asv_table = "mgnify_pipelines_toolkit.analysis.amplicon.mapseq_to_asv_
primer_val_classification = "mgnify_pipelines_toolkit.analysis.amplicon.primer_val_classification:main"
# utils
fasta_to_delimited = "mgnify_pipelines_toolkit.utils.fasta_to_delimited:main"
get_mpt_version = "mgnify_pipelines_toolkit.utils.get_mpt_version:main"

[project.optional-dependencies]
tests = [
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/misc/test_antismash.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
- name: antismash_gff_builder test_wrong_args
tags:
- antismash_gff_builder
exit_code: 2
command: python -m mgnify_pipelines_toolkit.analysis.assembly.antismash_gff_builder --chromosome X
stderr:
contains:
- "antismash_gff_builder.py: error: the following arguments are required: -i/--input, -o/--output"
- name: antismash_gff_builder test_correct_args
tags:
- antismash_gff_builder
command: python -m mgnify_pipelines_toolkit.analysis.assembly.antismash_gff_builder -i tests/fixtures/misc/test_antismash.json -o test.gff --cds_tag ID
files:
- path: "test.gff"
md5sum: 381a0c0d7e221f8817d84f36153444c4
chrisAta marked this conversation as resolved.
Show resolved Hide resolved
- name: antismash_gff_builder test_correct_args_wrong_cds_tag
tags:
- antismash_gff_builder
exit_code: 1
command: python -m mgnify_pipelines_toolkit.analysis.assembly.antismash_gff_builder -i tests/fixtures/misc/test_antismash.json -o test.gff --cds_tag IDD
stderr:
contains:
- "KeyError: 'IDD'"
8 changes: 8 additions & 0 deletions tests/unit/utils/get_mpt_version/test_get_mpt_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- name: test_get_mpt_version
tags:
- test_get_mpt_version
exit_code: 0
stdout:
contains_regex:
- '\d\.\d\.\d'
command: python -m mgnify_pipelines_toolkit.utils.get_mpt_version
Loading