Skip to content

Commit

Permalink
Merge branch 'release/0.1.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Larivier committed Nov 24, 2021
2 parents 37e5a59 + d5107c5 commit c592637
Show file tree
Hide file tree
Showing 41 changed files with 3,305 additions and 32 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/python-package.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package
name: build

on:
push:
branches: [ main ]
branches:
- main
pull_request:
branches: [ main ]
branches:
- main
- develop

jobs:
build:
Expand All @@ -16,19 +19,41 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]

services:
metabase:
image: metabase/metabase
ports:
- 3000:3000

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 pipenv
pipenv install --deploy
pipenv install --deploy --dev
- name: Wait for Metabase to be initialized
run: sleep 60s
shell: bash

- name: Test with pytest
run: |
pipenv run pytest
pipenv run pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./
env_vars: OS,PYTHON
fail_ci_if_error: true
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,6 @@ dmypy.json
# Cython debug symbols
cython_debug/

.idea

.idea/
/metabase/_version.py
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: 21.11b0
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Charles Lariviere

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.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dev:
@pipenv install --dev --pre
@pipenv run pre-commit install
3 changes: 3 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ verify_ssl = true
name = "pypi"

[packages]
metabase-python = {editable = true, path = "."}

[dev-packages]
pre-commit = "*"
pytest = "*"
pytest-cov = "*"
black = "*"
build = "*"
twine = "*"

[requires]
python_version = "3.8"
Expand Down
Loading

0 comments on commit c592637

Please sign in to comment.