-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrading layout: creating pyproject.toml, moving vk to src dir, skipping non-working tests, configuring tox and other * Fixing coverage missing * Adding pre-commit hook * Fix sphinx build * Remove make files from docs * Adding docs env to tox for docs building * Update README.md * Setup autorelease on PyPI * Adding URLs to pyproject.toml
- Loading branch information
1 parent
37f41c7
commit 10c7bc6
Showing
29 changed files
with
275 additions
and
928 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,86 @@ | ||
name: Check | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
schedule: | ||
- cron: "0 12 * * *" | ||
|
||
jobs: | ||
test: | ||
name: Run tests - Python ${{ matrix.py }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
py: | ||
- "3.7" | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "pypy-3.7" | ||
- "pypy-3.8" | ||
steps: | ||
- name: Setup Python for tox | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
- name: Install tox | ||
run: pip install tox | ||
- name: Setup Python ${{ matrix.py }} for test | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Setup test suite | ||
run: tox -vv --notest | ||
- name: Run test suite | ||
run: tox --skip-pkg-install | ||
- name: Upload coverage | ||
uses: codecov/codecov-action@v2 | ||
|
||
check: | ||
name: Check - Tox ${{ matrix.tox_env }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
tox_env: | ||
- fix | ||
- docs | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Setup Python for tox | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
- name: Install tox | ||
run: pip install tox | ||
- name: Setup test suite | ||
run: tox -vv --notest -e ${{ matrix.tox_env }} | ||
- name: Run test suite | ||
run: tox --skip-pkg-install -e ${{ matrix.tox_env }} | ||
|
||
publish: | ||
name: Publish on PyPI | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
needs: [ test, check ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
- name: Install dependencies | ||
run: pip install build | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Build project | ||
run: python -m build --sdist --wheel --outdir dist/ . | ||
- name: Publish on PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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
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,27 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.2.0 | ||
hooks: | ||
- id: check-builtin-literals | ||
- id: check-docstring-first | ||
- id: check-merge-conflict | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- flake8-bugbear | ||
- flake8-comprehensions | ||
- flake8-unused-arguments | ||
- flake8-noqa | ||
- pep8-naming |
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,39 +1,37 @@ | ||
Python vk.com API wrapper | ||
========================= | ||
# vk | python vk.com API wrapper | ||
|
||
[![PyPI](https://img.shields.io/pypi/pyversions/vk.svg)](https://pypi.org/project/vk/ "Latest version on PyPI") | ||
[![Travis](https://travis-ci.com/voronind/vk.svg?branch=master)](https://travis-ci.com/voronind/vk "Travis CI") | ||
[![Docs](https://readthedocs.org/projects/vk/badge/?version=stable)](https://vk.readthedocs.io/en/latest/ "Read the docs") | ||
[![codecov](https://codecov.io/gh/voronind/vk/branch/master/graph/badge.svg)](https://codecov.io/gh/voronind/vk "Coverage") | ||
[![Maintanance](https://img.shields.io/maintenance/yes/2022?style=flat-square)](https://github.com/voronind/vk/commits/master) | ||
[![PyPI](https://img.shields.io/pypi/pyversions/vk?style=flat-square)](https://pypi.org/project/vk/) | ||
[![GitHub CI](https://img.shields.io/github/workflow/status/voronind/vk/Check/master?style=flat-square)](https://github.com/voronind/vk/actions) | ||
[![Codecov](https://img.shields.io/codecov/c/github/voronind/vk?style=flat-square)](https://codecov.io/gh/voronind/vk) | ||
[![Docs](https://img.shields.io/readthedocs/vk?style=flat-square)](https://vk.readthedocs.io/en/latest/) | ||
|
||
This is a vk.com (the largest Russian social network) | ||
python API wrapper. The goal is to support all API methods (current and future) | ||
that can be accessed from server. | ||
This is a vk.com (the largest Russian social network) python API wrapper. <br> | ||
The goal is to support all API methods (current and future) that can be accessed from server. | ||
|
||
Quickstart | ||
========== | ||
|
||
Install | ||
------- | ||
## Quickstart | ||
|
||
```console | ||
|
||
### Install | ||
|
||
```bash | ||
pip install vk | ||
``` | ||
|
||
Usage | ||
----- | ||
|
||
### Usage | ||
|
||
```python | ||
>>> import vk | ||
>>> session = vk.Session() | ||
>>> api = vk.API(session) | ||
>>> api = vk.API(access_token='...') | ||
>>> api.users.get(user_ids=1) | ||
[{'first_name': 'Pavel', 'last_name': 'Durov', 'id': 1}] | ||
``` | ||
|
||
See https://vk.com/dev/methods for detailed API guide. | ||
See official VK [documentation](https://dev.vk.com/method) for detailed API guide. | ||
|
||
|
||
More info | ||
========= | ||
## More info | ||
|
||
Read full documentation https://vk.readthedocs.org | ||
Read full documentation on [Read the Docs](https://vk.readthedocs.org) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.