[Teammetrics-discuss] Please update updatenames.py
Sukhbir Singh
sukhbir.in at gmail.com
Sun Jan 8 11:15:01 UTC 2012
Hi Andreas,
> I did not verified whether it is now possible to call updatenames.py
> from shell to fix some names without running any other code as I asked
> for in
>
> http://lists.alioth.debian.org/pipermail/teammetrics-discuss/2011-November/000622.html
Yes, it's possible :) I fixed it at that time only and have used it
extensively also.
> missed) I needed to do some more name replacements. I'm simply attaching
> the SQL statements I issued to fix the old database which will probably
> not harm on the new database as well.
Ok.
> In the end I decided to use 'ILIKE' in any case and we need to accept
> more than one ILIKE statement connected by OR. I think I previousely
> suggested to always use (I)LIKE and not "author =" because if we leave
> out any '%' character in the expression it is defacto a "=" and you can
Yes, we discussed this and it was pending a 'fix'.
> simplify the code. It also might make sense to move the replacement
> strings into a separate file which is just read by updatenames.py and
> this finally would be a configuration file and thus belongs to
> /etc/teammetrics.
Good idea! I also don't somehow like editing the source file to
include the names.
> So if I try to stick to the attached examples an input file say
>
> /etc/teammetrics/changed_names.conf
Ok.
> could look like:
>
> 'Joost van Baal': 'Joost van Baal%', 'joostvb'
> 'Michael Hanke': 'mhanke-guest', 'mih'
> UPDATE listarchives SET name = 'Joost van Baal' WHERE name ILIKE 'Joost van Baal%' OR name ILIKE 'joostvb' ;
Ok.
> IMHO there is no need to call updatenames.py in the middle of any
> archive gathering run but just at the end of each script which gathers
> data.
Yup, that is what we are doing -- we run it at the end only.
--
Sukhbir
More information about the Teammetrics-discuss
mailing list