Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to cryptography. #288

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@

# Docs: https://coverage.readthedocs.org/en/latest/config.html

[run]
concurrency = gevent
omit =
steam/protobufs/*
steam/enums/*

branch = False

# If True, stores relative file paths in data file (needed for Github Actions).
# Using this parameter requires coverage>=5.0
relative_files = True
105 changes: 105 additions & 0 deletions .github/workflows/testing_initiative.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# 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: Testing Initiative

on:
push:
branches: [ master ]
paths-ignore:
- '.gitignore'
- '*.md'
- '*.rst'
- 'LICENSE'
- 'Vagrantfile'
- 'protobuf_list.txt'
- 'protobufs/**'
- 'recipes/**'
pull_request:
branches: [ master ]
paths-ignore:
- '.gitignore'
- '*.md'
- '*.rst'
- 'LICENSE'
- 'Vagrantfile'
- 'protobuf_list.txt'
- 'protobufs/**'
- 'recipes/**'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
no-coverage: [0]
include:
- os: ubuntu-latest
python-version: pypy-2.7
no-coverage: 1
- os: ubuntu-latest
python-version: pypy-3.6
no-coverage: 1
steps:
- uses: actions/checkout@v2
- name: Set up Python Env
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
make init
- name: Run Tests
env:
NOCOV: ${{ matrix.no-coverage }}
run: |
make test
- name: Upload to Coveralls
# pypy + concurrenct=gevent not supported in coveragepy. See https://github.com/nedbat/coveragepy/issues/560
if: matrix.no-coverage == 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: "${{ matrix.os }}_${{ matrix.python-version }}"
run: |
coveralls --service=github

coveralls:
name: Finish Coveralls
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Install coveralls
run: |
pip3 install --upgrade coveralls
- name: Send coverage finish to coveralls.io
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --finish

build-docs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.6]
steps:
- uses: actions/checkout@v2
- name: Set up Python Env
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
make init
make init_docs
- name: Build Docs
run: make docs
65 changes: 0 additions & 65 deletions .travis.yml

This file was deleted.

12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,21 @@ export HELPBODY
help:
@echo "$$HELPBODY"

init: init_docs
pip install -r requirements.txt
init:
pip install -r dev_requirements.txt

init_docs:
pip install sphinx==1.8.5 sphinx_rtd_theme

COVOPTS = --cov-config .coveragerc --cov=steam

ifeq ($(NOCOV), 1)
COVOPTS =
endif

test:
coverage erase
PYTHONHASHSEED=0 pytest --cov=steam tests
PYTHONHASHSEED=0 pytest --tb=short $(COVOPTS) tests

webauth_gen:
rm -f vcr/webauth*
Expand Down
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ IRC: irc.freenode.net / #steamkit (`join via webchat <https://webchat.freenode.n

.. _Steam: https://store.steampowered.com/

.. |pypi| image:: https://img.shields.io/github/tag/valvepython/steam.svg?label=release&color=green&logo=steam
.. |pypi| image:: https://img.shields.io/pypi/v/steam.svg?label=pypi&color=green
:target: https://pypi.python.org/pypi/steam
:alt: Latest version released on PyPi

.. |latest| image:: https://img.shields.io/github/tag-pre/valvepython/steam.svg?label=latest&logo=steam
.. |latest| image:: https://img.shields.io/github/v/tag/ValvePython/steam?include_prereleases&sort=semver&label=release
:target: https://github.com/ValvePython/steam/releases
:alt: GitHub Releases
:alt: Latest release on Github

.. |pypipy| image:: https://img.shields.io/pypi/pyversions/steam.svg?label=%20&logo=python&logoColor=white
:alt: PyPI - Python Version
Expand All @@ -113,8 +113,8 @@ IRC: irc.freenode.net / #steamkit (`join via webchat <https://webchat.freenode.n
:target: https://pypi.python.org/pypi/steam
:alt: MIT License

.. |coverage| image:: https://scrutinizer-ci.com/g/ValvePython/steam/badges/coverage.png?b=master
:target: https://scrutinizer-ci.com/g/ValvePython/steam/?branch=master
.. |coverage| image:: https://img.shields.io/coveralls/ValvePython/steam/master.svg?style=flat
:target: https://coveralls.io/r/ValvePython/steam?branch=master
:alt: Test coverage

.. |sonar_maintainability| image:: https://sonarcloud.io/api/project_badges/measure?project=ValvePython_steam&metric=sqale_rating
Expand Down
12 changes: 12 additions & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

-r requirements.txt

vcrpy==2.0.1
mock==1.3.0

coverage>=5.0; python_version == '2.7' or python_version >= '3.5'
pytest-cov>=2.7.0; python_version == '2.7' or python_version >= '3.5'

# coveralls 2.0 has removed support for Python 2.7 and 3.4
git+https://github.com/andy-maier/coveralls-python.git@andy/add-py27#egg=coveralls; python_version == '2.7'
coveralls>=2.1.2; python_version >= '3.5'
9 changes: 2 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
six>=1.10.0
pycryptodomex>=3.7.0
cryptography>=3.1
requests>=2.9.1
vdf>=3.3
gevent>=1.3.0
protobuf>=3.0.0
gevent-eventemitter>=2.1
gevent-eventemitter~=2.1
enum34==1.1.2; python_version < '3.4'
coverage==4.0.3
pytest==3.2.1
pytest-cov==2.5.1
mock==1.3.0
PyYAML==5.1
vcrpy==2.0.1
cachetools>=3.0.0
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

install_requires = [
'six>=1.10',
'pycryptodomex>=3.7.0',
'cryptography>=3.1',
'requests>=2.9.1',
'vdf>=3.3',
'cachetools>=3.0.0',
Expand Down Expand Up @@ -53,6 +53,7 @@
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: PyPy',
],
keywords='valve steam steamid api webapi steamcommunity',
Expand Down
4 changes: 2 additions & 2 deletions steam/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.0.2"
__version__ = "1.2.0"
__author__ = "Rossen Georgiev"

version_info = (1, 0, 2)
version_info = (1, 2, 0)
Loading