Page MenuHomePhabricator

Break out config file for project start bot
Closed, ResolvedPublic8 Estimated Story Points

Description

The parameters that are likely to change between runs should be broken out to a config file. This includes Pywikibot settings, if possible. This will likely just be a Python-file that gets imported where it's needed.

Parameters to consider:

  • Pages that are used as templates
  • Coordinates in spread sheet (e.g. the column where the first project is)
  • Pywikibot parameters

Event Timeline

After further contemplation, the neatest solution is probably to break out template parameters too. It should be possible to map these directly from the headers in the spreadsheet, which would clean up the code quite a bit.

A few parameters need some processing. These will probably be caught in the code rather than specified in the configuration, since the functions need to be implemented there.

I ended up making a YAML-config with parameters for:

  • In data from spreadsheet: indices for what columns and rows to read from
  • Wiki: what pages, templates and template parameters to use. Some parameters match to the labels (first row) in the in data.
  • Phab: parameters for Conduit and the id of the parent project.

Commit: https://github.com/Wikimedia-Sverige/project-start/commit/b656b1b28a046a3e40a81f30875bc1c42ebf9467

Jopparn claimed this task.