Skip to content

Commit

Permalink
Merge pull request #10 from univieCUBE/dev
Browse files Browse the repository at this point in the history
Merge dev into master
  • Loading branch information
VarIr authored Oct 18, 2019
2 parents 03ab284 + 7fc758d commit 12fd69f
Show file tree
Hide file tree
Showing 63 changed files with 3,940 additions and 506 deletions.
80 changes: 80 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# based on https://github.com/ogrisel/python-appveyor-demo/
# Thanks to Olivier Grisel for the template!

environment:
global:
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"

matrix:
- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.x" # currently 3.7.?
PYTHON_ARCH: "64"

install:
# If there is a newer build queued for the same PR, cancel this one.
# The AppVeyor 'rollout builds' option is supposed to serve the same
# purpose but it is problematic because it tends to cancel builds pushed
# directly to master instead of just PR builds (or the converse).
# credits: JuliaLang developers.
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
- ECHO "Filesystem root:"
- ps: "ls \"C:/\""

- ECHO "Installed SDKs:"
- ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""

# Install Python (from the official .msi of https://python.org) and pip when
# not already installed.
- ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }

# Prepend newly installed Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
# the parent CMD process).
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"

# Check that we have the expected version and architecture for Python
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""

# Upgrade to the latest version of pip to avoid it displaying warnings
# about it being out of date.
- "python -m pip install --upgrade pip"

# Install the build dependencies of the project. If some dependencies contain
# compiled extensions and are not provided as pre-built wheel packages,
# pip will build them from source using the MSVC compiler matching the
# target Python version and architecture
- "python -m pip install wheel pytest"
- "python -m pip install -r requirements.txt"

build_script:
# Build the compiled extension
- "python setup.py build"

test_script:
# Run the project tests
- "pytest"

after_test:
# If tests are successful, create binary packages for the project.
- "python setup.py bdist_wheel"
- "python setup.py bdist_wininst"
- "python setup.py bdist_msi"
- ps: "ls dist"

artifacts:
# Archive the generated packages in the ci.appveyor.com build report.
- path: dist\*

#on_success:
# - TODO: upload the content of dist/*.whl to a public wheelhouse
#

cache:
- '%LOCALAPPDATA%\pip\Cache -> appveyor.yml'
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 120
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
pica/dev_scripts/* linguist-documentation
pica/docs/* linguist-documentation
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ ENV/
.mypy_cache/
/.idea/
/.github/
/PICA2.iml
24 changes: 24 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: requirements-rtd.txt
system_packages: false
98 changes: 74 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,76 @@
# Config file for automatic testing at travis-ci.org
lanuage: python

language: python
python:
- 3.7

# Command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install: pip install -U tox-travis

# Command to run tests, e.g. python setup.py test
script: tox

# Assuming you have installed the travis-ci CLI tool, after you
# create the Github repo and add it to Travis, run the
# following command to finish PyPI deployment setup:
# $ travis encrypt --add deploy.password
deploy:
provider: pypi
distributions: sdist bdist_wheel
user: LokiLuciferase
password:
secure: PLEASE_REPLACE_ME
on:
tags: true
repo: LokiLuciferase/pica
python: 3.6
- '3.7'

matrix:
include:
- os: linux
dist: xenial
sudo: false
- os: osx
# osx_image: xcode10.2
sudo: true

env:
global:
- CACHE_DIR="$HOME/virtualenv"
- MINICONDA_DIR="$HOME/miniconda"
- PYTHONIOENCODING=UTF8

before_install:
- bash travis/install-conda.sh
- export PATH="$MINICONDA_DIR/bin:$PATH"
- hash -r
- bash travis/install-pip.sh

install:
- python setup.py build
- python setup.py install

before_script:
- flake8 --exit-zero .

script:
- pytest --cov=pica

after_success:
- codecov

cache:
- pip
- ccache
- packages
- directories:
- "$HOME/.cache/pip"
- "$HOME/virtualenv"
- "$HOME/miniconda"

branches:
only:
- master
- develop
- dev

# TODO enable tox usage as originial intended
#
## Command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
#install: pip install -U tox-travis
#
## Command to run tests, e.g. python setup.py test
#script: tox
#
## Assuming you have installed the travis-ci CLI tool, after you
## create the Github repo and add it to Travis, run the
## following command to finish PyPI deployment setup:
## $ travis encrypt --add deploy.password
#deploy:
# provider: pypi
# distributions: sdist bdist_wheel
# user: LokiLuciferase
# password:
# secure: PLEASE_REPLACE_ME
# on:
# tags: true
# repo: LokiLuciferase/pica
# python: 3.6
8 changes: 7 additions & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ Credits
Development Lead
----------------

* Lukas Lueftinger <[email protected]>
* Lukas Lüftinger <[email protected]>

Contributors
------------

* Patrick Hyden <[email protected]>
* Roman Feldbauer <[email protected]>
22 changes: 14 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
====
PICA
====

PICA2
=====


.. image:: https://img.shields.io/pypi/v/pica.svg
:target: https://pypi.python.org/pypi/pica

.. image:: https://img.shields.io/travis/LokiLuciferase/pica.svg
:target: https://travis-ci.org/LokiLuciferase/pica
.. image:: https://travis-ci.com/univieCUBE/PICA2.svg?branch=master
:target: https://travis-ci.com/univieCUBE/PICA2

.. image:: https://codecov.io/gh/univieCUBE/PICA2/branch/master/graph/badge.svg
:target: https://codecov.io/gh/univieCUBE/PICA2

.. image:: https://readthedocs.org/projects/pica/badge/?version=latest
:target: https://pica.readthedocs.io/en/latest/?badge=latest
.. image:: https://ci.appveyor.com/api/projects/status/iursmhw1wocfgpua?svg=true
:target: https://ci.appveyor.com/project/VarIr/pica2

.. image:: https://readthedocs.org/projects/pica2-test/badge/?version=latest
:target: https://pica2_test.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status


Microbial Phenotype Prediction, re-implemented with Python 3.7 and scikit-learn


* Supported platforms: Linux, MacOS, Windows
* Free software: MIT license

13 changes: 8 additions & 5 deletions docs/conf.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,18 @@
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'monokai'

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False


# -- Options for HTML output -------------------------------------------
# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = 'nature'


# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
Expand All @@ -95,8 +95,11 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# See: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_static_path

# If we don't use any static files, we shouldn't include this here
# html_static_path = ['_static']
html_static_path = []

# -- Options for HTMLHelp output ---------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Welcome to PICA's documentation!
================================
Welcome to the PICA2 documentation!
===================================

.. toctree::
:maxdepth: 2
Expand Down
14 changes: 7 additions & 7 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Installation
Stable release
--------------

To install PICA, run this command in your terminal:
To install PICA2, run this command in your terminal:

.. code-block:: console
$ pip install pica
This is the preferred method to install PICA, as it will always install the most recent stable release.
This is the preferred method to install PICA2, as it will always install the most recent stable release.

If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.
Expand All @@ -26,19 +26,19 @@ you through the process.
From sources
------------

The sources for PICA can be downloaded from the `Github repo`_.
The sources for PICA2 can be downloaded from the `Github repo`_.

You can either clone the public repository:

.. code-block:: console
$ git clone git://github.com/LokiLuciferase/pica
$ git clone git://github.com/univieCUBE/PICA2
Or download the `tarball`_:

.. code-block:: console
$ curl -OL https://github.com/LokiLuciferase/pica/tarball/master
$ curl -OL https://github.com/univieCUBE/PICA2/tarball/master
Once you have a copy of the source, you can install it with:

Expand All @@ -47,5 +47,5 @@ Once you have a copy of the source, you can install it with:
$ python setup.py install
.. _Github repo: https://github.com/LokiLuciferase/pica
.. _tarball: https://github.com/LokiLuciferase/pica/tarball/master
.. _Github repo: https://github.com/univieCUBE/PICA2
.. _tarball: https://github.com/univieCUBE/PICA2/tarball/master
7 changes: 7 additions & 0 deletions docs/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pica
====

.. toctree::
:maxdepth: 4

pica
22 changes: 22 additions & 0 deletions docs/pica.io.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pica.io package
===============

Submodules
----------

pica.io.io module
-----------------

.. automodule:: pica.io.io
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: pica.io
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 12fd69f

Please sign in to comment.