If you would like to contribute to CoVizu by providing a page translation in another language, thank you!
-
To get started, make a copy of
index.htmland add a two-letter language code suffix to the basename, e.g.,index-fr.html. -
We have moved all text elements into a single file
index.htmlso that contributors do not have to search through the various JavaScript files for content to translate. In order for this to work, we have had to create a JSON object at the top of the<head>section ofindex.html. This maps keywords, e.g.,number_cases, to the language-specific replacement, e.g., "nombre de cas". A translation should be provided for every keyword in this JSON. -
Please check through the following HTML elements for content to translate:
<label>elements<option>elements within<select>inputstitletags within<div>and<span>elements- text enclosed in
<div>and<span>elements - header elements, e.g.,
<h3>
-
There are several help texts to translate that are enclosed in
<p>tags in the bottom half of theindex.htmldocument.- Text enclosed in the
titletag of a<span>element must be written in a single line (no line breaks) to render properly. - Please leave the GISAID Acknowledgements statement: "We gratefully acknowledge all the Authors" in its original English.
- Text enclosed in the
Development of CoVizu is primarily being carried out on workstations and servers running Ubuntu 16.04+. However, we have also run the system on desktop computers running macOS 10.13. Most web development is tested in Google Chrome.
-
Use four spaces to indent, and other conventions described in the PEP8 style guide. It is easier to use a Python-aware IDE like PyCharm or Atom to automate this for you.
-
Organize your code into functions to facilitate testing and so that methods can be called from other scripts.
-
Isolate the main loop of your code under
if __name__ == '__main__'to be executed only if the script is being run at the top level (from the command line). -
Try to use
argparseto provide help documentation for command line execution. -
Use lowercase with underscores to separate words for function and variable names. Do not use camel-case.
-
Every function should open with a docstring. If the function is very brief with a small number of self-explanatory arguments, then a one-line docstring is fine. Otherwise, use a multi-line docstring. Use
:param varname: descriptionentries to document arguments. Use:return: type, descriptionentries to document return values.
- Do not push commits to the
masterbranch. All development should be tracked in thedevbranch and then merged intomasterafter it has been tested. - If you are trying to implement something new that can potentially break parts of the code that other developers may be working on, then create a new branch and merge it into
devafter you have finished building and testing the code. - Please try to write concise and informative commit messages.
- Front-end testing is carried out using Cypress.
- For the purposes of this project, Cypress needs to be installed via direct download. An installation guide can be found here.
- The
baseUrlis currently set as"http://127.0.0.1:8001/. Changes to it can be made inCypress.json.
We follow semantic versioning specifications.
The version number (MAJOR.MINOR.PATCH) consist of the:
MAJORversion - For changes that break backward compatibility. For example, modifying the JSON data structure required for running the front-end of CoVizuMINORversion - For backwards compatible features additions and other minor changes such as modifying documentationPATCHversion - For backwards compatible bug fixes
When opening a pull request, please specify the type of change (major, minor or patch) in the title. e.g patch: bug fixes for the search interface.