Skip to content

Commit

Permalink
facelift
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaser Martinez Palenzuela committed Apr 10, 2021
0 parents commit 779b121
Show file tree
Hide file tree
Showing 39 changed files with 96,430 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

[*.yml]
indent_size = 2

[Makefile]
indent_style = tab
50 changes: 50 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build

on: [push, pull_request]

jobs:

test:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: [3.7, 3.8]

steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pipenv
pipenv install --python ${{ matrix.python_version }} --dev
- name: Test with pytest
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
pipenv run pytest --cov=masstable/
pipenv run codecov
release:
runs-on: ubuntu-latest
needs: test
if: startsWith(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pipenv
pipenv install --dev
- name: Release on PyPI
env:
FLIT_USERNAME: ${{ secrets.FLIT_USERNAME }}
FLIT_PASSWORD: ${{ secrets.FLIT_PASSWORD }}
run: |
pipenv run flit publish
30 changes: 30 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Update documentation

on:
push:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pipenv
pipenv install --dev
- name: Build
run: pipenv run mkdocs build
- name: Deploy
uses: peaceiris/[email protected]
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./site
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2021, Yaser Martinez Palenzuela

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
PIPENV_RUN := pipenv run

isort-src:
$(PIPENV_RUN) isort -rc ./masstable

isort-docs:
$(PIPENV_RUN) isort -rc ./docs/src -o masstable

format: isort-src isort-docs
$(PIPENV_RUN) black .

test:
$(PIPENV_RUN) pytest --cov=masstable/

docs-serve:
$(PIPENV_RUN) mkdocs serve

docs-publish:
$(PIPENV_RUN) mkdocs gh-deploy

bumpversion-major:
$(PIPENV_RUN) bumpversion major

bumpversion-minor:
$(PIPENV_RUN) bumpversion minor

bumpversion-patch:
$(PIPENV_RUN) bumpversion patch
31 changes: 31 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
flake8 = "*"
pytest = "*"
isort = "*"
flake8-docstrings = "*"
mkdocs = "*"
mkdocs-material = "*"
black = "*"
mypy = "*"
codecov = "*"
pytest-cov = "*"
pytest-mock = "*"
flit = "*"
markdown-include = "*"
pygments = "*"
pymdown-extensions = "*"
bumpversion = "*"

[packages]
scipy = "*"

[requires]
python_version = "3.7"

[pipenv]
allow_prereleases = true
Loading

0 comments on commit 779b121

Please sign in to comment.