uvacw / inca

24 stars 6 forks source link

Change documentation to reflect best practices #263

Open damian0604 opened 6 years ago

damian0604 commented 6 years ago

The documentation and the best-practice workflow until now does not instantiate an Inca object.

For instance, the tutorials suggest to scrape using

import inca
myscraper = inca.scrapers.newsscrapers.nu()
myscraper.run()

However, (definitly since PR #262 ) the preferred way of doing this is something along these lines:

In [1]: import inca
In [2]: myinca = inca.Inca()
In [3]: myinca.scrapers.nu() 

One of the main benefits is that it gives cleaner tab completion and documentation:

In [4]: myinca.
myinca.database    myinca.processing  myinca.scrapers    

All files in the doc folder need to be adjusted.

damian0604 commented 6 years ago

In addition, since PR #277 , there is a distinction between a scraper and an rssscraper, which implies that the current examples are invalid.

damian0604 commented 6 years ago

additionally,

... and add to documentation that viewing debug messages can be switched on by doing

from inca import Inca myinca = Inca(debug=True)