Skip to content

Commit

Permalink
Merge pull request #197 from bcgsc/develop
Browse files Browse the repository at this point in the history
v2.2.6 scope review
  • Loading branch information
calchoo authored Jun 3, 2019
2 parents 96b3e3f + a76ae08 commit 64bf0f8
Show file tree
Hide file tree
Showing 14 changed files with 339 additions and 209 deletions.
72 changes: 57 additions & 15 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,70 @@
If you are new to the project a good way to get started is by adding to the documentation, or adding unit tests where
there is a lack of code coverage.

### Installing for Development (new to python projects?)
## Install (for Development)

Clone the repository and switch to the development branch

git clone https://github.com/bcgsc/mavis.git
cd mavis
git checkout develop
```bash
git clone https://github.com/bcgsc/mavis.git
cd mavis
git checkout develop
```

Set up a python virtual environment. If you are developing in python setting up with a virtual environment can be
Set up a python virtual environment. If you are developing in python setting up with a virtual environment can be
incredibly helpful as it allows for a clean install to test. Instructions for setting up the environment
are below

pip install virtualenv
virtualenv venv
source venv/bin/activate
```bash
python3 -m venv venv
source venv/bin/activate
```

Install the MAVIS python package. Running the setup in develop mode will ensure that your code changes are run when you
Install the MAVIS python package. Running the setup in develop mode will ensure that your code changes are run when you
run MAVIS from within that virtual environment

python setup.py develop
```bash
pip install -e .[dev]
```

Run the unit tests and compute code coverage
Run the tests and compute code coverage

python setup.py nosetests
```bash
pytest tests
```

Make the user manual (optional)
## Build the Sphinx Documentation

cd docs
make html
```bash
pip install .[docs]
sphinx-build docs/source/ html
```

The contents of the user manual can then be viewed by opening the build/html/index.html in any available
web browser (i.e. google-chrome, firefox, etc.)


## Deploy to PyPi

Install deployment dependencies

```bash
pip install .[deploy]
```

Build the distribution files

```bash
python setup.py install sdist bdist_wheel
```

Use twine to upload

```bash
twine upload -r pypi dist/*
```


### Reporting a Bug

Please make sure to search through the issues before reporting a bug to ensure there isn't already an open issue.
Expand Down Expand Up @@ -66,3 +96,15 @@ if you want to be more explicit with nested types, the following conventions are

- all new code must have unit tests in the tests subdirectory
- in general for assertEqual statements, the expected value is given first

Tests can be run as follows

```bash
pytest tests
```

To run the tests with tox (multiple python installs tested). Note that you will need to have multiple python installs on your path

```bash
tox
```
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ src
analysis_scripts
.vscode
*.nfs*
*eggs/
*eggs/
html
.pytest*
.tox
26 changes: 26 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# .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/source/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:
- method: pip
path: .
extra_requirements:
- docs
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: python
dist: xenial
os:
- linux
before_install:
Expand All @@ -8,6 +9,7 @@ before_install:
wget http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/blat/blat; chmod a+x blat; export PATH=$PATH:$(pwd);
python:
- 3.6
- 3.7
install: pip install -U tox-travis
script: tox
notifications:
Expand Down
36 changes: 1 addition & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ a github issue to our [github page](https://github.com/bcgsc/mavis/issues) or co

## Install Instructions

There are 3 major steps to setting up and installing [MAVIS](http://mavis.bcgsc.ca).
There are 3 major steps to setting up and installing [MAVIS](http://mavis.bcgsc.ca). If you are a developer contributing to mavis, please see the [instructions for developers page](http://mavis.bcgsc.ca/docs/latest/development.html) instead

### 1. Install Aligner

Expand Down Expand Up @@ -121,40 +121,6 @@ Once the above 3 steps are complete [MAVIS](http://mavis.bcgsc.ca) is ready to b
See the MAVIS [tutorial](http://mavis.bcgsc.ca/docs/latest/pipeline.html#mavis-mini-tutorial) to learn about running MAVIS.


## Build the Sphinx Documentation

```bash
pip install .[docs]
sphinx-build docs/source/ html
```

## Deploy to PyPi

Install m2r to ensure the README is converted nicely

```bash
pip install m2r
```

Install to build the egg

```bash
python setup.py install
```

Build the other distribution files

```bash
python setup.py sdist
```

Use twine to upload

```bash
twine upload -r pypi dist/*
```


## Citation

If you use MAVIS as a part of your project please cite
Expand Down
1 change: 0 additions & 1 deletion doc_requirements.txt

This file was deleted.

83 changes: 0 additions & 83 deletions docs/preprocess.py

This file was deleted.

Loading

0 comments on commit 64bf0f8

Please sign in to comment.