Skip to content

Commit

Permalink
refurbishment
Browse files Browse the repository at this point in the history
  • Loading branch information
JFsanchezherrero committed Feb 28, 2021
1 parent 522d6c8 commit 4578ac4
Show file tree
Hide file tree
Showing 22 changed files with 121 additions and 35 deletions.
17 changes: 0 additions & 17 deletions code/.project

This file was deleted.

18 changes: 0 additions & 18 deletions code/.pydevproject

This file was deleted.

Binary file added code/.setup.py.swp
Binary file not shown.
14 changes: 14 additions & 0 deletions code/BacDup/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from pkg_resources import get_distribution
try:
__version__ = get_distribution('BacDup').version
except:
__version__ = 'local'

__all__ = [
'modules',
'scripts',
'config'
]

from BacDup import *

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions code/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 JF Sanchez-Herrero and Alba Moya

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Empty file added code/VERSION
Empty file.
9 changes: 9 additions & 0 deletions code/devel/clean_devel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
echo "######################################"
echo "## Clean old folders"
echo "rm -r build"
rm -r build
echo "rm -r dist"
rm -r dist
echo "rm -r BacDup.egg-info"
rm -r BacDup.egg-info
echo ""
4 changes: 4 additions & 0 deletions code/devel/create_distro.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
echo "######################################"
echo "## Create new distribution"
python setup.py sdist bdist_wheel
echo ""
24 changes: 24 additions & 0 deletions code/devel/developer_guidelines.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## clean distribution packages
sh devel/clean_devel.sh

## create distribution files
sh devel/create_distro.sh

## create .pypirc file

$ nano .pypirc

[distutils]
index-servers=pypi
[pypi]
repository = https://upload.pypi.org/legacy/
username =jfsanchezherrero

## Upload using twine
sh devel/upload_pypi.sh



## references
https://dzone.com/articles/executable-package-pip-install
https://packaging.python.org/tutorials/packaging-projects/
3 changes: 3 additions & 0 deletions code/devel/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
wheel
twine
setuptools
1 change: 1 addition & 0 deletions code/devel/test_module.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sh devel/clean_devel.sh; sh devel/create_distro.sh; pip install -e ./
1 change: 1 addition & 0 deletions code/devel/upload_pypi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python -m twine upload dist/*
File renamed without changes.
44 changes: 44 additions & 0 deletions code/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import setuptools
import glob

long_description_text = ""
with open("README.md", "r") as fh:
long_description_text = fh.read()

setuptools.setup(
name="BacDup",
version="0.1",

scripts=glob.glob('main/*'),
## TODO: check add several authors
author="Jose F. Sanchez-Herrero and Alba Moya Garces",

author_email="jfbioinformatics@gmail.com",
description="Bacterial gene duplication analysis pipeline",

long_description_content_type="text/markdown",
long_description=long_description_text,
url="https://github.com/JFsanchezherrero/BacDup",
packages=setuptools.find_packages(),
license='MIT License',

classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
include_package_data=True,

## TODO: check
install_requires=[
'pandas', 'patool', 'termcolor',
#'pysam', 'pybedtools', 'multiqc',
'bcbio-gff',
'biopython', 'HCGB',
'ftputil', 'numpy', 'python-dateutil', 'pytz', 'six', 'wget'
],
)




0 comments on commit 4578ac4

Please sign in to comment.