Skip to content

Latest commit

 

History

History
88 lines (61 loc) · 4.41 KB

CONTRIBUTING.md

File metadata and controls

88 lines (61 loc) · 4.41 KB

Contributing to OPENRNDR

Thank you for your interest in contributing to OPENRNDR :-)

This repository contains the core engine that renders graphics to a display. The ORX extras, the guide and the template are other repositories you can contribute to.

There are various ways one can contribute:

I have an issue or request

If you are not sure whether something is an issue, you can ask in Discussions or in the forum. If it is indeed an issue, please take a quick look through the existing issues to make sure it isn't a known problem. If you can't find anything relevant to your situation, just file a new issue and fill out the issue form.

I want to contribute code

A detailed walk-through for contributing code to the OPENRNDR and ORX repositories can be found in the wiki.

Feel free to ask for advice on our forums or Slack.

Style guide

The style guide is fairly minimal, but it helps to spell it out regardless:

  • Code: There currently isn't a strict style guide on the code, just try to follow the IntelliJ default formatting for Kotlin.
  • Commit messages: It's preferable to make your commit messages relevant to the changes you make. Although it's not unusual for the commits to be squashed when merging a pull request.

Writing tests

While writing tests is not mandatory, it is highly encouraged.

These following libraries are currently in use for testing:

We're in the process of removing Spek and Kotest as they add very little in value to testing. When writing new tests, you should prefer using kotlin.test and Kluent if needed. You may need to make some changes in the build.gradle file to accommodate this. Take a look at openrndr-svg's build.gradle.kts for an example.

I want to contribute to the documentation

There are various places where you can contribute without writing code. It will be greatly appreciated by others trying to learn about OPENRNDR.

Guide

The guide is the first contact with OPENRNDR for most users. Learn how to work on the guide.

API page

The API page needs some love too. The content is automatically extracted from comments written in OPENRNDR's source code. It goes like this:

  1. Fork the OPENRNDR repo, then clone your fork (so you have a copy on your computer) and get familiar with OPENRNDR.
  2. Find an undocumented section at https://api.openrndr.org you want to explain.
  3. Find the corresponding Kotlin file in your cloned repo and add missing comments. Read about the suggested style.
  4. Generate the API website locally to verify your changes look correct by running the following command: ./gradlew dokkaHtmlMultiModule -Dorg.gradle.jvmargs=-Xmx1536M. This will create the html documentation under build/dokka/htmlMultiModule/.
  5. Open the build/dokka/htmlMultiModule/index.html in your web browser. If something looks off tweak your comments.
  6. To continue improving the API go back to step 3, otherwise send a Pull Requests from your fork.

I want to contribute demos

Small programs can help others understand how features works. There are various locations where one can find such demos:

Ideally demos are small, limited in scope and present a new aspect or usage of a core feature or orx. Feel free to send pull requests with your demos.