Skip to content

Commit c592637

Browse files
author
Charles Larivier
committed
Merge branch 'release/0.1.0' into main
2 parents 37e5a59 + d5107c5 commit c592637

41 files changed

Lines changed: 3305 additions & 32 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Python package
4+
name: build
55

66
on:
77
push:
8-
branches: [ main ]
8+
branches:
9+
- main
910
pull_request:
10-
branches: [ main ]
11+
branches:
12+
- main
13+
- develop
1114

1215
jobs:
1316
build:
@@ -16,19 +19,41 @@ jobs:
1619
strategy:
1720
fail-fast: false
1821
matrix:
19-
python-version: ["3.8", "3.9", "3.10"]
22+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
23+
os: [ubuntu-latest, macos-latest, windows-latest]
24+
25+
services:
26+
metabase:
27+
image: metabase/metabase
28+
ports:
29+
- 3000:3000
2030

2131
steps:
2232
- uses: actions/checkout@v2
33+
2334
- name: Set up Python ${{ matrix.python-version }}
2435
uses: actions/setup-python@v2
2536
with:
2637
python-version: ${{ matrix.python-version }}
38+
2739
- name: Install dependencies
2840
run: |
2941
python -m pip install --upgrade pip
3042
python -m pip install pipenv
31-
pipenv install --deploy
43+
pipenv install --deploy --dev
44+
45+
- name: Wait for Metabase to be initialized
46+
run: sleep 60s
47+
shell: bash
48+
3249
- name: Test with pytest
3350
run: |
34-
pipenv run pytest
51+
pipenv run pytest --cov=./ --cov-report=xml
52+
53+
- name: Upload coverage to Codecov
54+
uses: codecov/codecov-action@v2
55+
with:
56+
token: ${{ secrets.CODECOV_TOKEN }}
57+
directory: ./
58+
env_vars: OS,PYTHON
59+
fail_ci_if_error: true

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,6 @@ dmypy.json
139139
# Cython debug symbols
140140
cython_debug/
141141

142-
.idea
142+
143+
.idea/
144+
/metabase/_version.py

.pre-commit-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.2.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
10+
- repo: https://github.com/psf/black
11+
rev: 21.11b0
12+
hooks:
13+
- id: black
14+
15+
- repo: https://github.com/PyCQA/isort
16+
rev: 5.10.1
17+
hooks:
18+
- id: isort

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Charles Lariviere
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dev:
2+
@pipenv install --dev --pre
3+
@pipenv run pre-commit install

Pipfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ verify_ssl = true
44
name = "pypi"
55

66
[packages]
7+
metabase-python = {editable = true, path = "."}
78

89
[dev-packages]
910
pre-commit = "*"
1011
pytest = "*"
1112
pytest-cov = "*"
1213
black = "*"
14+
build = "*"
15+
twine = "*"
1316

1417
[requires]
1518
python_version = "3.8"

0 commit comments

Comments
 (0)