Skip to content

Commit

Permalink
updating setup.py to setuptools
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Yakimovich, PhD committed Nov 12, 2020
1 parent 2d85516 commit 1453896
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,6 +2,7 @@
*.ipynb
*.pyc
*dist*
*PyPlaque.egg-info*
*MANIFEST*
*__pycache__/*
*ipynb_checkpoints*
5 changes: 2 additions & 3 deletions README.md
Expand Up @@ -10,10 +10,10 @@ pip install PyPlaque
```

# Usage

```
from specimen import PlaquesImageGray
from phenotypes import Plaque
```

Here's a test example of how to analyze plaques in an image using PyPlaque. First let's load an example image:
Expand All @@ -24,8 +24,8 @@ from skimage.io import imsave, imread, imshow
img_url = 'https://raw.github.com/plaque2/matlab/master/Sample_B01_s1_w2.tif'
img = imread(img_url)
imshow(img)
```

![image](https://user-images.githubusercontent.com/1135672/88387118-b8b10f00-cda9-11ea-8d5e-98edff82a80f.png)

Now let's detect plaques in this flourescence microscopy image and print out all their coordinmates:
Expand All @@ -49,7 +49,6 @@ This will output following measurements:
(782.8965517241379, 1151.510344827586)
...
```

Each Plaque object containes a crop of individual virological plaque, as well as, measurements:
Expand Down
4 changes: 3 additions & 1 deletion setup.cfg
@@ -1,4 +1,6 @@

# Inside of setup.cfg
[metadata]
description-file = README.md
description-file = 'README.md',
long_description_content_type='text/markdown',
license_files = LICENSE
15 changes: 9 additions & 6 deletions setup.py
@@ -1,10 +1,13 @@
from distutils.core import setup
from setuptools import setup

# read the contents of your README file
from os import path
folder_path = path.abspath(path.dirname(__file__))
with open(path.join(folder_path, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

import pathlib

cwd = pathlib.Path(__file__).parent.resolve()

# Get the long description from the README file
long_description = (cwd / 'README.md').read_text(encoding='utf-8')

version = 'v0.0.3'

Expand Down Expand Up @@ -36,5 +39,5 @@
'Programming Language :: Python :: 3.8',
],
long_description=long_description,
long_description_content_type='text/markdown'
long_description_content_type='text/markdown'
)

0 comments on commit 1453896

Please sign in to comment.