-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from uriyyo/develop
🎉 Release 0.2.0
- Loading branch information
Showing
50 changed files
with
1,559 additions
and
988 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
name: Lint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
|
||
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: | | ||
pip install poetry | ||
poetry install | ||
- name: Lint | ||
run: poetry run pre-commit run --all-files --show-diff-on-failure |
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: Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.7, 3.8] | ||
|
||
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: | | ||
pip install poetry | ||
poetry install | ||
- name: Unit tests | ||
run: poetry run pytest tests --cov=instapi --cov-report=term-missing --cov-report=xml | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
fail_ci_if_error: true | ||
file: ./coverage.xml |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,40 +1,29 @@ | ||
default_stages: [push] | ||
|
||
repos: | ||
- repo: local | ||
- repo: https://github.com/asottile/seed-isort-config | ||
rev: v2.2.0 | ||
hooks: | ||
- id: pytest | ||
name: Check pytest unit tests pass | ||
entry: pytest tests | ||
language: system | ||
types: [python] | ||
always_run: true | ||
pass_filenames: false | ||
stages: [push, commit] | ||
- id: seed-isort-config | ||
|
||
- id: mypy | ||
name: Check mypy static types match | ||
entry: mypy instapi | ||
language: system | ||
types: [python] | ||
always_run: true | ||
pass_filenames: false | ||
stages: [push, commit] | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v5.5.1 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.3 | ||
hooks: | ||
- id: flake8 | ||
name: Check flake8 rules match | ||
entry: flake8 instapi | ||
language: system | ||
types: [python] | ||
always_run: true | ||
pass_filenames: false | ||
stages: [push, commit] | ||
additional_dependencies: | ||
- flake8-bugbear | ||
|
||
- id: isort | ||
name: Run isort to set correct order of imports | ||
entry: flake8 instapi | ||
language: system | ||
types: [python] | ||
always_run: true | ||
pass_filenames: false | ||
stages: [push, commit] | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.782 | ||
hooks: | ||
- id: mypy | ||
exclude: tests | ||
|
||
- repo: https://github.com/ambv/black | ||
rev: stable | ||
hooks: | ||
- id: black | ||
language_version: python3.7 |
This file was deleted.
Oops, something went wrong.
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
Empty file.
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 |
---|---|---|
@@ -1,26 +1,28 @@ | ||
from instapi.client import bind | ||
from instapi.exceptions import ClientNotInitedException | ||
from instapi.models import Candidate | ||
from instapi.models import Comment | ||
from instapi.models import Direct | ||
from instapi.models import Feed | ||
from instapi.models import Image | ||
from instapi.models import Message | ||
from instapi.models import Resource | ||
from instapi.models import Resources | ||
from instapi.models import User | ||
from instapi.models import Video | ||
from instapi.models import ( | ||
Candidate, | ||
Comment, | ||
Direct, | ||
Feed, | ||
Image, | ||
Message, | ||
Resource, | ||
Resources, | ||
User, | ||
Video, | ||
) | ||
|
||
__all__ = [ | ||
'bind', | ||
'ClientNotInitedException', | ||
'Comment', | ||
'Candidate', | ||
'Direct', | ||
'Feed', | ||
'Image', | ||
'Resource', | ||
'Resources', | ||
'User', | ||
'Video', | ||
"bind", | ||
"ClientNotInitedException", | ||
"Comment", | ||
"Candidate", | ||
"Direct", | ||
"Feed", | ||
"Image", | ||
"Resource", | ||
"Resources", | ||
"User", | ||
"Video", | ||
] |
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
Oops, something went wrong.