@@ -8,15 +8,15 @@ Torque adds this functionality.
88
99The two systems that make up Torque are:
1010
11- 1 . torquedata , a Flask app that houses and renders the data
12- 2 . TorqueDataConnect , a MediaWiki extension that integrates the Torque
11+ 1 . torque , a django app that houses and renders the data
12+ 2 . Torque extension , a MediaWiki extension that integrates the Torque
1313 responses into wiki pages and controls access to said pages.
1414
1515The decision to split the server housing the data from MediaWiki was made
1616for several reasons:
1717
1818* Ease of development. MediaWiki is an excellent platform for developing wikis,
19- but Python and Flask fit Torque's backend needs far better.
19+ but Python and django fit Torque's backend needs far better.
2020* Allowing multiple wikis to access one data set. For instance, having a public
2121 wiki and a private wiki with different permission sets.
2222* Allowing the data to reside on a different server than the wikis themselves.
@@ -39,7 +39,7 @@ Torque is built around having four classes of users:
3939 update the templates defined in MediaWiki, adjust column and object
4040 permissions.
4141
42- These users belong to the ` torquedataconnect -admin` and can also
42+ These users belong to the ` torque -admin` and can also
4343 upload new collections, and overwrite collections.
4444
4545* System Administrators: These users are responsible for setting up the
@@ -51,27 +51,27 @@ Torque is built around having four classes of users:
5151
5252Torque's permissions are defined dynamically in MediaWiki.
5353The page linked to by the
54- [ ` $wgTorqueDataConnectConfigPage ` ] ( TorqueDataConnect /README.md#Parameters)
54+ [ ` $wgTorqueConfigPage ` ] ( extension /README.md#Parameters)
5555variable is read, and the groups listed in the ` Permissions ` section are
5656matched with the user groups of the logged in MediaWiki user. The first
5757group in the ` Permissions ` table that matches a MediaWiki group the
58- user is assigned to gets sent to torquedata for validation and rendering.
58+ user is assigned to gets sent to torque for validation and rendering.
5959
60- Then, torquedata will redact the list of documents available to that user,
60+ Then, torque will redact the list of documents available to that user,
6161and the fields available to the template for rendering, based on the
6262permissions set up in that table. See
63- [ the configuration page] (TorqueDataConnect /README.md#WikiPage configuration)
63+ [ the configuration page] (extension /README.md#WikiPage configuration)
6464for details about the format of that page.
6565
6666The fields and documents linked are also used to generate search indices
67- in torquedata for search results that are correct for the users permissions.
67+ in torque for search results that are correct for the users permissions.
6868
69- ## torquedata Django app
69+ ## torque Django app
7070
71- ` torquedata ` exists to use a backing store, storing json documents in postgres,
71+ ` torque ` exists to use a backing store, storing json documents in postgres,
7272and provide different outputs necessary for the project.
7373
74- Because it's largely not user facing, the [ README] ( torquedata /README.md)
74+ Because it's largely not user facing, the [ README] ( torque /README.md)
7575is lightweight and concerned mostly system adminstrator information
7676for installation and configuration of the app. How it exposes information to
7777MediaWiki is left undocumented and may be changed at any time.
@@ -81,7 +81,7 @@ It provides the following features:
8181### Input from JSON files
8282
8383JSON data are uploaded through the
84- [ TorqueDataConnect extension] ( TorqueDataConnect /README.md#torquedataconnectuploadcollection ) .
84+ [ extension] ( extension /README.md#torqueuploadcollection ) .
8585The data must be an array of objects representing documents, with each one having
8686the same fields as the rest. Only the first is looked at to create the data model
8787in the database.
@@ -107,7 +107,7 @@ the variable `<collection_name>`.
107107### Wiki Markup from Documents
108108
109109Templates are configured as part of the
110- [ TorqueDataConnect extension] ( TorqueDataConnect /README.md#WikiPage_configuration)
110+ [ mediawiki extension] ( extension /README.md#WikiPage_configuration)
111111
112112These templates, which are stored on the wiki, are Jinja templates. When a request
113113is made to ` api/collections/<collection_name>/documents/<id>.mwiki ` , the desired
@@ -170,7 +170,7 @@ contents items look and feel, and what information is displayed.
170170
171171### JSON output for API
172172
173- Torque also allows programmatic access of the data, throught the ` torquedataconnect `
173+ Torque also allows programmatic access of the data, throught the ` torque `
174174API call. Any user with access can call into MediaWiki's API, using HTTP
175175or a supporting library, and ask for a path. The response is a JSON document
176176with a list of objects, each having a mapping of the header to field data for
@@ -185,58 +185,58 @@ but this provides a more software friendly source of data.
185185One large issue with MediaWiki is that there's no way to strongly associate
186186attachments (in this case, PDFs) with pages, and then have authorization
187187fall through to those. Indeed, the default setting is that attachments
188- are just handled by the filesystem and webserver. ` torquedata ` handles
188+ are just handled by the filesystem and webserver. ` torque ` handles
189189those attachments, and all the authorizations therein through a SpecialPage.
190190
191191When uploading, one of the arguments to the
192- [ ` torquedataconnectuploadattachment ` ] ( TorqueDataConnect /README.md#torquedataconnectuploadattachment )
192+ [ ` torqueuploadattachment ` ] ( extension /README.md#torqueuploadattachment )
193193API call is the ` permissions_field ` . The user must have access to that
194194column, and access to the proposal, for the file to be returned. If so,
195195then the user can download the file.
196196
197- See [ the special page] (TorqueDataConnect /README.md#Special page for attachments: Special: TorqueDataConnectAttachment )
197+ See [ the special page] (extension /README.md#Special page for attachments: Special: TorqueAttachment )
198198for details on how to generate the page.
199199
200200### Search results
201201
202202MediaWiki cannot cull search results based on authorization
203- because it's not a CMS. Instead, that's handled by ` torquedata ` . The search
203+ because it's not a CMS. Instead, that's handled by ` torque ` . The search
204204results come back filtered through the template set up for Search.
205205
206206The search uses [ whoosh] ( https://whoosh.readthedocs.io/en/latest/index.html )
207207to build indices for every group of users with unique permissions, so
208208the results are tailored to the logged in user.
209209
210- ## TorqueDataConnect MediaWiki Extension
210+ ## Torque MediaWiki Extension
211211
212- TorqueDataConnect controls the user facing
213- aspects of Torque. You can look at the [ README] ( TorqueDataConnect /README.md)
212+ The MediaWiki extension controls the user facing
213+ aspects of Torque. You can look at the [ README] ( extension /README.md)
214214for the reference of how to configure and use the system.
215215
216216### Torque Configuration
217217
218218The MediaWiki configuration comes in two parts. The first is in ` LocalSettings.php ` ,
219219which sets up the page. Those are defined by the
220- [ parameters] ( TorqueDataConnect /README.md#parameters) . The ones that need to be
220+ [ parameters] ( extension /README.md#parameters) . The ones that need to be
221221set for a correctly running system are:
222222
223- * ` $wgTorqueDataConnectConfigPage `
224- * ` $wgTorqueDataConnectCollectionName `
225- * ` $wgTorqueDataConnectWikiKey `
223+ * ` $wgTorqueConfigPage `
224+ * ` $wgTorqueCollectionName `
225+ * ` $wgTorqueWikiKey `
226226
227- The others have values to default to, or are assigned by TorqueDataConnect based on
227+ The others have values to default to, or are assigned by Torque based on
228228your user. See below for why you might want to override those.
229229
230230### Configuration Page
231231
232- The configuration page linked to by ` $wgTorqueDataConnectConfigPage ` is
232+ The configuration page linked to by ` $wgTorqueConfigPage ` is
233233set up to link groups with permissions, and defined templates. See the
234234[ above section] (#Permissions Structure) for more information. Every
235235Torque instance has to have a built out and configured config Page
236236in order to work correctly.
237237
238238When not set up correctly, the plugin will let you know that there's
239- an error if you're in the ` torquedataconnect -admin` user group.
239+ an error if you're in the ` torque -admin` user group.
240240
241241### Template Page
242242
@@ -253,13 +253,13 @@ that allows the user to select which view they want.
253253
254254The selected view template is called with the object being rendered
255255set to the name defined when
256- [ uploading the collection] ( TorqueDataConnect /README.md#torquedataconnectuploadcollection ) .
256+ [ uploading the collection] ( extension /README.md#torqueuploadcollection ) .
257257That object is a dictionary with the column headers of the spreadcollection
258258being indices to get the field data for that document. This is an
259259instance where demonstration is more informative than information, so see the
260260[ example] ( example/INSTALL.md ) for a concrete example.
261261
262- The variable ` $wgTorqueDataConnectView ` is set and passed along to torquedata
262+ The variable ` $wgTorqueView ` is set and passed along to torque
263263based on the user selection.
264264
265265#### Search
@@ -295,7 +295,7 @@ more information.
295295
296296### tdcrender Hook
297297
298- The ` #tdcrender ` hook is the main way that pages ask torquedata to render
298+ The ` #tdcrender ` hook is the main way that pages ask torque to render
299299objects for them. These can be inserted at any place on any page, and
300300the resulting text will be inserted to that location.
301301
@@ -332,7 +332,7 @@ of restrictions, as even a user not yet logged in can view attachments with the
332332correct URL.
333333
334334The way Torque solves this is by creating a
335- [ special page] (TorqueDataConnect /README.md#Special page for attachments: Special: TorqueDataConnectAttachment ).
335+ [ special page] (extension /README.md#Special page for attachments: Special: TorqueAttachment ).
336336When uploading, the column and proposal are linked to an attachment, and
337337then when accessing that file, those are checked against the Torque
338338permissions the user has.
@@ -341,9 +341,9 @@ permissions the user has.
341341
342342Torque allows torqueadmin's to upload three kinds of files:
343343
344- * [ The full data collection] ( TorqueDataConnect /README.md#torquedataconnectuploadcollection )
345- * [ A table of contents] ( TorqueDataConnect /README.md#torquedataconnectuploadtoc )
346- * [ An Attachment] ( TorqueDataConnect /README.md#torquedataconnectuploadattachment )
344+ * [ The full data collection] ( extension /README.md#torqueuploadcollection )
345+ * [ A table of contents] ( extension /README.md#torqueuploadtoc )
346+ * [ An Attachment] ( extension /README.md#torqueuploadattachment )
347347
348348These are done through the MediaWiki API (most likely through a bot account).
349349
@@ -391,12 +391,12 @@ You can use the published (to pypi) torqueclient if using python.
391391
392392### Conditional override of LocalSettings Parameters
393393
394- Some of the [ parameters] ( TorqueDataConnect /README) used by TorqueDataConnect
394+ Some of the [ parameters] ( Torque /README) used by Torque
395395are set by the extension itself based on the user logged in and the
396396dynamic configuration of the system.
397397
398- * ` $wgTorqueDataConnectView `
399- * ` $wgTorqueDataConnectGroup `
398+ * ` $wgTorqueView `
399+ * ` $wgTorqueGroup `
400400
401401However, it may be useful to override them. When overridden, Torque
402402uses the set value rather than assigning one to it. Some use cases
@@ -418,7 +418,7 @@ This is because MediaWiki does not provide ranking information
418418with its results, so each search engine must have a complete picture
419419of the data in order to correctly rank search results against each other.
420420
421- In the future, torquedata will gain a better understanding of the wiki to return
421+ In the future, torque will gain a better understanding of the wiki to return
422422better interleaved results.
423423
424424#### Search Filter
@@ -428,7 +428,7 @@ This allows more powerful filters, as the python language is available.
428428Filters are stored as part of the search cache, so when adjusting a filter,
429429the cache must be refreshed via a new upload.
430430
431- To see how to define filters, see [ config file] ( torquedata /config.py.tmpl) .
431+ To see how to define filters, see [ config file] ( torque /config.py.tmpl) .
432432
433433To adjust how the filter interface looks, use css, such as in the
434434MediaWiki: Common .css page.
0 commit comments