Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up appropiate setup.py #1

Open
JFsanchezherrero opened this issue Mar 3, 2021 · 1 comment
Open

Set up appropiate setup.py #1

JFsanchezherrero opened this issue Mar 3, 2021 · 1 comment
Labels
to do Things to do

Comments

@JFsanchezherrero
Copy link
Owner

Along the process and before pip release setup file setup.py appropiately.

Also, check how to add several authors:

BacDup/code/setup.py

Lines 13 to 14 in a2a23a6

## TODO: check add several authors
author="Jose F. Sanchez-Herrero and Alba Moya Garces",

Add python packages directly from requirements.txt file and avoid setting the code in setup.py:

BacDup/code/setup.py

Lines 32 to 40 in a2a23a6

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

Set VERSION to be retrieved from VERSION file

version="0.1",

@JFsanchezherrero JFsanchezherrero added the to do Things to do label Mar 3, 2021
@JFsanchezherrero
Copy link
Owner Author

Check examples on how to add VERSION and requierements in BacterialTyper setup.py

def get_require_modules():
    """
    Get main python requirements modules
    """
    with open("./BacterialTyper/config/python/python_requirements_summary.csv", 'r') as f:
        myModules = [line.strip().split(',')[0] for line in f]
    
    return myModules

def get_version():
    """
    Original code: PhiSpy setup.py 
    https://github.com/linsalrob/PhiSpy/blob/master/setup.py
    """
    with open("VERSION", 'r') as f:
        v = f.readline().strip()
    return v

Then in setup()

setup(
    version=get_version(),
    install_requires=get_require_modules()
    ....
)
  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to do Things to do
Projects
None yet
Development

No branches or pull requests

1 participant