Skip to content

Commit

Permalink
further modernize
Browse files Browse the repository at this point in the history
  • Loading branch information
kedhammar committed Jul 2, 2024
1 parent f282d74 commit 74a5f00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions anglerfish/anglerfish.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import sys
import uuid
from collections import Counter
from importlib.metadata import version as get_version
from itertools import groupby

import Levenshtein as lev
import numpy as np
from setuptools import pkg_resources

from .demux.demux import (
Alignment,
Expand Down Expand Up @@ -46,7 +46,7 @@
def run_demux(args):
# Boilerplate
multiprocessing.set_start_method("spawn")
version = pkg_resources.get_distribution("bio-anglerfish").version
version = get_version("bio-anglerfish")
run_uuid = str(uuid.uuid4())

# Parse arguments
Expand Down
4 changes: 2 additions & 2 deletions anglerfish/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import datetime as dt
import os
from enum import Enum
from importlib.metadata import version as get_version
from typing import Optional

import typer
from setuptools import pkg_resources
from typing_extensions import Annotated

from .anglerfish import run_demux
Expand All @@ -23,7 +23,7 @@ class IndexOrientations(str, Enum):

def version_callback(value: bool):
if value:
print(f'anglerfish {pkg_resources.get_distribution("bio-anglerfish").version}')
print(f'anglerfish {get_version("bio-anglerfish")}')
raise typer.Exit()


Expand Down

0 comments on commit 74a5f00

Please sign in to comment.