Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
v0.1.4 (#88)
Browse files Browse the repository at this point in the history
* Added classifiers for Python version.

* updated GAnalytics tag

* Simplified threads check.

* Updated version management.

* Exposeing __version__

* Dropped support for Python 3.6 and 3.7

* Fixed circular import.

* Updated requirements.

* Bump rich from 9.13.0 to 10.0.0 (#70)

* Bump numpy from 1.20.1 to 1.20.2 (#71)

* Bump rich from 10.0.0 to 10.0.1 (#72)

* Bump rich from 10.0.1 to 10.1.0 (#73)

* Bump regex from 2021.3.17 to 2021.4.4 (#74)

* Bump pytest from 6.2.2 to 6.2.3 (#75)

* Bump tqdm from 4.59.0 to 4.60.0 (#76)

* Bump pandas from 1.2.3 to 1.2.4 (#77)

* Bump pytest from 6.2.3 to 6.2.4 (#78)

* Bump rich from 10.1.0 to 10.2.0 (#80)

* Bump numpy from 1.20.2 to 1.20.3 (#79)

* Bump rich from 10.2.0 to 10.2.2 (#82)

* Bump tqdm from 4.60.0 to 4.61.0 (#83)

* Bump biopython from 1.78 to 1.79 (#84)

* Bump rich from 10.2.2 to 10.3.0 (#85)

* Bump tqdm from 4.61.0 to 4.61.1 (#86)

* Fixed --case-insensitive bug.

* v0.1.4 release

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
ggirelli and dependabot[bot] authored Jun 15, 2021
1 parent 4230845 commit 498dd0b
Show file tree
Hide file tree
Showing 12 changed files with 178 additions and 248 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
fail-fast: true
matrix:
os: ["ubuntu-latest"]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.8, 3.9]
runs-on: ${{ matrix.os }}
steps:
# Checkout repo and setup python
Expand All @@ -59,7 +59,7 @@ jobs:
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-py${{ matrix.python-version }}
# install dependencies if cache does not exist
- name: Install dependencies
run: poetry install
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [0.1.4]
### Changed
- Dropped support for Python 3.6 and 3.7

### Fixed
- Fixed bug triggered by `--case-insensitive` option in `find_seq` tool.

## [0.1.3]
### Fixed
- Cleaned dependencies, solved linting and packaging issues.
Expand Down Expand Up @@ -53,7 +60,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [0.0.1] - 2020-08-03

[Unreleased]: https://github.com/ggirelli/fastx-barber/tree/dev
[0.1.2]: https://github.com/ggirelli/fastx-barber/releases/tag/v0.1.3
[0.1.4]: https://github.com/ggirelli/fastx-barber/releases/tag/v0.1.4
[0.1.3]: https://github.com/ggirelli/fastx-barber/releases/tag/v0.1.3
[0.1.2]: https://github.com/ggirelli/fastx-barber/releases/tag/v0.1.2
[0.1.1]: https://github.com/ggirelli/fastx-barber/releases/tag/v0.1.1
[0.1.0]: https://github.com/ggirelli/fastx-barber/releases/tag/v0.1.0
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

[PyPi](https://pypi.org/project/fastx-barber/) | [docs](https://ggirelli.github.io/fastx-barber/)

A Python3.6.13+ package to trim and extract flags from FASTA and FASTQ files.
A Python3.8+ package to trim and extract flags from FASTA and FASTQ files.

## Features (in short)

Expand All @@ -23,7 +23,7 @@ For more available features, check out our [docs](https://ggirelli.github.io/fas

## Requirements

`fastx-barber` has been tested with Python 3.6.13, 3.7, 3.8, and 3.9. We recommend installing it using `pipx` (see [below](https://github.com/ggirelli/fastx-barber#install)) to avoid dependency conflicts with other packages. The packages it depends on are listed in our [dependency graph](https://github.com/ggirelli/fastx-barber/network/dependencies). We use [`poetry`](https://github.com/python-poetry/poetry) to handle our dependencies.
`fastx-barber` has been tested with Python 3.8 and 3.9. We recommend installing it using `pipx` (see [below](https://github.com/ggirelli/fastx-barber#install)) to avoid dependency conflicts with other packages. The packages it depends on are listed in our [dependency graph](https://github.com/ggirelli/fastx-barber/network/dependencies). We use [`poetry`](https://github.com/python-poetry/poetry) to handle our dependencies.

## Install

Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
theme: jekyll-theme-cayman
title: "fastx-barber"
description: "A package to trim and extract flags from FASTA and FASTQ files."
google_analytics: "UA-99031010-8"
google_analytics: "G-7SPT6HZ3GP"
11 changes: 8 additions & 3 deletions fastx_barber/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@
@contact: gigi.ga90@gmail.com
"""

from fastx_barber.const import __version__
from fastx_barber import const, scripts
from fastx_barber import const
from fastx_barber import bedio, io, scriptio, seqio
from fastx_barber import flag, match, qual, trim

from importlib.metadata import version

try:
__version__ = version(__name__)
except Exception as e:
raise e

__all__ = [
"__version__",
"const",
"scripts",
"bedio",
"io",
"scriptio",
Expand Down
3 changes: 0 additions & 3 deletions fastx_barber/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
from enum import Enum
from typing import DefaultDict, Optional, Tuple

__version__ = "0.1.3"


BedRecord = Tuple[
str,
int,
Expand Down
9 changes: 3 additions & 6 deletions fastx_barber/scripts/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"""

import argparse
from fastx_barber.const import __version__, DEFAULT_PHRED_OFFSET
from fastx_barber import __version__
from fastx_barber.const import DEFAULT_PHRED_OFFSET
import joblib # type: ignore
import logging
import sys
Expand Down Expand Up @@ -90,11 +91,7 @@ def add_tempdir_option(arg_group: argparse._ArgumentGroup) -> argparse._Argument


def check_threads(threads: int) -> int:
if threads > joblib.cpu_count():
return joblib.cpu_count()
elif threads <= 0:
return 1
return threads
return max(1, min(threads, joblib.cpu_count()))


def add_phred_offset_option(
Expand Down
2 changes: 1 addition & 1 deletion fastx_barber/scripts/barber.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""

import argparse
from fastx_barber.const import __version__
from fastx_barber import __version__
from fastx_barber.scripts import arguments as ap
from fastx_barber import scripts
import sys
Expand Down
2 changes: 1 addition & 1 deletion fastx_barber/scripts/find_seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def run(args: argparse.Namespace) -> None:
location_id = 0
for record in parser:
if args.case_insensitive:
record[1] = record[1].upper()
record = (record[0], record[1].upper())
for pos, location_id in search_needle(record, args.needle, location_id):
writer.do(
(
Expand Down
Loading

0 comments on commit 498dd0b

Please sign in to comment.