Skip to content

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
nsheff committed Jan 25, 2022
2 parents f5f3a14 + 5fa2d14 commit f51efc7
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Lint

on: [push, pull_request]
on: [pull_request]

jobs:
lint:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/run-pytest.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Run pytests

on:
push:
branches: [master, dev]
pull_request:
branches: [master, dev]

workflow_dispatch:
inputs: null

jobs:
pytest:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
os: [ubuntu-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v2
Expand All @@ -22,10 +22,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dev dependancies
- name: Install dev dependencies
run: if [ -f requirements/requirements-dev.txt ]; then pip install -r requirements/requirements-dev.txt; fi

- name: Install test dependancies
- name: Install test dependencies
run: if [ -f requirements/requirements-test.txt ]; then pip install -r requirements/requirements-test.txt; fi

- name: Install package
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

- [pipestat](http://pipestat.databio.org/en/latest/) support

## [0.12.3] -- 2022-01-25

### Fixed
- A few bugs with compatibility with Python version 3.9

## [0.12.2] -- 2021-12-20

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion pypiper/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
import sys
import time
import warnings
from collections import Iterable

from collections.abc import Iterable
from hashlib import md5

import __main__
Expand Down
3 changes: 2 additions & 1 deletion pypiper/ngstk.py
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,8 @@ def get_read_type(self, bam_file, n=10):
:param int n: Number of lines to read from bam file.
:return str, int: tuple of read type and read length
"""
from collections import Counter

from collections.abc import Counter

try:
p = subprocess.Popen(
Expand Down
15 changes: 6 additions & 9 deletions pypiper/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@
import glob
import os
import sys
from collections import OrderedDict

if sys.version_info < (3, 3):
from collections import Iterable, Mapping
else:
from collections.abc import Iterable, Mapping
from collections.abc import Iterable, Mapping

from .exceptions import (
IllegalPipelineDefinitionError,
Expand Down Expand Up @@ -412,10 +408,11 @@ def _is_unordered(collection):
illogical to investigate whether it's ordered.
"""
if not isinstance(collection, Iterable):
raise TypeError("Non-iterable alleged collection: {}".format(type(collection)))
return isinstance(collection, set) or (
isinstance(collection, dict) and not isinstance(collection, OrderedDict)
)
raise TypeError("Non-iterable alleged collection: {}".
format(type(collection)))


return isinstance(collection, set) or isinstance(collection, dict)


def _parse_stage_spec(stage_spec):
Expand Down
8 changes: 3 additions & 5 deletions pypiper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import os
import re
import sys
from collections import Iterable, Mapping, Sequence

from collections.abc import Iterable, Mapping, Sequence
from shlex import split
from subprocess import PIPE

Expand Down Expand Up @@ -854,10 +855,7 @@ def _determine_args(argument_groups, arguments, use_all_args=False):
:return set[str]: Collection of (unique) argument names to add to a parser.
"""

if sys.version_info < (3, 3):
from collections import Iterable
else:
from collections.abc import Iterable
from collections.abc import Iterable

from logmuse import LOGGING_CLI_OPTDATA

Expand Down
2 changes: 0 additions & 2 deletions requirements/reqs-build-release.txt

This file was deleted.

6 changes: 0 additions & 6 deletions requirements/reqs-test.txt

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions requirements/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
mock==2.0.0
<<<<<<< HEAD:requirements/reqs-test.txt
pytest>=4.6.9
pytest-cov>=2.8.1
hypothesis==4.38.0
coveralls
veracitools
=======
pytest>=4.2.1
hypothesis
coveralls>=1.1
pytest-cov==2.6.1
veracitools
pytest-remotedata
>>>>>>> master:requirements/requirements-test.txt
9 changes: 1 addition & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,12 @@

try:
from setuptools import setup

if sys.version_info < (2, 7):
extra['install_requires'] = ['argparse']
except ImportError:
from distutils.core import setup

if sys.version_info < (2, 7):
extra["dependencies"] = ["argparse"]


def read_reqs_file(reqs_name):
"""Read requirements file for given requirements group."""
path_reqs_file = os.path.join("requirements", "reqs-{}.txt".format(reqs_name))
path_reqs_file = os.path.join("requirements", "requirements-{}.txt".format(reqs_name))
with open(path_reqs_file, "r") as reqs_file:
return [
pkg.rstrip() for pkg in reqs_file.readlines() if not pkg.startswith("#")
Expand Down

0 comments on commit f51efc7

Please sign in to comment.