Skip to content

Commit 7df098b

Browse files
committed
Initial commit
0 parents  commit 7df098b

34 files changed

+892
-0
lines changed

Diff for: .codecov.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# show coverage in CI status, not as a comment.
2+
comment: off
3+
coverage:
4+
status:
5+
project:
6+
default:
7+
target: auto
8+
patch:
9+
default:
10+
target: auto

Diff for: .coveragerc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[run]
2+
source =
3+
data_prototype
4+
[report]
5+
omit =
6+
*/python?.?/*
7+
*/site-packages/nose/*
8+
# ignore _version.py and versioneer.py
9+
.*version.*
10+
*_version.py
11+
12+
exclude_lines =
13+
if __name__ == '__main__':

Diff for: .flake8

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[flake8]
2+
exclude =
3+
.git,
4+
__pycache__,
5+
build,
6+
dist,
7+
versioneer.py,
8+
data_prototype/_version.py,
9+
docs/source/conf.py
10+
max-line-length = 115
11+
ignore = E203, W503 # Ignore some style 'errors' produced while formatting by 'black'

Diff for: .gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Diff for: .github/workflows/black.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Check Code Style - BLACK
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-python@v2
11+
- name: Install Dependencies
12+
run: |
13+
# These packages are installed in the base environment but may be older
14+
# versions. Explicitly upgrade them because they often create
15+
# installation problems if out of date.
16+
python -m pip install --upgrade pip setuptools numpy
17+
18+
pip install black
19+
- name: Run black
20+
run: |
21+
black . --check

Diff for: .github/workflows/docs.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Docs
2+
3+
on: [push, pull_request]
4+
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: "Set up Python 3.10"
12+
uses: actions/setup-python@v2
13+
with:
14+
python-version: "3.10"
15+
16+
- name: Install Python dependencies
17+
run: pip install -r requirements-doc.txt
18+
19+
- name: Install mpl-gui
20+
run: python -m pip install -v .
21+
- name: Build
22+
run: make -Cdocs html
23+
- name: Publish
24+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
25+
uses: peaceiris/actions-gh-pages@v3
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
publish_dir: ./docs/build/html
29+
force_orphan: true

Diff for: .github/workflows/flake8.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Check Code Style - FLAKE8
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-python@v2
11+
- name: Install Dependencies
12+
run: |
13+
# These packages are installed in the base environment but may be older
14+
# versions. Explicitly upgrade them because they often create
15+
# installation problems if out of date.
16+
python -m pip install --upgrade pip setuptools numpy
17+
18+
pip install flake8
19+
- name: Run flake8
20+
run: |
21+
flake8

Diff for: .github/workflows/testing.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Unit Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: ["3.9", "3.10"]
12+
fail-fast: false
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: |
22+
# These packages are installed in the base environment but may be older
23+
# versions. Explicitly upgrade them because they often create
24+
# installation problems if out of date.
25+
python -m pip install --upgrade pip setuptools numpy
26+
27+
pip install .
28+
pip install -r requirements-dev.txt
29+
pip list
30+
- name: Test with pytest
31+
run: |
32+
coverage run -m pytest -vv
33+
coverage report -m

Diff for: .gitignore

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
venv/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*,cover
47+
.hypothesis/
48+
49+
# Translations
50+
*.mo
51+
*.pot
52+
53+
# Django stuff:
54+
*.log
55+
56+
# Sphinx documentation
57+
docs/build/
58+
docs/source/generated/
59+
60+
# pytest
61+
.pytest_cache/
62+
63+
# PyBuilder
64+
target/
65+
66+
# Editor files
67+
#mac
68+
.DS_Store
69+
*~
70+
71+
#vim
72+
*.swp
73+
*.swo
74+
75+
#pycharm
76+
.idea/
77+
78+
#VSCode
79+
.vscode/
80+
81+
#Ipython Notebook
82+
.ipynb_checkpoints

Diff for: .pre-commit-config.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
default_language_version:
2+
python: python3
3+
repos:
4+
- repo: https://github.com/ambv/black
5+
rev: stable
6+
hooks:
7+
- id: black
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: v2.0.0
10+
hooks:
11+
- id: flake8
12+
- repo: https://github.com/kynan/nbstripout
13+
rev: 0.3.9
14+
hooks:
15+
- id: nbstripout

Diff for: AUTHORS.rst

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=======
2+
Credits
3+
=======
4+
5+
Maintainer
6+
----------
7+
8+
* Thomas A Caswell <[email protected]>
9+
10+
Contributors
11+
------------
12+
13+
None yet. Why not be the first? See: CONTRIBUTING.rst

Diff for: CONTRIBUTING.rst

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
============
2+
Contributing
3+
============
4+
5+
Contributions are welcome, and they are greatly appreciated! Every
6+
little bit helps, and credit will always be given.
7+
8+
You can contribute in many ways:
9+
10+
Types of Contributions
11+
----------------------
12+
13+
Report Bugs
14+
~~~~~~~~~~~
15+
16+
Report bugs at https://github.com/tacaswell/data_prototype/issues.
17+
18+
If you are reporting a bug, please include:
19+
20+
* Any details about your local setup that might be helpful in troubleshooting.
21+
* Detailed steps to reproduce the bug.
22+
23+
Fix Bugs
24+
~~~~~~~~
25+
26+
Look through the GitHub issues for bugs. Anything tagged with "bug"
27+
is open to whoever wants to implement it.
28+
29+
Implement Features
30+
~~~~~~~~~~~~~~~~~~
31+
32+
Look through the GitHub issues for features. Anything tagged with "feature"
33+
is open to whoever wants to implement it.
34+
35+
Write Documentation
36+
~~~~~~~~~~~~~~~~~~~
37+
38+
data_prototype could always use more documentation, whether
39+
as part of the official data_prototype docs, in docstrings,
40+
or even on the web in blog posts, articles, and such.
41+
42+
Submit Feedback
43+
~~~~~~~~~~~~~~~
44+
45+
The best way to send feedback is to file an issue at https://github.com/tacaswell/data_prototype/issues.
46+
47+
If you are proposing a feature:
48+
49+
* Explain in detail how it would work.
50+
* Keep the scope as narrow as possible, to make it easier to implement.
51+
* Remember that this is a volunteer-driven project, and that contributions
52+
are welcome :)
53+
54+
Get Started!
55+
------------
56+
57+
Ready to contribute? Here's how to set up `data_prototype` for local development.
58+
59+
1. Fork the `data_prototype` repo on GitHub.
60+
2. Clone your fork locally::
61+
62+
$ git clone [email protected]:your_name_here/data_prototype.git
63+
64+
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
65+
66+
$ mkvirtualenv data_prototype
67+
$ cd data_prototype/
68+
$ python setup.py develop
69+
70+
4. Create a branch for local development::
71+
72+
$ git checkout -b name-of-your-bugfix-or-feature
73+
74+
Now you can make your changes locally.
75+
76+
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::
77+
78+
$ flake8 data_prototype tests
79+
$ python setup.py test
80+
$ tox
81+
82+
To get flake8 and tox, just pip install them into your virtualenv.
83+
84+
6. Commit your changes and push your branch to GitHub::
85+
86+
$ git add .
87+
$ git commit -m "Your detailed description of your changes."
88+
$ git push origin name-of-your-bugfix-or-feature
89+
90+
7. Submit a pull request through the GitHub website.
91+
92+
Pull Request Guidelines
93+
-----------------------
94+
95+
Before you submit a pull request, check that it meets these guidelines:
96+
97+
1. The pull request should include tests.
98+
2. If the pull request adds functionality, the docs should be updated. Put
99+
your new functionality into a function with a docstring, and add the
100+
feature to the list in README.rst.
101+
3. The pull request should work for Python 2.7, 3.3, 3.4, 3.5 and for PyPy. Check
102+
https://travis-ci.org/tacaswell/data_prototype/pull_requests
103+
and make sure that the tests pass for all supported Python versions.
104+

Diff for: LICENSE

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2022, Thomas A Caswell
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its contributors
17+
may be used to endorse or promote products derived from this software
18+
without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)