<commit_before># Implementing a new GSIM in the OpenQuake hazard library [provisional]

Below we provide a concise description of the process to be adopted for the creation of a new GSIM (i.e. GMPE or IPE) in the OpenQuake hazard library.

- Fork the oq-engine master
https://help.github.com/articles/fork-a-repo

- Implement the new GMPE using as an example a GMPE already in the oq-engine whose functional form is similar to the new GMPE.
https://github.com/gem/oq-engine/tree/master/openquake/hazardlib/gsim

- Create verification tables following the examples that you find here:
https://github.com/gem/oq-engine/tree/master/openquake/hazardlib/tests/gsim/data
Usually we create verification tables using an independent code provided by the original authors of the new GMPE. If this is not possible - if available - we use  an independent implementation available within code accessible on the web.

- Create tests for the new GMPE using the examples available here 
https://github.com/gem/oq-engine/tree/master/openquake/hazardlib/tests/gsim

- When tests are passing, update the forked repository, rerun test and if everything is still them open a pull request. To run the full suite of tests you must open a terminal and run the commands:

```bash
cd oq-engine;
nosetests -vsx openquake.hazardlib
```

- Create a new .rst file (needed to generate automatically documentation) in this directory (several examples available):
https://github.com/gem/oq-engine/tree/master/doc/sphinx/gsim

- Check that the new code fulfils PEP8 standards (usually we do this using tools such as flake8 https://pypi.python.org/pypi/flake8) 
http://legacy.python.org/dev/peps/pep-0008/
<commit_msg>Fixed a documentation link [skip CI]<commit_after># Implementing a new GSIM in the OpenQuake hazard library [provisional]

Below we provide a concise description of the process to be adopted for the creation of a new GSIM (i.e. GMPE or IPE) in the OpenQuake hazard library.

- Fork the oq-engine master
https://help.github.com/articles/fork-a-repo

- Implement the new GMPE using as an example a GMPE already in the oq-engine whose functional form is similar to the new GMPE.
https://github.com/gem/oq-engine/tree/master/openquake/hazardlib/gsim

- Create verification tables following the examples that you find here:
https://github.com/gem/oq-engine/tree/master/openquake/hazardlib/tests/gsim/data
Usually we create verification tables using an independent code provided by the original authors of the new GMPE. If this is not possible - if available - we use  an independent implementation available within code accessible on the web.

- Create tests for the new GMPE using the examples available here 
https://github.com/gem/oq-engine/tree/master/openquake/hazardlib/tests/gsim

- When tests are passing, update the forked repository, rerun test and if everything is still them open a pull request. To run the full suite of tests you must open a terminal and run the commands:

```bash
cd oq-engine;
nosetests -vsx openquake.hazardlib
```

- Update the following .rst file (needed to generate automatically documentation):
https://github.com/gem/oq-engine/blob/master/doc/sphinx/openquake.hazardlib.gsim.rst
- Check that the new code fulfils PEP8 standards (usually we do this using tools such as flake8 https://pypi.python.org/pypi/flake8) 
http://legacy.python.org/dev/peps/pep-0008/

{'fraction_non_alphanumeric': 0.07500741179958494, 'fraction_numerical': 0.004150607767565965, 'mean_word_length': 4.255451713395638, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2106438', 'n_tokens_mistral': 1021, 'n_tokens_neox': 969, 'n_words': 411}