Skip to content

Commit

Permalink
Merge pull request #235 from OasisLMF/contributions2
Browse files Browse the repository at this point in the history
Revised contributing guidelines
  • Loading branch information
johcarter authored Dec 19, 2024
2 parents 25e99f4 + f6b8994 commit 8c34777
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 64 deletions.
79 changes: 18 additions & 61 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,29 @@
# Welcome to OasisLMF contributing guide :wave:
# How to contribute to the Open Exposure Data Standard

Thank you for investing your time in contributing to this project!
There are a variety of ways in which you can contribute to the development
and adoption of the OED standard.

<!-- Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectable. -->
We recommend that before contributing you:

In this guide you will get an overview of the coding style that we follow and of the contribution workflow from opening an issue, creating a pull request (PR), reviewing, and merging the PR.
* Review the [OED documentation](Docs/) which provides an overview of the standard and introduces key concepts and terminology.
* Review the OED specification which contains the main data components, field lists and valid values.
* [Excel version](README.md#releases)
* [Csv version](OpenExposureData/)
* Review the [governance and release processes](Docs/ODS_Gov_Updates_Release_Processes_v1.1.pdf) documentation so that you are familiar with our processes for agreeing changes and releasing updates.

## Proposing changes

## Coding principles
If you would like to propose a change to the standard then you can do this by [submitting an issue](https://github.com/OasisLMF/ODS_OpenExposureData/issues). For instance:

The goal of the these coding guidelines is to ensure that the OasisLMF repositories are highly maintainable, well documented, and well structured.
* if you have noticed an error in the specification or documentation.
* if you have a proposal for revising or extending the standard.

Please adhere to the following principles when contributing to the code base:
We recommend filing an issue as the first step, so that fixes and changes can be discussed with the community.

- be **DRY** (aka Don't Repeat Yourself): avoid code duplication as much as possible. If an element (variable, constant, data type, function, etc.) is already defined somewhere else in the package, then re-use or augment the existing definition.

- add proper **documentation** to the code:
- on general terms, we follow the Google Python Style Guide for comments and docstrings: see [Chapter 3.8](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings).
- all functions must have a docstring describing their purpose, the data type and the content of all input and output variables. Where external results (e.g., specific algorithms) are used, a short note or reference to the external source should be included.
- the docstrings need to be concise and essential, yet complete.
- in functions implementing non-trivial logic and/or complex algorithms, the code should be annotated with short and informative comments making clear the logic and the flow, and the reasoning behind non-obvious implementation decisions.

- format the code to make it **PEP8 compliant**. This is easily done with tools like `autopep8`: see how to use formatters in [VS code](https://code.visualstudio.com/docs/python/editing#_formatting) and [PyCharm](https://www.jetbrains.com/help/pycharm/reformat-and-rearrange-code.html).

When in doubt about the style, have a look at the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html): it contains PEP-compliant style recommendations and examples.
Changes will be carried out in line with our [governance and release processes](Docs/ODS_Gov_Updates_Release_Processes_v1.1.pdf).

Code that doesn't follow the above principles shall not be merged into the codebase.
Please note that any proposed changes or data contributions you make must be done so under a CC0 1.0 Universal licence.

## Getting started

### Issues

**Create a new issue:** if you spot a problem with the code or the docs, search if an issue already exists in that repository. For example, for the OasisLMF/OasisLMF repository, see the [existing issues here](https://github.com/OasisLMF/OasisLMF/issues). If a related issue doesn't exist, you can open a new issue.

**Solve an issue:** scan through our existing issues to find one that interests you. You can narrow down the search using `labels` as filters. If you find an issue to work on, you are welcome to open a PR with a fix.

### Make Changes

1. [Install `git`](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).

2. Fork the repository.
- Using GitHub Desktop:
- [Getting started with GitHub Desktop](https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop) will guide you through setting up Desktop.
- Once Desktop is set up, you can use it to [fork the repo](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)!

- Using the command line:
- [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.

3. Create a working branch and start with your changes!

### Commit your update

Commit and push the changes once you are happy with them.

### Pull Request

When you're finished with the changes, create a pull request, also known as a PR.
- Fill the PR template in all its parts.
- As a general rule, the **develop** branch is the target of all PRs for new features or bugfixes.
- Add the "Ready for Review" label to this PR.
- Don't forget to [link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if you are solving one.
- Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge.
Once you submit your PR, a Docs team member will review your proposal. We may ask questions or request additional information.
- We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch. In many cases, we can help by implementing the required changes ourselves.
- As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations).
- If you run into any merge issues, checkout this [git tutorial](https://github.com/skills/resolve-merge-conflicts) to help you resolve merge conflicts and other issues.

### Your PR is merged!

Congratulations :tada::tada: The OasisLMF team thanks you :sparkles:.
## Promoting the standard

You can also contribute to making the standard a success by promoting it within your team, organisation or community.
2 changes: 1 addition & 1 deletion OpenExposureData/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

The csv files in this folder are the "source of truth" of the specification of the Open Exposure Data Standard.
The csv files in this folder are the "source of truth" of the specification of the Open Exposure Data Standard. For each release, an excel workbook is generated from the csv files with each of the tables listed below appearing in separate tabs. The excel version can be accessed from the main [README.](../README.md#releases)

## Index of files

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ and reference and background OED information can be found in the 'docs’ folder
from 3.4.1, for ease of change tracking, the fields are now describe in csv files where each file represent a sheet in the previous xlsx version.
those can be found directly in the OpenExposureData folder (https://github.com/OasisLMF/ODS_OpenExposureData/tree/develop/OpenExposureData).

Those csv files use the minimal quoting rule
(only quote those fields which contain special characters such as delimiter, quotechar or any of the characters in lineterminator).
Those csv files use the full quoting rule (all data fields are encased in double quotes).

Examples of how to code multiple financial structures in the input files are also covered within these documents.

Expand Down

0 comments on commit 8c34777

Please sign in to comment.