Skip to content

Commit

Permalink
Support new part formats (#51)
Browse files Browse the repository at this point in the history
* Fix memory and GPU parts to support new format

* Update requirements and bump versions

* Remove Windows and Mac tests (too flaky)
  • Loading branch information
JonathanVusich authored Dec 7, 2020
1 parent 64c49ee commit 118fc96
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 27 deletions.
21 changes: 2 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,16 @@
language: python
python: 3.7
python: 3.9
dist: xenial
sudo: true
matrix:
include:
- os: linux
dist: xenial
python: 3.7
python: 3.9
sudo: true
before_install:
- pip install -r requirements-dev.txt
- python setup.py install
- os: windows
language: sh
python: "3.9"
env: export PATH="/c/Python39:/c/Python39/Scripts:$PATH"
before_install:
- choco install python3
- pip install -r requirements-dev.txt
- python setup.py install
- os: osx
osx_image: xcode10.2
language: shell
before_install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then ulimit -n 1024; fi
- pip3 install -r requirements-dev.txt
- python3 setup.py install
script:
- python3 -m pytest --cov-config=.coveragerc --cov=pcpartpicker tests/
script:
- pytest --cov-config=.coveragerc --cov=pcpartpicker tests/
after_success:
Expand Down
2 changes: 1 addition & 1 deletion pcpartpicker/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .api import API

__name__ = ["pcpartpicker"]
__version__ = '2.2.1'
__version__ = '2.2.2'
__author__ = 'Jonathan Vusich'
__email__ = 'jonathanvusich@gmail.com'
8 changes: 4 additions & 4 deletions pcpartpicker/parts.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,11 @@ class Memory:
model: str
module_type: str
speed: ClockSpeed
form_factor: str
number_of_modules: int
module_size: Bytes
price_per_gb: Money
color: str
first_word_latency: float
cas_timing: int
error_correction: str
price: Money
Expand All @@ -327,11 +327,11 @@ def __post_init__(self):
check_typing(self.model, str)
check_typing(self.module_type, str)
check_typing(self.speed, ClockSpeed)
check_typing(self.form_factor, str)
check_typing(self.number_of_modules, int)
check_typing(self.module_size, Bytes)
check_typing(self.price_per_gb, Money)
check_typing(self.color, str)
check_typing(self.first_word_latency, float)
check_typing(self.cas_timing, int)
check_typing(self.price, Money)
check_typing(self.error_correction, str)
Expand Down Expand Up @@ -379,8 +379,8 @@ class GPU:
vram: Bytes
core_clock: ClockSpeed
boost_clock: ClockSpeed
interface: str
color: str
length: float
price: Money

def __post_init__(self):
Expand All @@ -390,8 +390,8 @@ def __post_init__(self):
check_typing(self.vram, Bytes)
check_typing(self.core_clock, ClockSpeed)
check_typing(self.boost_clock, ClockSpeed)
check_typing(self.interface, str)
check_typing(self.color, str)
check_typing(self.length, float)
check_typing(self.price, Money)


Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
py-moneyed==0.8.0
dacite==1.0.0
aiohttp==3.6.1
dacite==1.6.0
aiohttp==3.7.3
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def read(file_name: str):

setup(
name="pcpartpicker",
version="2.2.1",
version="2.2.2",
author="Jonathan Vusich",
author_email="jonathanvusich@gmail.com",
description="A fast, simple API for PCPartPicker.com.",
Expand Down

0 comments on commit 118fc96

Please sign in to comment.