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

add prices to market items #2277

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add prices to market items #2277

wants to merge 1 commit into from

Conversation

esunder
Copy link

@esunder esunder commented Oct 2, 2020

#2071 Adds a price column to items in the market view

image

@esunder
Copy link
Author

esunder commented Oct 2, 2020

Note: I am trying to be a good steward of the code and add some tests. However, I am having some trouble with imports. There are no tests for other columns, like price, so it is tough to mimic an existing example.

I think it is a pathing issue, but it is able to import price.py just fine. Any ideas?

ImportError while importing test module '/home/sunder/Pyfa/tests/test_modules/test_gui/test_builtinViewColumnPrice.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.6/importlib/init.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_modules/test_gui/test_builtinViewColumnPrice.py:8: in
from gui.builtinViewColumns.price import Price
gui/builtinViewColumns/price.py:23: in
from eos.saveddata.cargo import Cargo
eos/saveddata/cargo.py:25: in
import eos.db
eos/db/init.py:120: in
from eos.db.saveddata import booster, cargo, character, damagePattern, databaseRepair, drone, fighter, fit, implant, implantSet,
eos/db/saveddata/cargo.py:25: in
from eos.saveddata.cargo import Cargo
E ImportError: cannot import name 'Cargo'

@DarkFenX
Copy link
Member

DarkFenX commented Nov 10, 2020

Hey, regarding your PR - sorry for not replying earlier. Adding price column is easy, and I considered it in the past. The reason why it wasn't added is not to overload price sources with updates. Any kind of search or active browsing will generate requests for thousands of items per minute. While caching policy on client side is decent, I think there has to be more stuff in place to add the price column to default distribution.

  1. Batch request of multiple prices for all shown items (except for cached entries). This is not trivial thing to do, but it would benefit fitting panel as well.
  2. Some kind of extra delay after showing items before price fetching requests are sent, like 1s at least - to avoid requesting stuff during searches, but request them only for final results

And those complications are the reasons why it is not in pyfa yet. It is cool end-user feature, but avoiding heavy distributed load on price services is a must in this case imo.

I might have some time into looking how to implement it myself, but no promises. Until that, I am leaving it hanging in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants