-
Notifications
You must be signed in to change notification settings - Fork 22
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
Listing available nodes #966
base: master
Are you sure you want to change the base?
Conversation
d79bdaa
to
4b00d05
Compare
4b00d05
to
53db8ea
Compare
from yapapi.rest.market import OfferProposal | ||
from examples import utils | ||
|
||
examples_dir = pathlib.Path(__file__).resolve().parent.parent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
krunch3r here from the community, nice work!
this won't run on my windows install... i observed that from the perspective of python, the examples module is searched from its parent directory. did you mean:
examples_parent_dir = pathlib.Path(__file__).resolve().parent.parent.parent
and to place it above line 15 or is this just extra code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you want to achieve. I just copied this part of code from list-offers.py
example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as is, this will emit: ModuleNotFoundError: No module named 'examples'
on account of the import statement from examples
preceding the module search path modification.
ironically i pulled a fix for this issue to list-offers.py some time ago and you must have been looking at another branch when you copied(, and in fact i see shade of blue has merged master into this branch to bring it up to date recently):
aa86ed3
i was originally suggesting here instead:
examples_dir = pathlib.Path(__file__).resolve().parent.parent.parent
sys.path.append(str(examples_dir))
from examples import utils
but i think the modification i made to list-offers.py (see link to commit hash above) is a little more clean/concise
yo, krunch3r from comm here: awesome! reminds me of how i launched from list-offers.py example to gc__listoffers. one challenge i faced was doing away with repeat nodes, which can easily be solved - otherwise it is listing "names" on proposals i think not so much nodes? thank you for contemplating all my notes! note: i recall trying list-offers.py on the hybrid-net and it didn't work... just a heads up |
Hi, krunch3r76 thanks for review. I applied your suggestions.
|
@golemfactory/ya-sdk leaving for you to merge it :) |
Listing mapping of node ids to node names
You can merge if you find it useful or reject if not