Skip to content

Commit

Permalink
Merge pull request #1 from hhsecond/master
Browse files Browse the repository at this point in the history
Structuring APIs
  • Loading branch information
boat-builder committed Feb 16, 2020
2 parents 391e143 + 4c3e15e commit 76174ec
Show file tree
Hide file tree
Showing 53 changed files with 2,452 additions and 536 deletions.
26 changes: 26 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[bumpversion]
current_version = 0.1.0
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}.{release}{build}
{major}.{minor}.{patch}

[bumpversion:part:release]
optional_value = rc
first_value = dev
values =
dev
rc

[bumpversion:part:build]

[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'

[bumpversion:file:stockroom/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

18 changes: 18 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[paths]
source = stockroom

[run]
branch = True
source =
stockroom
tests
parallel = True

[report]
exclude_lines =
pragma: no cover
def __repr__
def _repr_pretty_
def _ipython_key_completions_
show_missing = True
precision = 2
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
* stockroom version:
* Python version:
* Operating System:

### Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

### What I Did

```
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
```
22 changes: 13 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ __pycache__/

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
Expand All @@ -23,7 +24,6 @@ wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down Expand Up @@ -54,7 +54,6 @@ coverage.xml
# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
Expand All @@ -81,14 +80,13 @@ celerybeat-schedule
# SageMath parsed files
*.sage.py

# Environments
# dotenv
.env

# virtualenv
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
Expand All @@ -103,7 +101,13 @@ venv.bak/
# mypy
.mypy_cache/

# pycharm
.idea
# IDE settings
.vscode/
.idea/

.hangar
# leftover from examples
*/.hangar/
*/.ipynb_checkpoints/
examples/head.stock
examples/.gitignore
docs/*.ipynb
152 changes: 152 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
matrix:
include:
# ====================== Cover 3.7 ======================
- name: "Linux Python 3.7: Run tests"
os: linux
dist: xenial
language: python
python: '3.7'
cache: pip
env:
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
- SEGFAULT_SIGNALS=all
- TOXENV=py37,report
after_success:
- codecov

- name: "Win Python 3.7: Run tests"
os: windows
language: shell
env:
- PATH=/c/Python37:/c/Python37/Scripts:$PATH
- TOXENV=py37,report
before_install:
- choco install python --version 3.7.5
- python -m pip install --upgrade pip
after_success:
- codecov

- name: "OSX Python 3.7: Run tests"
os: osx
osx_image: xcode11.2
language: generic
env:
- TR_PYTHON_VERSION=3.7.5
- PYENV_VERSION=3.7.5
- TOXENV=py37,report
addons:
homebrew:
packages:
- openssl
- readline
- xz
after_success:
- codecov
cache:
- pip
- directories:
- $HOME/.cache/pip
- $HOME/.cache/pyenv

# ===================== Cover 3.6 =======================
- name: "Linux Python 3.6: Run tests"
os: linux
dist: xenial
language: python
python: '3.6'
cache: pip
env:
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
- SEGFAULT_SIGNALS=all
- TOXENV=py36,report
after_success:
- codecov

- name: "Win Python 3.6: Run tests"
os: windows
language: shell
env:
- PATH=/c/Python36:/c/Python36/Scripts:$PATH
- TOXENV=py36,report
before_install:
- choco install python --version 3.6.8
- python -m pip install --upgrade pip
after_success:
- codecov

- name: "OSX Python 3.6: Run tests"
os: osx
osx_image: xcode11.2
language: generic
env:
- TR_PYTHON_VERSION=3.6.8
- PYENV_VERSION=3.6.8
- TOXENV=py36,report
addons:
homebrew:
packages:
- openssl
- readline
- xz
after_success:
- codecov
cache:
- pip
- directories:
- $HOME/.cache/pip
- $HOME/.cache/pyenv

# ======================= Build Doc =====================
- name: "Build Docs"
os: linux
dist: xenial
language: python
python: '3.7'
cache: pip
env:
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
- SEGFAULT_SIGNALS=all
- TOXENV=docs
addons:
apt_packages:
- pandoc

before_install:
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
unset PYENV_ROOT
mkdir -p ~/.cache/pyenv/versions
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
which pyenv
ln -s ~/.cache/pyenv/versions ~/.pyenv/versions
export PATH="$HOME/.pyenv/bin:$PATH"
pyenv install --skip-existing $TR_PYTHON_VERSION
eval "$(pyenv init -)"
pyenv global $TR_PYTHON_VERSION
# A manual check that the correct version of Python is running.
python --version
python -m pip install -U pip setuptools wheel
fi
- python --version
- uname -a
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then lsb_release -a; fi

install:
- pip install tox
- pip install codecov
- virtualenv --version
- easy_install --version
- pip --version
- tox --version

script:
- tox -v

after_failure:
- more .tox/log/* | cat
- more .tox/*/log/* | cat

notifications:
email:
on_success: never
on_failure: never
4 changes: 4 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Authors
=======

* Sherin Thomas <sherin@tensorwerk.com>
106 changes: 106 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
.. highlight:: shell

============
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://github.com/tensorwerk/stockroom/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 GitHub issues for bugs. Anything tagged with "bug" and "help
wanted" is open to whoever wants to implement it.

Implement Features
~~~~~~~~~~~~~~~~~~

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

Write Documentation
~~~~~~~~~~~~~~~~~~~

stockroom could always use more documentation, whether as part of the
official stockroom 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://github.com/tensorwerk/stockroom/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 `stockroom` for local development.

1. Fork the `stockroom` repo on GitHub.
2. Clone your fork locally::

$ git clone git@github.com:your_name_here/stockroom.git

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

$ mkvirtualenv stockroom
$ cd stockroom/
$ python setup.py develop

4. Create a branch for local development::

$ git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.

5. When you're done making changes, check that your changes pass flake8 and the
tests, including testing other Python versions with tox::

$ flake8 stockroom tests
$ tox

To get flake8 and tox, just pip install them into your virtualenv.

6. Commit your changes and push your branch to GitHub::

$ git add .
$ git commit -m "Your detailed description of your changes."
$ git push origin name-of-your-bugfix-or-feature

7. Submit a pull request through the GitHub website.

Pull Request Guidelines
-----------------------

Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include tests.
2. 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.rst.
3. The pull request should work for Python 3.6, 3.7 and 3.8. Check
https://travis-ci.org/tensorwerk/stockroom/pull_requests
and make sure that the tests pass for all supported Python versions.
8 changes: 8 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
=======
History
=======

0.1.0 (2019-12-12)
------------------

* First release on PyPI.

0 comments on commit 76174ec

Please sign in to comment.