Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Jul 21, 2020
0 parents commit 6c82b6e
Show file tree
Hide file tree
Showing 138 changed files with 2,936 additions and 0 deletions.
87 changes: 87 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
version: 2
common: &common
working_directory: ~/rio-tiler-pds
steps:
- checkout
- run:
name: install dependencies
command: pip install tox codecov pre-commit --user
- run:
name: run tox
command: ~/.local/bin/tox
- run:
name: run pre-commit
command: |
if [[ "$CIRCLE_JOB" == "python-3.7" ]]; then
~/.local/bin/pre-commit run --all-files
fi
- run:
name: upload coverage report
command: |
if [[ "$UPLOAD_COVERAGE" == 1 ]]; then
~/.local/bin/coverage xml
~/.local/bin/codecov
fi
when: always

jobs:
"python-3.6":
<<: *common
docker:
- image: circleci/python:3.6.5
environment:
- TOXENV=py36
- UPLOAD_COVERAGE=1

"python-3.7":
<<: *common
docker:
- image: circleci/python:3.7.2
environment:
- TOXENV=py37

deploy:
docker:
- image: circleci/python:3.7.2
environment:
- TOXENV=release
working_directory: ~/rio-tiler-pds
steps:
- checkout
- run:
command: pip install -e . --user
- run:
name: verify git tag vs. version
command: |
VERSION=$(python -c 'import rio_tiler_pds; print(rio_tiler_pds.version)')
if [ "$VERSION" = "$CIRCLE_TAG" ]; then exit 0; else exit 3; fi
- run:
name: install dependencies
command: pip install tox --user
- run:
name: init .pypirc
command: |
echo -e "[pypi]" >> ~/.pypirc
echo -e "username = $PYPI_USER" >> ~/.pypirc
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
- run:
name: run tox
command: ~/.local/bin/tox

workflows:
version: 2
build_and_deploy:
jobs:
- "python-3.6"
- "python-3.7":
filters: # required since `deploy` has tag filters AND requires `build`
tags:
only: /.*/
- deploy:
requires:
- "python-3.7"
filters:
tags:
only: /^[0-9]+.*/
branches:
ignore: /.*/
108 changes: 108 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# 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/

# 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/


.pytest_cache

.benchmarks/
tests/benchmarks/data/*
tests/fixtures/mask*
44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
repos:
-
repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
hooks:
- id: isort
language_version: python3.7
-
repo: 'https://github.com/psf/black'
rev: stable
hooks:
- id: black
args: ['--safe']
language_version: python3.7
-
repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v2.4.0
hooks:
- id: flake8
language_version: python3.7
args: [
# E501 let black handle all line length decisions
# W503 black conflicts with "line break before operator" rule
# E203 black conflicts with "whitespace before ':'" rule
'--ignore=E501,W503,E203']
-
repo: 'https://github.com/chewse/pre-commit-mirrors-pydocstyle'
# 2.1.1
rev: 22d3ccf6cf91ffce3b16caa946c155778f0cb20f
hooks:
- id: pydocstyle
language_version: python3.7
args: [
# Check for docstring presence only
'--select=D1',
# Don't require docstrings for tests
'--match=(?!test).*\.py']

-
repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.770'
hooks:
- id: mypy
args: [--no-strict-optional, --ignore-missing-imports]
7 changes: 7 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Authors
-------

* Vincent Sarago <[email protected]>
* Sean Gillies <[email protected]>

See also https://github.com/cogeotiff/rio-tiler-pds/graphs/contributors.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
0.0.1(TBD)
------------------

- Initial release.
29 changes: 29 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2017, Mapbox
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 6c82b6e

Please sign in to comment.