Skip to content

Commit

Permalink
Update to the new cookiecutteR
Browse files Browse the repository at this point in the history
  • Loading branch information
ostrokach committed Jan 2, 2018
1 parent f29c98b commit 05baad5
Show file tree
Hide file tree
Showing 29 changed files with 949 additions and 195 deletions.
79 changes: 39 additions & 40 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ stages:
# === Variables ===

variables:
PACKAGE_VERSION: "0.1.0"
DOCS_SECRET_KEY: "QQRcgz67PxJNFopTWGygv1Y9iqKle0Mb2rxFh22a9cc/"
# Notebook environment variables
PYTHON_VERSION: "3.6"
SPARK_MASTER: "spark://192.168.6.210:7077"
SPARK_ARGS:
Expand All @@ -20,50 +23,46 @@ variables:
DB_PORT: "8331"


# === Conda ===

.conda_configure: &conda_configure
before_script:
# Conda configure
- conda config --append channels bioconda
- conda config --append channels ostrokach-forge
- conda config --append channels kimlab
- conda config --append channels ostrokach


# === Pages ===

.docs: &docs
pages:
stage: test
before_script:
# Create conda environment
# (nice to use an environment in case we use `gitlab-runner exec shell`)
- conda remove -n pages --all -yq || true
- conda create -n pages -yq || true
- conda install -n pages -yq
git python pip ipython jupyter ipykernel pypandoc
- source activate pages
# Install pip packages
- pip install -q
git+https://github.com/arximboldi/sinusoidal-sphinx-theme.git
sphinx sphinx_rtd_theme guzzle_sphinx_theme recommonmark
script:
- conda install -yq jupyter nbconvert jupyter_contrib_nbextensions IPython ipykernel pandoc
- pip install -q sphinx sphinx_rtd_theme guzzle_sphinx_theme recommonmark nbsphinx
- mkdir -p docs/notebooks docs/_static/notebooks
- if [[ -e README.md ]] ; then
sed 's|\.ipynb)|\.ipynb\.html)|g' README.md > docs/README.md ;
else echo "# README" > docs/README.md ;
fi
- (cd docs && ./convert_notebooks.sh)
# Generate notebooks.csv
- ./scripts/create_notebook_table.py -i notebooks/ -o docs/notebooks.csv
# Build pages
- sphinx-build docs public/$DOCS_SECRET_KEY
after_script:
- if [[ -d /repo ]] ; then
sudo cp -rf public/* /repo/public ;
sudo chmod ugo+rwX -R /repo/public/* ;
fi
# Convert notebooks
- mkdir -p public/$DOCS_SECRET_KEY/notebooks
- ./scripts/convert_notebooks.sh notebooks/ public/$DOCS_SECRET_KEY/notebooks/

test-pages:
<<: [*conda_configure, *docs]
except:
- master
- tags

pages:
<<: [*conda_configure, *docs]
only:
- master
- tags
except:
- triggers
artifacts:
paths:
- public
# === Deploy ===

.exec-notebook: &exec-notebook
script:
- jupyter nbconvert "notebooks/{NOTEBOOK_NAME}.ipynb"
--to=html_ch
--output=$NOTEBOOK_NAME.html
--output-dir=logs/
--template=docs/output_toggle.tpl
--execute

deploy:
stage: deploy
variables:
NOTEBOOK_NAME: deploy
<<: *exec-notebook
when: manual
9 changes: 9 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Credits

## Development Lead

- Alexey Strokach

## Contributors

None yet. Why not be the first?
105 changes: 105 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Contributing

Contributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.

You can contribute in many ways:

## Types of Contributions

### Report Bugs

Report bugs at https://gitlab.com/biological-data-warehouse/adjacency-net/issues.

If you are reporting a bug, please include:

* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.

### Fix Bugs

Look through the GitLab issues for bugs. Anything tagged with "bug"
and "help wanted" is open to whoever wants to implement it.

### Implement Features

Look through the GitLab issues for features. Anything tagged with "enhancement"
and "help wanted" is open to whoever wants to implement it.

### Write Documentation

Adjacency Net could always use more documentation, whether as part of the
official Adjacency Net docs, in docstrings, or even on the web in blog posts,
articles, and such.

### Submit Feedback

The best way to send feedback is to file an issue at https://gitlab.com/biological-data-warehouse/adjacency-net/issues.

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that contributions
are welcome :)

## Get Started!

Ready to contribute? Here's how to set up `adjacency-net` for local development.

1. Fork the `adjacency-net` repo on GitLab.
1. Clone your fork locally:

```bash
git clone [email protected]:your_name_here/adjacency-net.git
```

1. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:

```bash
mkvirtualenv adjacency-net
cd adjacency-net/
python setup.py develop
```

1. Create a branch for local development:

```bash
git checkout -b name-of-your-bugfix-or-feature
```

Now you can make your changes locally.

1. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions:
```bash
flake8 adjacency-net tests
python setup.py test or py.test
```
To get flake8, just pip install them into your virtualenv.
1. Commit your changes and push your branch to GitLab:
```bash
git add .
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature
```
1. Submit a pull request through the GitLab website.
## Pull Request Guidelines
Before you submit a pull request, check that it meets these guidelines:
1. The pull request should include tests.
1. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.md.
1. The pull request should work for all supported Python versions, as listed
in the [setup.py](setup.py) file.
## Tips
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# History

## 0.1.0 (2018-01-02)

* First release.
11 changes: 11 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

MIT License

Copyright (c) 2018, Alexey Strokach

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Adjacency Net

[![docs](https://img.shields.io/badge/docs-v0.1.0-blue.svg)](https://biological-data-warehouse.gitlab.io/adjacency-net/QQRcgz67PxJNFopTWGygv1Y9iqKle0Mb2rxFh22a9cc/)
[![build status](https://gitlab.com/biological-data-warehouse/adjacency-net/badges/master/build.svg)](https://gitlab.com/biological-data-warehouse/adjacency-net/commits/master/)

Neural network trained on protein sequences and adjacency matrices.

## Features

* TODO
Empty file added artifacts.yml
Empty file.
3 changes: 3 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/adjacency-net.rst
/adjacency-net.*.rst
/modules.rst
Loading

0 comments on commit 05baad5

Please sign in to comment.