Skip to content

Commit

Permalink
Merge pull request #11 from ptynecki/feature/v0.0.8
Browse files Browse the repository at this point in the history
Migration to Python 3.8 with initial Sphinx docs
  • Loading branch information
ptynecki authored Oct 11, 2020
2 parents 87c528d + 0bb6a62 commit 731c890
Show file tree
Hide file tree
Showing 27 changed files with 434 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,4 @@ bert_model/
bsp_model/
word2vec_model/
.pypirc
docs/_build
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
language: python
python:
- "3.6"
- "3.7"
- "3.8"

before_install:
- python --version
- pip install -U pytest
- pip install codecov
- pip install -U "bio-embeddings[all] @ git+https://github.com/sacdallago/bio_embeddings.git"
- pip install git+https://github.com/facebookresearch/esm.git
install:
- pip install -r requirements.txt

env:
- CODECOV_TOKEN=4f9eafa3-0ca3-48e4-9841-8fb25ff5d7c6

script:
- pytest --verbose --color=yes phages2050
- pytest --verbose --color=yes phages2050/features
after_success:
- codecov
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file.


## [0.0.8] - 11.10.2020
### Added
* Initial online documentation;

### Changed
* Migrated the codebase to Python 3.8+;


## [0.0.7] - 18.09.2020
### Added
* new extention for `embedding` module with ESM transformer-based protein embedding model;
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

> "Keep calm, use AI for phages and stop AMR"
PHAGES2050 is a novel [Python 3.6+ programming language](https://python.org) framework to boost bacteriophage research & therapy and infrastructure in order to achieve the full potential to fight against antimicrobial resistant bacteria within **Natural Language Processing (NLP)** and **Deep Learning**.
PHAGES2050 is a novel [Python 3.8+ programming language](https://python.org) framework to boost bacteriophage research & therapy and infrastructure in order to achieve the full potential to fight against antimicrobial resistant bacteria within **Natural Language Processing (NLP)** and **Deep Learning**.

Our project is about developing a AI-based framework for microbiologists and bioinformaticians who hunt, explore and classify phages. Applying the framework will shorten the duration of computational methods required to match phages with bacteria for specific patient cases. Having such organised framework at hand and freely-available will help develop personalized phage therapy and make it accessible to people worldwide.

Expand Down Expand Up @@ -73,7 +73,7 @@ _PHAGES2050_ can be installed by running:
pip install phages2050
```

It requires Python 3.6.0+ to run. You can also use Conda:
It requires Python 3.8.0+ to run. You can also use Conda:

```
conda install -c conda-forge phages2050
Expand All @@ -98,7 +98,7 @@ pip install git+https://github.com/facebookresearch/esm.git

## Community and Contributions

Happy to see you willing to make the PHAGES2050 better. Development on the latest stable version of Python 3+ is preferred. As of this writing it's 3.6. You can use any operating system.
Happy to see you willing to make the PHAGES2050 better. Development on the latest stable version of Python 3+ is preferred. As of this writing it's 3.8. You can use any operating system.

If you're fixing a bug or adding a new feature, add a test with *[pytest](https://github.com/pytest-dev/pytest)* and check the code with *[Black](https://github.com/psf/black/)* and *[mypy](https://github.com/python/mypy)*. Before adding any large feature, first open an issue for us to discuss the idea with the core devs and community.

Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file added docs/_static/images/phages2050-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))


# -- Project information -----------------------------------------------------

project = 'PHAGES2050'
copyright = '2020, Piotr Tynecki, Iwona Świętochowska, Yana Minina, Przemysław Mitura, Wojciech Łaguna'
author = 'Piotr Tynecki, Iwona Świętochowska, Yana Minina, Przemysław Mitura, Wojciech Łaguna'

# The full version, including alpha/beta/rc tags
release = version = '0.0.8'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


# -- 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 = 'sphinx_rtd_theme'

# 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']

html_logo = '_static/images/phages2050-logo.png'

master_doc = 'index'
17 changes: 17 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Welcome to PHAGES2050's documentation!
======================================

PHAGES2050 is a novel Python 3.8+ programming language framework to boost bacteriophage research & therapy.

.. toctree::
:maxdepth: 2
:caption: Contents:

modules

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
8 changes: 8 additions & 0 deletions docs/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PHAGES2050
==========

.. toctree::
:maxdepth: 4

phages2050
setup
21 changes: 21 additions & 0 deletions docs/phages2050.classifiers.proteins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
phages2050.classifiers.proteins package
=======================================

Submodules
----------

phages2050.classifiers.proteins.structural\_protein module
----------------------------------------------------------

.. automodule:: phages2050.classifiers.proteins.structural_protein
:members:
:undoc-members:
:show-inheritance:

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

.. automodule:: phages2050.classifiers.proteins
:members:
:undoc-members:
:show-inheritance:
18 changes: 18 additions & 0 deletions docs/phages2050.classifiers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
phages2050.classifiers package
==============================

Subpackages
-----------

.. toctree::
:maxdepth: 4

phages2050.classifiers.proteins

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

.. automodule:: phages2050.classifiers
:members:
:undoc-members:
:show-inheritance:
21 changes: 21 additions & 0 deletions docs/phages2050.crawlers.millardlab.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
phages2050.crawlers.millardlab package
======================================

Submodules
----------

phages2050.crawlers.millardlab.crawler module
---------------------------------------------

.. automodule:: phages2050.crawlers.millardlab.crawler
:members:
:undoc-members:
:show-inheritance:

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

.. automodule:: phages2050.crawlers.millardlab
:members:
:undoc-members:
:show-inheritance:
10 changes: 10 additions & 0 deletions docs/phages2050.crawlers.ncbi.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
phages2050.crawlers.ncbi package
================================

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

.. automodule:: phages2050.crawlers.ncbi
:members:
:undoc-members:
:show-inheritance:
19 changes: 19 additions & 0 deletions docs/phages2050.crawlers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
phages2050.crawlers package
===========================

Subpackages
-----------

.. toctree::
:maxdepth: 4

phages2050.crawlers.millardlab
phages2050.crawlers.ncbi

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

.. automodule:: phages2050.crawlers
:members:
:undoc-members:
:show-inheritance:
21 changes: 21 additions & 0 deletions docs/phages2050.embeddings.nucleotides.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
phages2050.embeddings.nucleotides package
=========================================

Submodules
----------

phages2050.embeddings.nucleotides.word2vec module
-------------------------------------------------

.. automodule:: phages2050.embeddings.nucleotides.word2vec
:members:
:undoc-members:
:show-inheritance:

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

.. automodule:: phages2050.embeddings.nucleotides
:members:
:undoc-members:
:show-inheritance:
29 changes: 29 additions & 0 deletions docs/phages2050.embeddings.proteins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
phages2050.embeddings.proteins package
======================================

Submodules
----------

phages2050.embeddings.proteins.bert module
------------------------------------------

.. automodule:: phages2050.embeddings.proteins.bert
:members:
:undoc-members:
:show-inheritance:

phages2050.embeddings.proteins.esm module
-----------------------------------------

.. automodule:: phages2050.embeddings.proteins.esm
:members:
:undoc-members:
:show-inheritance:

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

.. automodule:: phages2050.embeddings.proteins
:members:
:undoc-members:
:show-inheritance:
19 changes: 19 additions & 0 deletions docs/phages2050.embeddings.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
phages2050.embeddings package
=============================

Subpackages
-----------

.. toctree::
:maxdepth: 4

phages2050.embeddings.nucleotides
phages2050.embeddings.proteins

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

.. automodule:: phages2050.embeddings
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 731c890

Please sign in to comment.