Skip to content

Latest commit

 

History

History
277 lines (186 loc) · 10.9 KB

CONTRIBUTING.adoc

File metadata and controls

277 lines (186 loc) · 10.9 KB

Contributing to this project

Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved.

Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features.

Building the specification document

The FMI Specification is written in AsciiDoc, a plain-text mark-up format that can be converted to HTML, PDF and other formats.

If you havn’t already done so clone the repository with

git clone https://github.com/modelica/fmi-standard.git

or your favorite Git client. To build the HTML document you have two alternatives.

Alternative 1: Docker (recommended)

  1. Install Docker

  2. Run the Asciidoctor Docker Container

    docker run -it -v <fmi-standard>:/documents/ asciidoctor/docker-asciidoctor

    where <fmi-standard> is the path to the cloned repository

  3. Generate the HTML document

    asciidoctor -B /documents/ -b html5 docs/fmi_specification.adoc

Alternative 2: Ruby and the AsciiDoctor gem

  1. Install Ruby

  2. Install the AsciiDoctor Ruby gem

  3. Generate the HTML document

    asciidoctor -B <fmi-standard> -b html5 docs/fmi_specification.adoc

    where <fmi-standard> is the path to the cloned repository

The generated docs/fmi_specification.html can be viewed with any modern web browser.

Using the issue tracker

The issue tracker is the preferred channel for Bug reports, Feature requests and submitting Pull requests, but please respect the following restrictions:

  • Please do not use the issue tracker for personal support requests (use Stack Overflow).

  • Please do not derail or troll issues. Keep the discussion on topic and respect the opinions of others.

Bug reports

A bug is a demonstrable problem that is caused by the code in the repository. Good bug reports are extremely helpful - thank you!

Guidelines for bug reports:

  1. Use the GitHub issue search — check if the issue has already been reported.

  2. Check if the issue has been fixed — try to reproduce it using the latest master or development branch in the repository.

  3. Isolate the problem — create a reduced test case or example.

A good bug report shouldn’t leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and OS experience the problem? What would you expect to be the outcome? All these details will help people to fix any potential bugs.

Example:

Short and descriptive example bug report title

A summary of the issue and the platform/OS environment in which it occurs. If
suitable, include the steps required to reproduce the bug.

1. This is the first step
2. This is the second step
3. Further steps, etc.

`<url>` - a link to the reduced test case

Any other information you want to share that is relevant to the issue being
reported. This might include the lines of code that you have identified as
causing the bug, and potential solutions (and your opinions on their
merits).

Feature requests

Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It’s up to you to make a strong case to convince the project’s developers of the merits of this feature. Please provide as much detail and context as possible.

Commit messages

Please follow the seven rules of a great Git commit message when committing your changes:

  • Separate subject from body with a blank line

  • Limit the subject line to 50 characters

  • Capitalize the subject line

  • Do not end the subject line with a period

  • Use the imperative mood in the subject line

  • Wrap the body at 72 characters

  • Use the body to explain what and why vs. how

For example:

Summarize changes in around 50 characters or less

More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of the commit and the rest of the text as the body. The
blank line separating the summary from the body is critical (unless
you omit the body entirely); various tools like `log`, `shortlog`
and `rebase` can get confused if you run the two together.

Explain the problem that this commit is solving. Focus on why you
are making this change as opposed to how (the code explains that).
Are there side effects or other unintuitive consequences of this
change? Here's the place to explain them.

Further paragraphs come after blank lines.

 - Bullet points are okay, too

 - Typically a hyphen or asterisk is used for the bullet, preceded
   by a single space, with blank lines in between, but conventions
   vary here

If you use an issue tracker, put references to them at the bottom,
like this:

Resolves: #123
See also: #456, #789

Pull requests

Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.

Please ask first before embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project’s developers might not want to merge into the project.

Please adhere to the coding conventions used throughout a project (indentation, accurate comments, etc.) and any other requirements (such as test coverage).

Follow this process if you’d like your work considered for inclusion in the project:

  1. Fork the project, clone your fork, and configure the remotes:

    # Clone your fork of the repo into the current directory
    git clone https://github.com/<your-username>/<repo-name>
    # Navigate to the newly cloned directory
    cd <repo-name>
    # Assign the original repo to a remote called "upstream"
    git remote add upstream https://github.com/<upstream-owner>/<repo-name>
  2. If you cloned a while ago, get the latest changes from upstream:

    git checkout <dev-branch>
    git pull upstream <dev-branch>
  3. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix:

    git checkout -b <topic-branch-name>
  4. Commit your changes in logical chunks. Please adhere to the above rules when crafting Commit messages or your code is unlikely be merged into the main project. Use Git’s interactive rebase feature to tidy up your commits before making them public.

  5. Locally merge (or rebase) the upstream development branch into your topic branch:

    git pull [--rebase] upstream <dev-branch>
  6. Push your topic branch up to your fork:

    git push origin <topic-branch-name>
  7. Open a Pull Request with a clear title and description.

IMPORTANT: By submitting a patch, you agree to allow the project owner to license your work under the same license as that used by the project.

Branching and versioning

We use a branching scheme with support and feature branches that allows us to maintain multiple major and minor releases concurrently.

Main development branch master

Holds the latest development version. This is where the next version of the standard is developed.

Feature branches feature/<name>

New features are developed on feature branches that branch from and are merged back into master.

Example: feature/hybrid-co-simulation

Support branches support/v<major>{.<minor>}.x

Upon every major release the latest version of master is tagged v<major>.0. The maintenance of this release is performed on a support branch v<major>.x starting at this tag. This process is repeated for minor and patch releases.

Examples: support/v3.x, support/v2.0.x

Tags v<major>.<minor>{.<patch>}{-{alpha|beta|rc}.<number>}

Releases and pre-releases are tagged on the respective branches following the Semantic Versioning.

Examples: v3.0-alpha.3, v3.0-beta.2, v3.0-rc.1, v3.0

master
  |
  +--->+ branch "support/v2.0.x", tag "v2.0.1"
  |    |
  |    + tag "v2.0.2"
  |
  +<--- merge PR "fix-typo-in-fmi-spec"
  |
  +--->+ branch "feature/arrays"
  |    |
  +<---+ merge "feature/arrays"
  |
  +--->+ branch "support/v3.x", tag "v3.0"
  |    |
  |    +--->+ branch "support/v3.0.x", tag "v3.0.1"
  |    |    |
  |    |    + tag "v3.0.1"
  |    |
  |    + tag "v3.1"
  |    |
  .    .
  .    .

Corporate Contributor License Agreement

All contributors have to sign the Corporate Contributor License Agreement (CCLA). Therefore, the first step is getting your company to agree and sign the CCLA. The CCLA ensures that all IP contributed to the FMI standard will be licensed to the Modelica Association (MA) which in turn will sublicense the FMI standard to tool vendors implementing it and end users using it, free of charge.

Formatting rules

When writing or editing the specification documents please follow the AsciiDoc Recommended Practices, particularly:

Source code

Only the following strings are formatted as literals (using surrounding back ticks):

  • source, markup and pseudo code (and parts thereof)

  • file names and paths

Quotes must only be included if they are part of the original source or markup code.

Adding and editing figures

The figures in the document should be provided as SVGs (Scalable Vector Graphics) and stored in docs/images. We use draw.io to create and edit the figures. When you have created or edited a figure

  • select File > Export as > SVG…​

  • check Transparent Background

  • uncheck Include a copy of my diagram

to export the SVG that can be embedded into the AsciiDoc document. Make sure you also save the original file using File > Save as…​ with the same name as the SVG (file extension .xml) and commit the files together.