Toolserver:Report tool
This page was moved from the Toolserver wiki.
Toolserver has been replaced by Toolforge. As such, the instructions here may no longer work, but may still be of historical interest.
Please help by updating examples, links, template links, etc. If a page is still relevant, move it to a normal title and leave a redirect.
For users
[edit]The reports tool is a way to provide commonly used database queries in a regularly updated, easy-to-use form. It is a companion to the SQL Query service. If you would like a new query added, open a request in JIRA (in the 'Reports' component), describing what you want the query to do. If you can provide the SQL as well, that's helpful, but not a requirement.
For developers
[edit]This section describes how to develop the reports tool.
Generally, you should use your own copy of the tool for development. Check out the source:
$ svn co https://svn.toolserver.org/svnroot/p_reports/trunk reports
Copy reports.cfg.example to $HOME/.reports.cfg and edit it appropriately. Note that 'base' is where the tool will be installed to, not the directory you checked it out in. They must be different.
Run ./deploy from the reports directory.
$ ./deploy
The deploy script will automatically kill any running FastCGI processes, so your changes should be visible immediately (but only if you run it on wolfsbane).
Log in to MySQL and source the reports.sql file.
$ sql u_username $ mysql> \. /home/username/reports/reports.sql
Now navigate to http://toolserver.org/~username/reports/ and it should be working.
Deploying a new version of the live tool
[edit]Once you've committed changes and you want to deploy them, become the reports user. The source is in $HOME/reports/. Run 'svn up', then ./deploy. Make sure http://stable.toolserver.org/reports/ works properly.
NOTE: Do not commit as the reports user, because svn will save your password in the shared home directory.
Guidelines for committing
[edit]- All commits (except i18n changes) need an associated JIRA issue. If there isn't one, just create it, and resolve it after you commit. If an i18n commit already has a JIRA issue, e.g. it was provided by a non-committer, use that issue and follow the process described here.
- i18n commits must only touch i18n/*.msgs, and should have a commit message beginning 'i18n:'
- Make sure to assign the issue to yourself before you start working on it (or at the very least, before you commit)
- Format your commit message like this:
REPORTS-1 When the user clicks quux, their computer explodes REPORTS-37 Need more mice to power slow queries
i.e., "<issue key> <issue title>". Don't put any additional information in the commit message; put it in a JIRA comment.
- All commits must be tested, even minor ones, even if you think it's so simple it couldn't possibly be wrong.
- If you revert a commit, re-open the associated issue(s) and explain why.
- If you make a mistake during a commit and need to fix it, use the same issue key as the original commit, and append the fix in brackets:
REPORTS-37 Need more mice to power slow queries (fixed OutOfCheeseError caused by typo)
Developers
[edit]For translators
[edit]Follow the instructions above to check out the svn repository. i18n files are in i18n/*.msgs. Just copy en.msgs to <yourlang>.msgs, translate it, and send the result in a bug report to https://jira.toolserver.org/browse/REPORTS.
Please convert all characters that are not ASCII with Convert Characters to make sure everyone can read them.
Note: as the tool is still very much in development, messages are likely to change frequently. If you plan to translate the tool, you should probably request commit access instead of opening a bug for each change.