Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelCoulter authored Mar 7, 2023
0 parents commit f4071a6
Show file tree
Hide file tree
Showing 11 changed files with 199 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
linguist-language=python
notebooks/* linguist-vendored
93 changes: 93 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Matlab files
*.mat

# History files
.Rhistory
.Rapp.history

# Session Data files
.RData

# Example code in package build process
*-Ex.R

# Output files from R CMD build
/*.tar.gz

# Output files from R CMD check
/*.Rcheck/

# RStudio files
.Rproj.user/

# produced vignettes
vignettes/*.html
vignettes/*.pdf

# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
.httr-oauth

# knitr and R markdown default cache directories
/*_cache/
/cache/

# Temporary files created by R markdown
*.utf8.md
*.knit.md
.Rproj.user

*.dat

# Jupyter Notebook
.ipynb_checkpoints

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

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

# 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
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.DS_Store
*.png
*.mp4
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: python
python:
- "3.6"
notifications:
email: false
install:
- sudo apt-get update
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda env create -f environment.yml
- source activate package_template
- python setup.py develop
script: pytest --cov=package_template tests/
after_success:
- coveralls
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Package Name
Add package description

### Installation
```bash
pip install package_name
```
Or
```bash
conda install -c edeno package_name
```
Or
```bash
git clone <package.git>
pip install .
```

### Usage

### Developer Installation
1. Install miniconda (or anaconda) if it isn't already installed.
2. git clone <package.git>
2. Setup editiable package with dependencies
```bash
cd <package folder>
conda env create -f environment.yml
conda activate package_name
pip install --editable . --no-deps
```
27 changes: 27 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: package_template
channels:
- defaults
- conda-forge
dependencies:
- "python>=3.6"
- numpy
- numba
- scipy
- scikit-learn
- matplotlib
- xarray
- pandas
- dask
- tqdm
- statsmodels
- patsy
- jupyter
- jupyterlab
- nb_conda
- setuptools
- pytest
- pytest-cov
- coveralls
- autopep8
- black
- isort
1 change: 1 addition & 0 deletions notebooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Notebooks go here
3 changes: 3 additions & 0 deletions postBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

python setup.py install
1 change: 1 addition & 0 deletions repository_name/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# flake8: noqa
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[aliases]
test=pytest
20 changes: 20 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env python3

from setuptools import find_packages, setup

INSTALL_REQUIRES = ['numpy', 'numba', 'scipy', 'scikit-learn', 'matplotlib',
'xarray', 'pandas', 'dask', 'tqdm', 'statsmodels', 'patsy']
TESTS_REQUIRE = ['pytest >= 2.7.1']

setup(
name='package_template',
version='0.1.0.dev0',
license='MIT',
description=(''),
author='',
author_email='',
url='',
packages=find_packages(),
install_requires=INSTALL_REQUIRES,
tests_require=TESTS_REQUIRE,
)
1 change: 1 addition & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Tests go here.

0 comments on commit f4071a6

Please sign in to comment.