Identify `yapapi` dependencies to be moved/ported into `golem-core`
Closed this issue · 1 comments
approxit commented
As golem-core reached its MVP, we should follow up its state with already existing yapapi. As its not currently known if we want to merge those projects, or keep them separate, we know that we need to get rid of yapapi
dependency in golem-core
. golem-core
should take role of the lowest python level library, so no yapapi
dependencies should exists.
As list of dependencies is not yet known, we decided that we need first to check the golem-core
codebase, and list all of yapapi
dependencies.
To do:
- Prepare list of
yapapi
modules/classes/flows that are used bygolem-core
for later replacement
lucekdudek commented
Bits
- Note: check both yapapi's version for each bit (^0.9.3 and newest)
- Copy blender image source code (used in examples) from yapapi to golem-core-python
- Port/reimplemnt Payload along with
yapapi.payload.vm
and otheryapapi.payload
artifacts in golem-core:- TODO investigate what golem-core uses this for se we can port less code
- what is the reason
AutodecoratingModel
exists? - is there a reason to mix
properties
andconstrains
as a collection on the same level (instead of having two separated collections)?
- what is the reason
- refactor golem-core's
Package.from_image_hash
so it doesn't spin asyncio event loop - refactor yappai's
Package.resolve_url()
so it returns plain url instead of str decorated with prefix and sufix
- TODO investigate what golem-core uses this for se we can port less code
- Copy
GftpProvider
to golem-core, limit it to only classes and functions necessary for golem-core (e.g.Destination
andSource
abstract classes) - Copy
_YagnaDatetimeFormatter
to golem-core - Port/reimplement
rest.Configuration
- change name so it reflects what it dose
- change factory methods names so they reflect what they are doing
- Copy
yapapi/config.py:ApiConfig
and add logic resposible for creating defaultya_
urls. - Create factories that will return specific
ya_
clients based on givenApiConfig
- Replace
self._api_config.market()
calls with calls to new factory. e.g.:self._ya_market_api = ApiFactory(self._api_config).create_market_api()
- Replace
- Copy
DEFAULT_DRIVER, DEFAULT_NETWORK, DEFAULT_SUBNET
to golem-core - Refactor
golem_node.GolemNode.create_demand
so it doesn't use yapapi'sDemandBuilder
norprops
- Copy fstring from
__str__
method fromNoPaymentAccountError
toNoMatchingAccount
- Copy
is_intermittent_error
- Copy
_is_gsb_endpoint_not_found_error