scrapy / itemadapter

Common interface for data container classes
BSD 3-Clause "New" or "Revised" License
61 stars 13 forks source link

Multiple itemadapter classes #68

Closed elacuesta closed 1 year ago

codecov[bot] commented 1 year ago

Codecov Report

Merging #68 (5ffd681) into master (0bf9f0c) will not change coverage. The diff coverage is 100.00%.

:exclamation: Current head 5ffd681 differs from pull request most recent head 5882f43. Consider uploading reports for the commit 5882f43 to get more accurate results

@@            Coverage Diff            @@
##            master       #68   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          318       323    +5     
=========================================
+ Hits           318       323    +5     
Impacted Files Coverage Δ
itemadapter/adapter.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

wRAR commented 1 year ago

How would one use this feature, e.g. in the https://github.com/scrapinghub/web-poet/issues/136 case? I think we need to be able to set the adapter list to use in web-poet when it generates and runs tests, and the actual contents of the list need to be user-defined?

@kmike what do you think?

kmike commented 1 year ago

How would one use this feature, e.g. in the https://github.com/scrapinghub/web-poet/issues/136 case? I think we need to be able to set the adapter list to use in web-poet when it generates and runs tests, and the actual contents of the list need to be user-defined?

@wRAR This makes sense. It can also be a path to ItemAdapter class (or the class itself), not sure what's better.

wRAR commented 1 year ago

Are we sure it will be possible to provide some interface in web-poet to use this? I guess we could make some setting for the class list and create the subclass inside the web-poet code based on it. Asking the user to create the subclass is probably more work for the user.