-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
c3a3aa3
commit 5930a53
Showing
40 changed files
with
646 additions
and
0 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,9 @@ | ||
[bumpversion] | ||
current_version = 0.1.0 | ||
commit = True | ||
tag = True | ||
tag_name = {new_version} | ||
|
||
[bumpversion:file:rio_fake/__init__.py] | ||
search = __version__ = "{current_version}" | ||
replace = __version__ = "{new_version}" |
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,5 @@ | ||
[flake8] | ||
ignore = E501,W503,E203 | ||
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist | ||
max-complexity = 14 | ||
max-line-length = 90 |
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,8 @@ | ||
comment: off | ||
|
||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: auto | ||
threshold: 5 |
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,82 @@ | ||
name: CI | ||
|
||
# On every pull request, but only on push to master | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8, 3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install codecov pre-commit | ||
- name: Install rio-faux | ||
run: python -m pip install .["test"] | ||
|
||
- name: Run test | ||
run: python -m pytest --cov rio_faux --cov-report xml --cov-report term-missing | ||
|
||
# Run pre-commit | ||
- name: run pre-commit | ||
run: pre-commit run --all-files | ||
|
||
- name: Upload Results | ||
if: success() | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./coverage.xml | ||
flags: unittests | ||
name: ${{ matrix.python-version }} | ||
fail_ci_if_error: false | ||
|
||
publish: | ||
needs: [tests] | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flit | ||
python -m pip install . | ||
- name: Set tag version | ||
id: tag | ||
# https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions | ||
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | ||
|
||
- name: Set module version | ||
id: module | ||
# https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions | ||
run: echo ::set-output name=version::$(python -c 'from importlib.metadata import version; print(version("rio_faux"))') | ||
|
||
- name: Build and publish | ||
if: steps.tag.outputs.tag == steps.module.outputs.version | ||
env: | ||
FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: flit publish |
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,33 @@ | ||
name: Publish docs via GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
# Only rebuild website when docs have changed | ||
- 'README.md' | ||
- 'CHANGES.md' | ||
- 'CONTRIBUTING.md' | ||
- 'docs/**' | ||
|
||
jobs: | ||
build: | ||
name: Deploy docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout master | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -e .["docs"] | ||
- name: Deploy docs | ||
run: mkdocs gh-deploy -f docs/mkdocs.yml --force |
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,103 @@ | ||
# 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 |
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,32 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
language_version: python | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.4.2 | ||
hooks: | ||
- id: isort | ||
language_version: python | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 3.8.3 | ||
hooks: | ||
- id: flake8 | ||
language_version: python | ||
|
||
- repo: https://github.com/PyCQA/pydocstyle | ||
rev: 6.1.1 | ||
hooks: | ||
- id: pydocstyle | ||
language_version: python | ||
additional_dependencies: | ||
- toml | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.812 | ||
hooks: | ||
- id: mypy | ||
language_version: python |
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,5 @@ | ||
# Release Notes | ||
|
||
## 0.1.0 | ||
|
||
* Initial release. |
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,45 @@ | ||
# Contributing | ||
|
||
Issues and pull requests are more than welcome. | ||
|
||
**dev install** | ||
|
||
```bash | ||
$ git clone https://github.com/cogeotiff/rio-faux.git | ||
$ cd rio-faux | ||
$ pip install -e .["test","dev"] | ||
``` | ||
You can then run the tests with the following command: | ||
|
||
```sh | ||
python -m pytest --cov rio_faux --cov-report term-missing | ||
``` | ||
|
||
## pre-commit | ||
|
||
This repo is set to use `pre-commit` to run *isort*, *flake8*, *pydocstring*, *black* ("uncompromising Python code formatter") and mypy when committing new code. | ||
|
||
```bash | ||
$ pre-commit install | ||
``` | ||
|
||
## Docs | ||
|
||
```bash | ||
$ git clone https://github.com/cogeotiff/rio-faux.git | ||
$ cd rio-faux | ||
$ pip install -e .["docs"] | ||
``` | ||
|
||
Hot-reloading docs: | ||
|
||
```bash | ||
$ mkdocs serve | ||
``` | ||
|
||
To manually deploy docs (note you should never need to do this because Github | ||
Actions deploys automatically for new commits.): | ||
|
||
```bash | ||
$ mkdocs gh-deploy | ||
``` |
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,58 @@ | ||
# rio-faux | ||
|
||
<p align="center"> | ||
<em>Create empty image from a model.</em> | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="https://github.com/cogeotiff/rio-faux/actions?query=workflow%3ACI" target="_blank"> | ||
<img src="https://github.com/cogeotiff/rio-faux/workflows/CI/badge.svg" alt="Test"> | ||
</a> | ||
<a href="https://codecov.io/gh/cogeotiff/rio-faux" target="_blank"> | ||
<img src="https://codecov.io/gh/cogeotiff/rio-faux/branch/master/graph/badge.svg" alt="Coverage"> | ||
</a> | ||
<a href="https://pypi.org/project/rio-faux" target="_blank"> | ||
<img src="https://img.shields.io/pypi/v/rio-faux?color=%2334D058&label=pypi%20package" alt="Package version"> | ||
</a> | ||
<a href="https://pypistats.org/packages/rio-faux" target="_blank"> | ||
<img src="https://img.shields.io/pypi/dm/rio-faux.svg" alt="Downloads"> | ||
</a> | ||
<a href="https://github.com/cogeotiff/rio-faux/blob/master/LICENSE" target="_blank"> | ||
<img src="https://img.shields.io/github/license/cogeotiff/rio-faux.svg" alt="Downloads"> | ||
</a> | ||
</p> | ||
|
||
--- | ||
|
||
**Documentation**: <a href="https://cogeotiff.github.io/rio-faux/" target="_blank">https://cogeotiff.github.io/rio-faux/</a> | ||
|
||
**Source Code**: <a href="https://github.com/cogeotiff/rio-faux" target="_blank">https://github.com/cogeotiff/rio-faux</a> | ||
|
||
--- | ||
|
||
## Install | ||
|
||
```bash | ||
$ pip install -U pip | ||
$ pip install rio-faux | ||
``` | ||
|
||
Or install from source: | ||
|
||
```bash | ||
$ pip install -U pip | ||
$ pip install git+https://github.com/cogeotiff/rio-faux.git | ||
``` | ||
|
||
## Contribution & Development | ||
|
||
See [CONTRIBUTING.md](https://github.com/cogeotiff/rio-faux/blob/master/CONTRIBUTING.md) | ||
|
||
## Changes | ||
|
||
See [CHANGES.md](https://github.com/cogeotiff/rio-faux/blob/master/CHANGES.md). | ||
|
||
## License | ||
|
||
See [LICENSE](https://github.com/cogeotiff/rio-faux/blob/master/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 @@ | ||
../../CONTRIBUTING.md |
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,5 @@ | ||
:root { | ||
--md-primary-fg-color: #231b4e;; | ||
--md-primary-fg-color--light: #8782a3; | ||
--md-primary-fg-color--dark: #3b3750; | ||
} |
Oops, something went wrong.