Skip to content

Commit

Permalink
update versino
Browse files Browse the repository at this point in the history
  • Loading branch information
jakevc committed Feb 12, 2024
1 parent c8c83b8 commit ba952dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
3 changes: 3 additions & 0 deletions fibermorph/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

import importlib.metadata
__version__= importlib.metadata.version('fibermorph')
1 change: 0 additions & 1 deletion fibermorph/_version.py

This file was deleted.

15 changes: 3 additions & 12 deletions fibermorph/fibermorph.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# %% Import libraries
import argparse
import datetime
import os
Expand All @@ -11,7 +10,6 @@
from functools import wraps
from timeit import default_timer as timer

# import cv2
import numpy as np
import pandas as pd
import rawpy
Expand All @@ -32,18 +30,9 @@
from skimage.segmentation import clear_border
from skimage.util import invert
from tqdm import tqdm
#%%
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
import demo

# Grab version from _version.py in the fibermorph directory
dir = os.path.dirname(__file__)
version_py = os.path.join(dir, "_version.py")
exec(open(version_py).read())

# %% Functions

# parse_args() and timing() listed first for easy updating/access
from fibermorph import __version__

def parse_args():
"""
Expand All @@ -53,6 +42,8 @@ def parse_args():
Parser argument namespace
"""
parser = argparse.ArgumentParser(description="fibermorph")

parser.add_argument('--version', action='version', version=f'%(prog)s {__version__}')

parser.add_argument(
"-o", "--output_directory", metavar="", default=None,
Expand Down

0 comments on commit ba952dd

Please sign in to comment.