Skip to content

Commit

Permalink
Add PyPi Distribution
Browse files Browse the repository at this point in the history
This Commit,
- Add PyPi Distribution
- Adds Scripts to manage PyPi distribution
- Updates README.md
  • Loading branch information
codenio committed Feb 18, 2021
1 parent 2e1f0f6 commit d05b1cc
Show file tree
Hide file tree
Showing 9 changed files with 150 additions and 4 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ vmon-cli - CLI Viewer for Ibsen 512 USB interrogator

## Installation

- Install Using pip
```bash
$ pip install vmon-cli
$ pip install vmon-cli --no-cache
Collecting vmon-cli
Downloading vmon_cli-0.2.0-py3-none-any.whl (17 kB)
Collecting Pillow==8.0.1
Downloading Pillow-8.0.1-cp36-cp36m-manylinux1_x86_64.whl (2.2 MB)
|████████████████████████████████| 2.2 MB 12.3 MB/s
Requirement already satisfied: pyparsing==2.4.7 in /home/aananth/.virtualenvs/opencv/lib/python3.6/site-packages (from vmon-cli) (2.4.7)
Collecting numpy==1.19.4
Downloading numpy-1.19.4-cp36-cp36m-manylinux2010_x86_64.whl (14.5 MB)
|████████████████████████████████| 14.5 MB 11.9 MB/s
...
```

- Install from Source
```bash
# clone the repository
$ git clone [email protected]:codenio/vmon-cli.git
Expand Down
3 changes: 3 additions & 0 deletions scripts/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
rm -rf build/
rm -rf dist/
7 changes: 7 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
rm -rf build/
rm -rf dist/

python setup.py install

python3 setup.py install
7 changes: 7 additions & 0 deletions scripts/uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
rm -rf build/
rm -rf dist/

pip uninstall vmon-cli -y

pip3 uninstall vmon-cli -y
6 changes: 6 additions & 0 deletions scripts/updatepip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
rm -rf build/
rm -rf dist/

python setup.py sdist bdist_wheel
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
6 changes: 6 additions & 0 deletions scripts/updatepip3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
rm -rf build/
rm -rf dist/

python setup.py sdist bdist_wheel
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
105 changes: 102 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,103 @@
from setuptools import setup, find_packages

from distutils.util import convert_path

long_description ="""
# vmon-cli
vmon-cli - CLI Viewer for Ibsen 512 USB interrogator
## Installation
```bash
# clone the repository
$ git clone [email protected]:codenio/vmon-cli.git
# move into tmon-cli folder
$ cd vmon-cli
# install requirements
$ pip install -r requirments.txt
# intall tmon
$ pip install .
# check installation
$ vmon --help
Usage: vmon [OPTIONS] COMMAND [ARGS]...
vmon - I-Mon Spectrum Viewer and Exporter
Options:
--help Show this message and exit.
Commands:
export Export Processed I-Mon data read from <file>.csv into...
plot Plot the I-Mon data into graphs
```
### Usage
- vmon commands
```bash
vmon --help
Usage: vmon [OPTIONS] COMMAND [ARGS]...
vmon - I-Mon Spectrum Viewer and Exporter
Options:
--help Show this message and exit.
Commands:
export Export Processed I-Mon data read from <file>.csv into...
plot Plot the I-Mon data into graphs
```
- plot sub command
```bash
$ vmon plot --help
Usage: vmon plot [OPTIONS] FILES...
Plot the I-Mon data into graphs
Options:
-p, --path TEXT path form which csv files are to be imported, default = .
-t, --title TEXT set custom title for the plot, default = .
-n, --normalise normalise the data before ploting
-pk, --peaks show peaks in the plot
--help Show this message and exit.
```
- export sub command
```bash
$ vmon export --help
Usage: vmon export [OPTIONS] [FILES]...
Export Processed I-Mon data read from <file>.csv into <file>_vmon.csv
files
Options:
-p, --path TEXT path form which csv files are to be imported, default = .
-n, --normalise normalise the data before ploting
-i, --inspect inspect the plot before exporting
--help Show this message and exit.
```
"""

pkg_ns = {}

ver_path = convert_path('vmon/__init__.py')
with open(ver_path) as ver_file:
exec(ver_file.read(), pkg_ns)

setup(
name = 'vmon',
version = '0.2.0',
name = 'vmon-cli',
version = pkg_ns['__version__'],
description='CLI Viewer for Ibsen 512 USB interrogator',
url='https://github.com/codenio/vmon-cli',
author='Aananth K',
author_email='[email protected]',
license='GPL-3.0',
packages = find_packages(exclude=[]),
install_requires=[
"click==7.1.2",
Expand All @@ -24,4 +119,8 @@
'console_scripts': [
'vmon = vmon.main:cli'
]
})
},
zip_safe=False,
long_description_content_type="text/markdown",
long_description=long_description,
)
1 change: 1 addition & 0 deletions vmon/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.2.0'
2 changes: 1 addition & 1 deletion vmon/commands/export.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
vmon export - export I-Mon data into CSV or XLSX
vmon export - export I-Mon data into CSV
09-12-2020
Expand Down

0 comments on commit d05b1cc

Please sign in to comment.