Skip to content
This repository has been archived by the owner on May 20, 2021. It is now read-only.

Commit

Permalink
Develop (#44)
Browse files Browse the repository at this point in the history
* Corrected typo in units (#37)

* Added object representation (#39)

* Unused imports (#40)

* isort

* linters ci

* API return objects are now iterable (#38)

* fix README

* Async request fix and other minor changes (#41)

* Corrected typo in units

* Unused imports

* API return objects are now iterable

* Added object representation

* Added darksky__unavailable flag. Not sure about the actual type (bool?)

See https://darksky.net/dev/docs#flags for more details

* Simplified camelCase utility function

* Patched async request yarl type error (List[str])

async make_request now accepts arguments of type List[str]

* Fix requirements & style

* Disabled docstring linter rules

Co-authored-by: Vysybyl <[email protected]>
  • Loading branch information
Detrous and Vysybyl authored Jan 27, 2020
1 parent 6cd2343 commit 0672db0
Show file tree
Hide file tree
Showing 23 changed files with 960 additions and 291 deletions.
59 changes: 47 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,57 @@
version: 2
jobs:
build:
deps:
docker:
- image: circleci/python:3.6
steps:
- checkout
- restore_cache:
keys:
- deps-cache-{{ checksum "requirements-ci.txt" }}
- run:
command: |
python3 -m venv venv
. venv/bin/activate
pip install aiohttp==3.5.4 requests==2.21.0 pytz==2019.1 pytest-asyncio==0.10.0 aioresponses==0.6.0 mock==3.0.5 pytest==5.0.1 yarl==1.3.0 codecov==2.0.15 pytest-cov==2.8.1
pip install -r requirements-ci.txt
- save_cache:
key: deps-cache-{{ checksum "requirements-ci.txt" }}
paths:
- venv
linters:
docker:
- image: circleci/python:3.6
steps:
- checkout
- restore_cache:
keys:
- deps-cache-{{ checksum "requirements-ci.txt" }}
- run:
command: |
python3 -m venv venv
- run:
command: |
. venv/bin/activate
export PACKAGES=$(python -c "from setuptools import find_packages; print(' '.join({p.split('.')[0] + '/' for p in find_packages()}))")
isort --check-only
pylint -v --output-format=parseable $PACKAGES -j 0
flake8 --config=".flake8"
tests:
docker:
- image: circleci/python:3.6
steps:
- checkout
- restore_cache:
keys:
- deps-cache-{{ checksum "requirements-ci.txt" }}
- run:
command: |
python3 -m venv venv
- run:
command: |
. venv/bin/activate
pytest --cov=./ -s -v
codecov --token=$CODECOV_TOKEN
- store_artifacts:
path: .pytest_cache
destination: .pytest_cache
isort -y
deploy:
docker:
- image: circleci/python:3.6
Expand Down Expand Up @@ -45,15 +79,16 @@ workflows:
version: 2
build_and_deploy:
jobs:
- build:
filters:
branches:
only:
- master
- develop
- deps
- linters:
requires:
- deps
- tests:
requires:
- linters
- deploy:
requires:
- build
- tests
filters:
branches:
only: master
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
exclude = venv/*,tests/data.py
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ __pycache__/
*.py[cod]
*$py.class

# VIM
*~
*.swp
artefacts

# C extensions
*.so
Expand Down
3 changes: 3 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[settings]
line_length=79
skip=venv
Loading

0 comments on commit 0672db0

Please sign in to comment.