-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
2,018 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
- src/versioneer.py # Set Versioneer.py to an external "library" (3rd party code) | ||
- devtools/* | ||
generated: | ||
- src/hsd/_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
language: python | ||
|
||
# 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 | ||
|
||
|
||
# Pip can use Travis build-in Python | ||
- os: linux | ||
python: 3.6 | ||
- os: linux | ||
dist: xenial # Travis Trusty image does not have Python 3.7, Xenial does | ||
python: 3.7 | ||
|
||
|
||
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: | ||
|
||
# Install the package locally | ||
- pip install -U pytest pytest-cov codecov | ||
- pip install -e src/ | ||
|
||
|
||
script: | ||
- pytest -v --cov=hsd test/ | ||
|
||
notifications: | ||
email: false | ||
|
||
after_success: | ||
- codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Temporarily change directory to $HOME to install software | ||
pushd . | ||
cd $HOME | ||
# Make sure some level of pip is installed | ||
python -m ensurepip | ||
|
||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then | ||
HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade pyenv | ||
# Pyenv requires minor revision, get the latest | ||
PYENV_VERSION=$(pyenv install --list |grep $PYTHON_VER | sed -n "s/^[ \t]*\(${PYTHON_VER}\.*[0-9]*\).*/\1/p" | tail -n 1) | ||
# Install version | ||
pyenv install $PYENV_VERSION | ||
# Use version for this | ||
pyenv global $PYENV_VERSION | ||
# Setup up path shims | ||
eval "$(pyenv init -)" | ||
fi | ||
pip install --upgrade pip setuptools | ||
|
||
# Restore original directory | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include LICENSE | ||
include MANIFEST.in | ||
include versioneer.py | ||
|
||
graft hsd | ||
global-exclude *.py[cod] __pycache__ *.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Helper file to handle all configs | ||
|
||
[coverage:run] | ||
# .coveragerc to control coverage.py and pytest-cov | ||
omit = | ||
# Omit the tests | ||
*/tests/* | ||
# Omit generated versioneer | ||
hsd/_version.py | ||
|
||
[yapf] | ||
# YAPF, in .style.yapf files this shows up as "[style]" header | ||
COLUMN_LIMIT = 119 | ||
INDENT_WIDTH = 4 | ||
USE_TABS = False | ||
|
||
[flake8] | ||
# Flake8, PyFlakes, etc | ||
max-line-length = 119 | ||
|
||
[versioneer] | ||
# Automatic version numbering scheme | ||
VCS = git | ||
style = pep440 | ||
versionfile_source = hsd/_version.py | ||
versionfile_build = hsd/_version.py | ||
tag_prefix = '' | ||
|
||
[aliases] | ||
test = pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
""" | ||
hsd | ||
Python routines to manipulate HSD data | ||
""" | ||
import sys | ||
from setuptools import setup, find_packages | ||
import versioneer | ||
|
||
short_description = __doc__.split("\n") | ||
|
||
# from https://github.com/pytest-dev/pytest-runner#conditional-requirement | ||
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv) | ||
pytest_runner = ['pytest-runner'] if needs_pytest else [] | ||
|
||
try: | ||
with open("README.rst", "r") as handle: | ||
long_description = handle.read() | ||
except: | ||
long_description = "\n".join(short_description[2:]) | ||
|
||
|
||
setup( | ||
# Self-descriptive entries which should always be present | ||
name='hsd', | ||
author='DFTB+ developers group', | ||
author_email='[email protected]', | ||
description=short_description[0], | ||
long_description=long_description, | ||
long_description_content_type="text/x-rst", | ||
version=versioneer.get_version(), | ||
cmdclass=versioneer.get_cmdclass(), | ||
license='BSD 2-clause license', | ||
|
||
# Which Python importable modules should be included when your package is installed | ||
# Handled automatically by setuptools. Use 'exclude' to prevent some specific | ||
# subpackage(s) from being added, if needed | ||
packages=find_packages(), | ||
|
||
# Optional include package data to ship with your package | ||
# Customize MANIFEST.in if the general case does not suit your needs | ||
# Comment out this line to prevent the files from being packaged with your software | ||
include_package_data=True, | ||
|
||
# Allows `setup.py test` to work correctly with pytest | ||
setup_requires=[] + pytest_runner, | ||
|
||
# Additional entries you may want simply uncomment the lines you want and fill in the data | ||
# url='http://www.my_package.com', # Website | ||
install_requires=['numpy'], # Required packages, pulls from pip if needed; do not use for Conda deployment | ||
# platforms=['Linux', | ||
# 'Mac OS-X', | ||
# 'Unix', | ||
# 'Windows'], # Valid platforms your code works on, adjust to your flavor | ||
# python_requires=">=3.5", # Python version restrictions | ||
|
||
# Manual control if final package is compressible or not, set False to prevent the .egg from being made | ||
# zip_safe=False, | ||
|
||
) |
Oops, something went wrong.