Skip to content

Commit

Permalink
Merge pull request #424 from choderalab/cookiecutter
Browse files Browse the repository at this point in the history
Update everything to match MolSSI cookiecutter
  • Loading branch information
jchodera authored May 24, 2019
2 parents e97cb81 + e206d1b commit 7d83a1a
Show file tree
Hide file tree
Showing 21 changed files with 2,428 additions and 249 deletions.
14 changes: 14 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Codecov configuration to make it a bit less noisy
coverage:
status:
patch: false
project:
default:
threshold: 50%
comment:
layout: "header"
require_changes: false
branches: null
behavior: default
flags: null
paths: null
42 changes: 42 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# How to contribute

We welcome contributions from external contributors, and this document
describes how to merge code changes into this openmmtools.

## Getting Started

* Make sure you have a [GitHub account](https://github.com/signup/free).
* [Fork](https://help.github.com/articles/fork-a-repo/) this repository on GitHub.
* On your local machine,
[clone](https://help.github.com/articles/cloning-a-repository/) your fork of
the repository.

## Making Changes

* Add some really awesome code to your local fork. It's usually a [good
idea](http://blog.jasonmeridth.com/posts/do-not-issue-pull-requests-from-your-master-branch/)
to make changes on a
[branch](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/)
with the branch name relating to the feature you are going to add.
* When you are ready for others to examine and comment on your new feature,
navigate to your fork of openmmtools on GitHub and open a [pull
request](https://help.github.com/articles/using-pull-requests/) (PR). Note that
after you launch a PR from one of your fork's branches, all
subsequent commits to that branch will be added to the open pull request
automatically. Each commit added to the PR will be validated for
mergability, compilation and test suite compliance; the results of these tests
will be visible on the PR page.
* If you're providing a new feature, you must add test cases and documentation.
* When the code is ready to go, make sure you run the test suite using pytest.
* When you're ready to be considered for merging, check the "Ready to go"
box on the PR page to let the openmmtools devs know that the changes are complete.
The code will not be merged until this box is checked, the continuous
integration returns checkmarks,
and multiple core developers give "Approved" reviews.

# Additional Resources

* [General GitHub documentation](https://help.github.com/)
* [PR best practices](http://codeinthehole.com/writing/pull-requests-and-other-good-practices-for-teams-using-github/)
* [A guide to contributing to software packages](http://www.contribution-guide.org)
* [Thinkful PR example](http://www.thinkful.com/learn/github-pull-request-tutorial/#Time-to-Submit-Your-First-PR)
15 changes: 11 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
- [ ] Implement feature / fix bug
- [ ] Add [tests](https://github.com/choderalab/openmmtools/tree/master/openmmtools/tests)
- [ ] Update [documentation](https://github.com/choderalab/openmmtools/tree/master/docs) as needed
- [ ] Update [changelog](https://github.com/choderalab/openmmtools/blob/master/docs/releasehistory.rst)
## Description
Provide a brief description of the PR's purpose here.

## Todos
- [ ] Implement feature / fix bug
- [ ] Add [tests](https://github.com/choderalab/openmmtools/tree/master/openmmtools/tests)
- [ ] Update [documentation](https://github.com/choderalab/openmmtools/tree/master/docs) as needed
- [ ] Update [changelog](https://github.com/choderalab/openmmtools/blob/master/docs/releasehistory.rst)Notable points that this PR has either accomplished or will accomplish.

## Status
- [ ] Ready to go
106 changes: 98 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,102 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

openmmtools/version.py
# C extensions
*.so

# Packages
*.egg-info
dist
build
__pycache__
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyCharm
.idea
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
.pytest_cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
12 changes: 12 additions & 0 deletions .lgtm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Configure LGTM for this package

extraction:
python: # Configure Python
python_setup: # Configure the setup
version: 3 # Specify Version 3
path_classifiers:
library:
- versioneer.py # Set Versioneer.py to an external "library" (3rd party code)
- devtools/*
generated:
- openmmtools/_version.py
87 changes: 48 additions & 39 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,55 @@
language: c
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
language: python

install:
- bash -x devtools/travis-ci/install.sh
- export PYTHONUNBUFFERED=true
- export PATH=$HOME/miniconda/bin:$PATH
# Run jobs on container-based infrastructure, can be overridden per job

matrix:
include:
# Extra includes for OSX since python language is not available by default on OSX
- os: osx
language: generic
env: PYTHON_VER=3.6
- os: osx
language: generic
env: PYTHON_VER=3.7

script:
# Create a test environment
- conda create --quiet --yes -n test python=$python
# Activate the test environment
- source activate test
# Add org channel
- conda config --add channels ${ORGNAME}
# Add omnia dev channels
- if [ $DEVOMNIA ]; then conda config --add channels omnia-dev; fi
# Add conda-forge channel back to top priority
- conda config --add channels conda-forge
# Build the recipe
- conda build devtools/conda-recipe
# Install the package
- conda install --yes --quiet --use-local ${PACKAGENAME}-dev
# Install testing dependencies. Without specifying the numpy version, numpy
# is downgraded to 1.9 and we get a "libgfortran not found" issue.
- conda install --yes --quiet nose nose-timer pymbar "numpy>=1.14"
# Test the package
- cd devtools && nosetests $PACKAGENAME --nocapture --verbosity=2 --with-timer --with-doctest -a '!slow' && cd ..

- os: linux
language: generic # No need to set Python version since its conda
env: PYTHON_VER=3.6
- os: linux
language: generic
env: PYTHON_VER=3.7

env:
matrix:
- python=3.6 CONDA_PY=36
- python=3.7 CONDA_PY=37
- python=3.7 CONDA_PY=37 DEVOMNIA=true # allowed to fail
global:
- ORGNAME="omnia" # the name of the organization
- PACKAGENAME="openmmtools" # the name of your package
- OPENMM_CPU_THREADS="1" # only use one CPU thread for determinism

matrix:
allow_failures:
- env: python=3.7 CONDA_PY=37 DEVOMNIA=true
before_install:
# Additional info about the build
- uname -a
- df -h
- ulimit -a

# Install the Python environment
- source devtools/travis-ci/before_install.sh
- python -V

install:

# Create test environment for package
- python devtools/scripts/create_conda_env.py -n=test -p=$PYTHON_VER devtools/conda-envs/test_env.yaml
# Activate the test environment
- conda activate test
# Build and install package
- python setup.py develop --no-deps


script:
#- pytest -v --cov=openmmtools openmmtools/tests/
- nosetests openmmtools/tests --nocapture --verbosity=2 --with-timer --with-doctest -a '!slow'

notifications:
email: false

after_success:
- codecov
77 changes: 77 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age,
body size, disability, ethnicity, gender identity and expression, level of
experience, nationality, personal appearance, race, religion, or sexual
identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

Moreover, project maintainers will strive to offer feedback and advice to
ensure quality and consistency of contributions to the code. Contributions
from outside the group of project maintainers are strongly welcomed but the
final decision as to whether commits are merged into the codebase rests with
the team of project maintainers.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an
appointed representative at an online or offline event. Representation of a
project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at '[email protected]'. The project team will
review and investigate all complaints, and will respond in a way that it deems
appropriate to the circumstances. The project team is obligated to maintain
confidentiality with regard to the reporter of an incident. Further details of
specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
[http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2015-2017 Chodera lab // Memorial Sloan Kettering Cancer Center
Copyright (c) 2015-2019 Chodera lab // Memorial Sloan Kettering Cancer Center

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include LICENSE
include MANIFEST.in
include versioneer.py

graft openmmtools
global-exclude *.py[cod] __pycache__ *.so
Loading

0 comments on commit 7d83a1a

Please sign in to comment.