-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPP] Completed basic setup package and CI integration.
- Loading branch information
1 parent
fcf3ced
commit 4ff511c
Showing
12 changed files
with
212 additions
and
2 deletions.
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,17 @@ | ||
\.vscode/ | ||
|
||
\.DS_Store | ||
|
||
__pycache__ | ||
|
||
*/__pycache__/* | ||
|
||
**/__pycache__/* | ||
|
||
.notipy.json | ||
|
||
.single_run | ||
|
||
.coverage* | ||
|
||
coverage.xml |
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 @@ | ||
{"code_climate": {"code_climate_maintainability_url": "https://api.codeclimate.com/v1/badges/64bfb8eb5a73959ea0d3/maintainability", "code_climate_coverage_url": "https://api.codeclimate.com/v1/badges/64bfb8eb5a73959ea0d3/test_coverage"}, "codacy": {"codacy": " image:: https://api.codacy.com/project/badge/Grade/85bc1e3d96bf4c43a2ca70ca233a1bca\n :target: https://www.codacy.com/manual/LucaCappelletti94/epigenomic_dataset?utm_source=github.com&utm_medium=referral&utm_content=LucaCappelletti94/epigenomic_dataset&utm_campaign=Badge_Grade"}} |
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,38 @@ | ||
dist: trusty | ||
sudo: false | ||
git: | ||
depth: false | ||
addons: | ||
sonarcloud: | ||
organization: lucacappelletti94-github | ||
token: | ||
secure: xJRLDhqyy2V/hsD5oN3HrvHkc3219NFnUfnoTbEJ10ZlzEaqjLOfz2TK2vWNNhvR8r/cQW/BVp/JMGxPi9X/WU8Yyz65mMd0h2vowxyTgr6sSit5P3fEkDlXpV6MJ/XRUIuSdGU1/qy4IrbdS+6tI7IaRZ9tEA4GuFjSQy0wEis90ciOUbZClMVrKDdq0joPrdmnRMyjf2q6gxY+y1wbn+TuFgOJ4bhsWoRyP0Ig7EhbQJTYc+KyXVlV9xK/7RocziZtYmTv/wPWTb3imamm3bg+bTCrZaPvP0zsInLkguyWO8fu2j3eTyKcoTmCZni6pJLhAx4JvVVlEyKuxLBxn4+v+V4YeBCK2Q/l+BAYGVXONuuudyHi2zAzmX4VdeXpd6cvO0NzIAm/vGiqbdI2Pslo6OAF7hr3dw11wKeVkdxuvWK3taIqaIUAqt7tdje6FpUXcfg6+EGr6gSeLAmfD5bg8OVW6mSkB1/fwkn9MD/9HxBaGTchu8NJc3LkNKaS7UYV3xP3rSXU/+NiKHTH0xkHbp4yPasZXgsRk7aM7t6K/EPQt+fBFO5V/GkyffgkrMIqdMkJde0lsqZ/dWiTg8oz89i3Wr6ihLowxaI/j/hMdXDQrMN+UfWSvDZasrRIQrjhCAXj7KC46ODh7lIe9ep70qd967khgrFoh7M9ivI= | ||
language: python | ||
python: | ||
- '3.6' | ||
before_install: | ||
- pip install --upgrade pytest | ||
install: | ||
- pip install .[test] | ||
before_script: | ||
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 | ||
> ./cc-test-reporter | ||
- chmod +x ./cc-test-reporter | ||
- "./cc-test-reporter before-build" | ||
after_script: | ||
- "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT" | ||
script: | ||
- rm -rf .coverage | ||
- coverage erase | ||
- pytest --cov=epigenomic_dataset --cov-report xml:coverage.xml | ||
- coverage combine --append || true | ||
- coverage report | ||
- coverage xml | ||
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then sonar-scanner; fi | ||
after_success: | ||
- coveralls | ||
- python-codacy-coverage -r coverage.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9BqiEu9wJ1MGXtvFJgoaRdvOheVMOtsJvwAKGIs2KZHfWGWFcAXEDslvYDee6XLePIxksdd+tJp3TXVFsGI1TLGrWp1uLnglw1Hr9SM9/IkGSXYzuxcbuL/9R8AiwylgVH/hYhp1QOSMNAgWMkj0OqIgUo8o2JR6zlDjkkb4ePlYF/hWJ2od/sJeMS6SjNwRnFcoYKMoShllD/36Jj+aMyVt+Kjz1S7a2+vCwLObHHnMXRLiM2awkvmxzlSg4uyasOZnYusZ4FIhLe/Qo10dH1MclFB9f7ZQka8ghxmEtRc1Yjc9+t3eAwWYKvt7tQemb2OOH3UhY= |
Empty file.
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,62 @@ | ||
epigenomic_dataset | ||
========================================================================================= | ||
|travis| |sonar_quality| |sonar_maintainability| |codacy| |code_climate_maintainability| |pip| |downloads| | ||
|
||
Python package wrapping ENCODE epigenomic data for a number of reference cell lines. | ||
|
||
How do I install this package? | ||
---------------------------------------------- | ||
As usual, just download it using pip: | ||
|
||
.. code:: shell | ||
pip install epigenomic_dataset | ||
Tests Coverage | ||
---------------------------------------------- | ||
Since some software handling coverages sometime get slightly different results, here's three of them: | ||
|
||
|coveralls| |sonar_coverage| |code_climate_coverage| | ||
|
||
Python package wrapping ENCODE epigenomic data for a number of reference cell lines. | ||
|
||
|
||
.. |travis| image:: https://travis-ci.org/LucaCappelletti94/epigenomic_dataset.png | ||
:target: https://travis-ci.org/LucaCappelletti94/epigenomic_dataset | ||
:alt: Travis CI build | ||
|
||
.. |sonar_quality| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_epigenomic_dataset&metric=alert_status | ||
:target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_epigenomic_dataset | ||
:alt: SonarCloud Quality | ||
|
||
.. |sonar_maintainability| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_epigenomic_dataset&metric=sqale_rating | ||
:target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_epigenomic_dataset | ||
:alt: SonarCloud Maintainability | ||
|
||
.. |sonar_coverage| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_epigenomic_dataset&metric=coverage | ||
:target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_epigenomic_dataset | ||
:alt: SonarCloud Coverage | ||
|
||
.. |coveralls| image:: https://coveralls.io/repos/github/LucaCappelletti94/epigenomic_dataset/badge.svg?branch=master | ||
:target: https://coveralls.io/github/LucaCappelletti94/epigenomic_dataset?branch=master | ||
:alt: Coveralls Coverage | ||
|
||
.. |pip| image:: https://badge.fury.io/py/epigenomic_dataset.svg | ||
:target: https://badge.fury.io/py/epigenomic_dataset | ||
:alt: Pypi project | ||
|
||
.. |downloads| image:: https://pepy.tech/badge/epigenomic_dataset | ||
:target: https://pepy.tech/badge/epigenomic_dataset | ||
:alt: Pypi total project downloads | ||
|
||
.. |codacy| image:: https://api.codacy.com/project/badge/Grade/85bc1e3d96bf4c43a2ca70ca233a1bca | ||
:target: https://www.codacy.com/manual/LucaCappelletti94/epigenomic_dataset?utm_source=github.com&utm_medium=referral&utm_content=LucaCappelletti94/epigenomic_dataset&utm_campaign=Badge_Grade | ||
:alt: Codacy Maintainability | ||
|
||
.. |code_climate_maintainability| image:: https://api.codeclimate.com/v1/badges/64bfb8eb5a73959ea0d3/maintainability | ||
:target: https://codeclimate.com/github/LucaCappelletti94/epigenomic_dataset/maintainability | ||
:alt: Maintainability | ||
|
||
.. |code_climate_coverage| image:: https://api.codeclimate.com/v1/badges/64bfb8eb5a73959ea0d3/test_coverage | ||
:target: https://codeclimate.com/github/LucaCappelletti94/epigenomic_dataset/test_coverage | ||
:alt: Code Climate Coverate |
Empty file.
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,2 @@ | ||
"""Current version of package epigenomic_dataset""" | ||
__version__ = "1.0.0" |
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,64 @@ | ||
import os | ||
import re | ||
# To use a consistent encoding | ||
from codecs import open as copen | ||
|
||
from setuptools import find_packages, setup | ||
|
||
here = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
# Get the long description from the relevant file | ||
with copen(os.path.join(here, 'README.rst'), encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
|
||
def read(*parts): | ||
with copen(os.path.join(here, *parts), 'r') as fp: | ||
return fp.read() | ||
|
||
|
||
def find_version(*file_paths): | ||
version_file = read(*file_paths) | ||
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", | ||
version_file, re.M) | ||
if version_match: | ||
return version_match.group(1) | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
__version__ = find_version("epigenomic_dataset", "__version__.py") | ||
|
||
test_deps =[ | ||
"pytest", | ||
"pytest-cov", | ||
"coveralls", | ||
"validate_version_code", | ||
"codacy-coverage" | ||
] | ||
|
||
extras = { | ||
'test': test_deps, | ||
} | ||
|
||
setup( | ||
name='epigenomic_dataset', | ||
version=__version__, | ||
description="Python package wrapping ENCODE epigenomic data for a number of reference cell lines.", | ||
long_description=long_description, | ||
url="https://github.com/LucaCappelletti94/epigenomic_dataset", | ||
author="Luca Cappelletti", | ||
author_email="[email protected]", | ||
# Choose your license | ||
license='MIT', | ||
include_package_data=True, | ||
classifiers=[ | ||
'Development Status :: 3 - Alpha', | ||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python :: 3' | ||
], | ||
packages=find_packages(exclude=['contrib', 'docs', 'tests*']), | ||
tests_require=test_deps, | ||
# Add here the package dependencies | ||
install_requires=[], | ||
extras_require=extras, | ||
) |
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,23 @@ | ||
# ===================================================== | ||
# Meta-data for the project | ||
# ===================================================== | ||
sonar.projectName=epigenomic_dataset | ||
sonar.projectKey=LucaCappelletti94_epigenomic_dataset | ||
sonar.projectVersion=1.0.0 | ||
sonar.organization=lucacappelletti94-github | ||
sonar.host.url=https://sonarcloud.io | ||
sonar.login=epigenomic_dataset | ||
|
||
sonar.links.homepage=https://github.com/LucaCappelletti94/epigenomic_dataset | ||
sonar.links.ci=https://travis-ci.org/LucaCappelletti94/epigenomic_dataset | ||
sonar.links.scm=https://github.com/LucaCappelletti94/epigenomic_dataset | ||
sonar.links.issue=https://github.com/LucaCappelletti94/epigenomic_dataset/issues | ||
|
||
sonar.language=py | ||
|
||
sonar.sources=./epigenomic_dataset | ||
sonar.tests=./tests | ||
|
||
sonar.exclusions=**/__pycache__/*,*/__pycache__/* | ||
|
||
sonar.python.coverage.reportPath=coverage.xml |
Empty file.
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,5 @@ | ||
from validate_version_code import validate_version_code | ||
from epigenomic_dataset.__version__ import __version__ | ||
|
||
def test_version(): | ||
assert validate_version_code(__version__) |