-
Notifications
You must be signed in to change notification settings - Fork 4
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
easy installation through pip #38
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
bfa1543
add setup.py file
abearab b1c1f8a
add __version__.py file with version "0.1.0"
abearab 634aa33
add python publishing workflow
abearab d9c72f8
Bump version to "0.1.1"
abearab 2c5cc79
update README.rst with installation instructions for CanDI
abearab 6c61b88
fix format
abearab 0eebf06
fix link format
abearab 462b7cc
fix format
abearab f65e253
fix format
abearab db33891
add entry point for 'candi' command
abearab 1981494
update entry point
abearab 62be2fe
update import command
abearab 2657e7b
update import command
abearab 6df8d23
update import command
abearab 3fed533
use a main function
abearab 8cf7088
update import command
abearab fadc820
fix import
abearab 849b938
update setup to include data_dir argument
abearab eb6db61
add directory creation
abearab File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Publish PyPI | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os-version }} | ||
name: ${{ matrix.os-version }} (${{ matrix.python-version }}) | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os-version: ["ubuntu-latest"] | ||
python-version: ["3.9"] # ["3.8", "3.9", "3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: "Set up Python ${{ matrix.python-version }}" | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
- name: "Install flake8" | ||
run: | | ||
pip install flake8 | ||
- name: "Lint with flake8" | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: "Install miniconda" | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniconda-version: "latest" | ||
auto-update-conda: true | ||
mamba-version: "*" | ||
python-version: ${{ matrix.python-version }} | ||
channels: conda-forge,bioconda | ||
environment-file: environment.yml | ||
- name: "Install pytest" | ||
shell: bash -l {0} | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel build pytest | ||
pip install twine | ||
- name: "Test with pytest" | ||
shell: bash -l {0} | ||
run: | | ||
pytest -s | ||
- name: Build package | ||
shell: bash -l {0} | ||
run: | | ||
python setup.py bdist_wheel --universal | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version = "0.1.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from CanDI.candi import data | ||
from . import data | ||
data = data.Data() #Global object data instantiated on import required for access by GeneQuery Objects | ||
from CanDI.candi.candi import (Gene, CellLine, Organelle, Cancer, CellLineCluster, GeneCluster) | ||
from . import (Gene, CellLine, Organelle, Cancer, CellLineCluster, GeneCluster) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import os | ||
import configparser | ||
import json | ||
from manager import Manager | ||
from .manager import Manager | ||
|
||
|
||
def main(): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import pandas as pd | ||
from CanDI.structures import handlers | ||
from . import handlers | ||
|
||
class Entity(object): | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from setuptools import setup, find_packages | ||
from CanDI.__version__ import version | ||
|
||
from pathlib import Path | ||
|
||
this_directory = Path(__file__).parent | ||
|
||
setup( | ||
name='CanDI', | ||
description='A cancer data integration package', | ||
version=version, | ||
packages=find_packages(), | ||
python_requires='>=3.9', | ||
install_requires=[ | ||
"pandas", | ||
"configparser", | ||
"requests", | ||
"tqdm", | ||
], | ||
url = 'https://github.com/GilbertLabUCSF/CanDI', | ||
entry_points={ | ||
'console_scripts': [ | ||
'candi-install = CanDI.setup.install:main', | ||
], | ||
}, | ||
classifiers=[ | ||
'Intended Audience :: Science/Research', | ||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python :: 3', | ||
], | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
candi-install
works as a command.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Yogiski – Hi Chris, hope all is well! I made some changes to CanDI. Let me know what you think!