Merge branch 'master' into ammo_graph
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
- Python 3.6
|
||||
- Git CLI installed
|
||||
- Python, pip and git are all available as command-line commands (add to path if needed)
|
||||
- Python, pip and git are all available as command-line commands (add to the path if needed)
|
||||
|
||||
Virtual environment will be created in *PyfaEnv* folder. Project will be cloned and run from the *PyfaDEV* folder. Separate virtual environment will be created so required libraries won't clutter the main python installation.
|
||||
|
||||
@@ -17,16 +17,16 @@ Clone the repository
|
||||
git clone <repo> PyfaDEV
|
||||
```
|
||||
|
||||
Create virtual environment
|
||||
Create the virtual environment
|
||||
```
|
||||
python -m venv PyfaEnv
|
||||
```
|
||||
|
||||
Activate virtual environment
|
||||
Activate the virtual environment
|
||||
|
||||
```
|
||||
For cmd.exe: PyfaEnv\scripts\activate.bat
|
||||
For bash: source <venv>/bin/activate
|
||||
For bash: source <venv>/Scripts/activate
|
||||
```
|
||||
> For other OS check [Python documentation](https://docs.python.org/3/library/venv.html)
|
||||
|
||||
@@ -52,11 +52,11 @@ python PyfaDEV\pyfa.py
|
||||
|
||||
Install PyCharm / Other IntelliJ product with Python plugin
|
||||
|
||||
After launching select *Check out from Version Control* -> *GIt*
|
||||
After launching - select *Check out from Version Control* -> *GIt*
|
||||
|
||||

|
||||
|
||||
Login to GitHub, paste repo URL and seect the folder to which to clone the project, press *Clone*.
|
||||
Login to GitHub, paste the repo URL and select the folder to which to clone the project into, press *Clone*.
|
||||
|
||||

|
||||
|
||||
@@ -68,7 +68,7 @@ Press on options and add new virtual environment.
|
||||
|
||||

|
||||
|
||||
Open project tree view and double-click on *requirements.txt*. Press *Install requirements*. Install all requirements.
|
||||
Open project tree view and double-click on the *requirements.txt*. Press *Install requirements*. Install all requirements.
|
||||
|
||||

|
||||
|
||||
@@ -76,4 +76,27 @@ Create new *Run Configuration*. Set correct *Script path* and *Python interprete
|
||||
|
||||

|
||||
|
||||
Test that the project is starting properly.
|
||||
Check that the project is starting properly.
|
||||
|
||||
## Running tests
|
||||
|
||||
Switch to the proper virtual environment
|
||||
```
|
||||
For cmd.exe: PyfaEnv\scripts\activate.bat
|
||||
For bash: source <venv>/Scripts/activate
|
||||
```
|
||||
|
||||
Install pytest
|
||||
```
|
||||
pip install pytest
|
||||
```
|
||||
|
||||
Switch to pyfa directory.
|
||||
|
||||
Run tests (any will do)
|
||||
```
|
||||
python -m pytest
|
||||
py.test
|
||||
```
|
||||
|
||||
More information on tests can be found on appropriate [Wiki page](https://github.com/pyfa-org/Pyfa/wiki/Developers:-Writing-Tests-for-Pyfa).
|
||||
@@ -17,7 +17,8 @@
|
||||
# along with eos. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===============================================================================
|
||||
|
||||
import collections
|
||||
|
||||
from collections import MutableMapping
|
||||
from copy import copy
|
||||
from math import exp
|
||||
|
||||
@@ -96,7 +97,7 @@ class ChargeAttrShortcut:
|
||||
return return_value or default
|
||||
|
||||
|
||||
class ModifiedAttributeDict(collections.MutableMapping):
|
||||
class ModifiedAttributeDict(MutableMapping):
|
||||
overrides_enabled = False
|
||||
|
||||
class CalculationPlaceholder:
|
||||
|
||||
@@ -1 +1 @@
|
||||
__all__ = ['evemarketer', 'evemarketdata', 'evepraisal']
|
||||
__all__ = ['evemarketer', 'evepraisal', 'evemarketdata']
|
||||
|
||||
@@ -66,11 +66,15 @@ class EvePraisal:
|
||||
try:
|
||||
typeID = int(itemData['typeID'])
|
||||
price = itemData['prices']['sell']['min']
|
||||
orderCount = itemData['prices']['sell']['order_count']
|
||||
except (KeyError, TypeError):
|
||||
continue
|
||||
# evepraisal returns 0 if price data doesn't even exist for the item
|
||||
if price == 0:
|
||||
continue
|
||||
# evepraisal seems to provide price for some items despite having no orders up
|
||||
if orderCount < 1:
|
||||
continue
|
||||
priceMap[typeID].update(PriceStatus.fetchSuccess, price)
|
||||
del priceMap[typeID]
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
# =============================================================================
|
||||
|
||||
|
||||
import collections
|
||||
import json
|
||||
from collections import defaultdict
|
||||
|
||||
from logbook import Logger
|
||||
|
||||
@@ -61,7 +61,7 @@ def exportESI(ofit, callback):
|
||||
# max fit name length is 50 characters
|
||||
# Most keys are created simply because they are required, but bogus data is okay
|
||||
|
||||
nested_dict = lambda: collections.defaultdict(nested_dict)
|
||||
nested_dict = lambda: defaultdict(nested_dict)
|
||||
fit = nested_dict()
|
||||
sFit = svcFit.getInstance()
|
||||
|
||||
|
||||
@@ -387087,7 +387087,7 @@
|
||||
{
|
||||
"attributeID": 37,
|
||||
"typeID": 11365,
|
||||
"value": 195.0
|
||||
"value": 295.0
|
||||
},
|
||||
{
|
||||
"attributeID": 38,
|
||||
@@ -2889503,5 +2889503,90 @@
|
||||
"attributeID": 2422,
|
||||
"typeID": 52814,
|
||||
"value": 18201.0
|
||||
},
|
||||
{
|
||||
"attributeID": 4,
|
||||
"typeID": 53287,
|
||||
"value": 0.0
|
||||
},
|
||||
{
|
||||
"attributeID": 38,
|
||||
"typeID": 53287,
|
||||
"value": 0.0
|
||||
},
|
||||
{
|
||||
"attributeID": 161,
|
||||
"typeID": 53287,
|
||||
"value": 1.0
|
||||
},
|
||||
{
|
||||
"attributeID": 162,
|
||||
"typeID": 53287,
|
||||
"value": 1.0
|
||||
},
|
||||
{
|
||||
"attributeID": 175,
|
||||
"typeID": 53287,
|
||||
"value": 3.0
|
||||
},
|
||||
{
|
||||
"attributeID": 176,
|
||||
"typeID": 53287,
|
||||
"value": 3.0
|
||||
},
|
||||
{
|
||||
"attributeID": 177,
|
||||
"typeID": 53287,
|
||||
"value": 3.0
|
||||
},
|
||||
{
|
||||
"attributeID": 178,
|
||||
"typeID": 53287,
|
||||
"value": 3.0
|
||||
},
|
||||
{
|
||||
"attributeID": 179,
|
||||
"typeID": 53287,
|
||||
"value": 3.0
|
||||
},
|
||||
{
|
||||
"attributeID": 182,
|
||||
"typeID": 53287,
|
||||
"value": 3402.0
|
||||
},
|
||||
{
|
||||
"attributeID": 277,
|
||||
"typeID": 53287,
|
||||
"value": 1.0
|
||||
},
|
||||
{
|
||||
"attributeID": 330,
|
||||
"typeID": 53287,
|
||||
"value": 172800000.0
|
||||
},
|
||||
{
|
||||
"attributeID": 1087,
|
||||
"typeID": 53287,
|
||||
"value": 10.0
|
||||
},
|
||||
{
|
||||
"attributeID": 1647,
|
||||
"typeID": 53287,
|
||||
"value": 1080.0
|
||||
},
|
||||
{
|
||||
"attributeID": 1890,
|
||||
"typeID": 53287,
|
||||
"value": 1.0
|
||||
},
|
||||
{
|
||||
"attributeID": 1916,
|
||||
"typeID": 53287,
|
||||
"value": 1.0
|
||||
},
|
||||
{
|
||||
"attributeID": 2422,
|
||||
"typeID": 53287,
|
||||
"value": 18293.0
|
||||
}
|
||||
]
|
||||
@@ -212823,5 +212823,30 @@
|
||||
"effectID": 310,
|
||||
"isDefault": false,
|
||||
"typeID": 52814
|
||||
},
|
||||
{
|
||||
"effectID": 302,
|
||||
"isDefault": false,
|
||||
"typeID": 53287
|
||||
},
|
||||
{
|
||||
"effectID": 304,
|
||||
"isDefault": false,
|
||||
"typeID": 53287
|
||||
},
|
||||
{
|
||||
"effectID": 306,
|
||||
"isDefault": false,
|
||||
"typeID": 53287
|
||||
},
|
||||
{
|
||||
"effectID": 308,
|
||||
"isDefault": false,
|
||||
"typeID": 53287
|
||||
},
|
||||
{
|
||||
"effectID": 310,
|
||||
"isDefault": false,
|
||||
"typeID": 53287
|
||||
}
|
||||
]
|
||||
@@ -587541,7 +587541,7 @@
|
||||
"53093": {
|
||||
"basePrice": 0.0,
|
||||
"capacity": 0.0,
|
||||
"description": "This crate contains a frigate-class starship from your faction's combat line.\r\nThese ships are excellent choices for completing level 1 security agent missions as well as inexpensive pvp combat against other capsuleers.",
|
||||
"description": "This crate contains a frigate class starship from your faction's combat line.\r\nThese ships are excellent choices for completing level 1 security agent missions as well as inexpensive pvp combat against other capsuleers.",
|
||||
"descriptionID": 552916,
|
||||
"groupID": 1194,
|
||||
"iconID": 1443,
|
||||
@@ -587551,7 +587551,7 @@
|
||||
"published": false,
|
||||
"radius": 1.0,
|
||||
"typeID": 53093,
|
||||
"typeName": "Frigate-Class Starship",
|
||||
"typeName": "Frigate Class Starship",
|
||||
"typeNameID": 552915,
|
||||
"volume": 2500.0
|
||||
},
|
||||
@@ -587575,7 +587575,7 @@
|
||||
"53095": {
|
||||
"basePrice": 0.0,
|
||||
"capacity": 0.0,
|
||||
"description": "This crate contains a destroyer-class starship from your faction's attack line.\r\nDestroyers are larger and more powerful than frigates, with excellent damage output. However their larger size makes them easier for enemy ships to hit effectively. \r\nThese ships are excellent choices for completing level 1 or 2 security agent missions, as well as group pvp combat as part of a capsuleer corporation.",
|
||||
"description": "This crate contains a destroyer class starship from your faction's attack line.\r\nDestroyers are larger and more powerful than frigates, with excellent damage output. However their larger size makes them easier for enemy ships to hit effectively. \r\nThese ships are excellent choices for completing level 1 or 2 security agent missions, as well as group pvp combat as part of a capsuleer corporation.",
|
||||
"descriptionID": 552920,
|
||||
"groupID": 1194,
|
||||
"iconID": 1443,
|
||||
@@ -587585,7 +587585,7 @@
|
||||
"published": false,
|
||||
"radius": 1.0,
|
||||
"typeID": 53095,
|
||||
"typeName": "Destroyer-Class Starship",
|
||||
"typeName": "Destroyer Class Starship",
|
||||
"typeNameID": 552919,
|
||||
"volume": 5000.0
|
||||
},
|
||||
@@ -587861,6 +587861,23 @@
|
||||
"typeNameID": 553277,
|
||||
"volume": 1.0
|
||||
},
|
||||
"53287": {
|
||||
"basePrice": 0.0,
|
||||
"capacity": 0.0,
|
||||
"description": "Cerebral accelerators are military grade boosters that significantly increase a pilot’s skill development for a limited time. This is achieved by priming the user’s brain and neural pathways for increased data bandwidth during knowledge transfer.\r\n\r\nDesigned for new capsuleers, this cerebral accelerator will cease to function for pilots who have been registered for more than 45 days.\r\nThe compounds used in this cerebral accelerator are unstable, and will expire on YC122/02/01.",
|
||||
"descriptionID": 553412,
|
||||
"groupID": 303,
|
||||
"iconID": 10144,
|
||||
"isDynamicType": false,
|
||||
"mass": 0.0,
|
||||
"portionSize": 1,
|
||||
"published": false,
|
||||
"radius": 1.0,
|
||||
"typeID": 53287,
|
||||
"typeName": "Starter Gift Cerebral Accelerator",
|
||||
"typeNameID": 553411,
|
||||
"volume": 1.0
|
||||
},
|
||||
"533": {
|
||||
"basePrice": 0.0,
|
||||
"capacity": 0.0,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[
|
||||
{
|
||||
"field_name": "client_build",
|
||||
"field_value": 1595463
|
||||
"field_value": 1596526
|
||||
},
|
||||
{
|
||||
"field_name": "dump_time",
|
||||
"field_value": 1572435719
|
||||
"field_value": 1572522923
|
||||
}
|
||||
]
|
||||
@@ -1 +1 @@
|
||||
version: v2.14.0
|
||||
version: v2.14.1
|
||||
|
||||
Reference in New Issue
Block a user