scrapinghub / portia

Visual scraping for Scrapy
BSD 3-Clause "New" or "Revised" License
9.28k stars 1.41k forks source link

Is GitStorage ready to use? #822

Open SimeonZhang opened 6 years ago

SimeonZhang commented 6 years ago

I've tried to set PORTIA_STORAGE_BACKEND as 'storage.backends.GitStorage', but end up an error : `

File "/app/portia_server/storage/backends.py", line 72, in get_projects

dirs, _ = cls('').listdir('')

File "/app/portia_server/storage/backends.py", line 295, in listdir

for p in self._working_tree:

AttributeError: 'GitStorage' object has no attribute '_working_tree'

` After reading the code, I realized that when initialized with an empty string, 'GitStorage' object return without assignment of quite a few attributes. I wonder whether this feature is ready or not , if ready, what should I do to implement it. Sorry for my poor English. @ruairif

ruairif commented 6 years ago

@SimeonZhang You can try using this PR and report any issues you find https://github.com/scrapinghub/portia/pull/823

SimeonZhang commented 6 years ago

@ruairif Thanks for your support. I've tried it and everything seems okay except that when publishing the project I got the response data with its key 'meta' missing. It seems that I should get something like: {"data": {...},"included":{...},"meta":{...}} but this is what I've gotten: {"data": {...},"included":{...}} so I modified the response data of the publish api.