Skip to content

Contributing to Punchplatform

First off, thanks for taking the time to contribute!

The following is a set of guidelines for contributing to Punchplatform and its packages, which are hosted in the Punch Organization on Thales Digital. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

I just have a question

We have different officials ways of communicating where you can find detailed answers and where our team provides helpful tips for questions.

If chat is more your speed, you can join the Punchplatform Slack team:

  • Join the Punchplatform Slack Team
    • Use the #punch channel for general questions or discussion about Punchplatform
    • Use the #dev channel for technical questions or discussion about writing or contributing to Punchplatform packages

What should I know before I get started?

Punchplatform and Packages

Punchplatform is a large project hosted on the Thales Digitial Gitlab. When you initially consider contributing to Punchplatform, you might be unsure about which of those repositories implements the functionality you want to change or report a bug for. This section should help you with that.

Punchplatform is intentionally very modular.

Here's a list of the big ones:

  • pp-analytics - All PML is in this package.
  • pp-core - Punchplatform Core! This package contains the majority of Java development.
  • pp-documentation - all user documentation is here.
  • pp-external - Punchplatform uses external packages, like Elasticsearch, Storm and Spark, this repository allows to group them together.
  • pp-grok - this package contains essential libraries shared with other packages as well as the code for parsers.
  • pp-gui - GUI development is done only in this repository.
  • pp-resources - standard parsers, one-node configurations, and standalone dashboards are in this package.
  • pp-packaging - this private depot allows the assembly of the whole punchplatform solution.

There is a little more, but this list should be a good starting point.

Package Conventions

Some conventions have been developed over time

  • Maven artefacts and distribution Packages are named pp-[package-name]

Design Decisions

When we make an important decision about how to maintain the project and what we can not support, we document it in the design-decisions section. If you have a question about how we do things, check if it's there. If this is not a topic, please open a new topic on Service Desk, the official Punchplatform discussion service and ask your question.

How Can I Contribute?

Reporting Bugs

This section guides you through submitting a bug report for Punchplatform. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.

Before creating bug reports, please check this list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible. Fill out as completely as possible the Jira form, the information it asks for helps us resolve issues faster.

Note: If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.

Before Submitting A Bug Report

  • If the git repository related to your problem has a README with a debugging section, check if this enables you to investigate yourself. You might be able to find the cause of the problem and fix things yourself. Most importantly, check if you can reproduce the problem in the latest version of Punchplatform, if the problem happens when you run Punchplatform in safe mode, and if you can get the desired behavior by changing Punchplatform's or packages' config settings.
  • Check the troubleshooting section of this documentation for a list of common questions and problems.
  • Determine which repository the problem should be reported in.
  • Perform a cursory search to see if the problem has already been reported. If it has and the issue is still open, add a comment to the existing issue instead of opening a new one.

How Do I Submit A (Good) Bug Report?

Bugs are tracked as Service Desk. After you have determined which repository your bug is related to, create an issue on that repository and provide the following information to explain the problem and include additional details to help maintainers reproduce the problem:

  • Use a clear and descriptive title for the issue to identify the problem.
  • Describe the exact steps which reproduce the problem in as many details as possible. For example, start by explaining how you started Punchplatform, e.g. which command exactly you used in the terminal, or how you started Punchplatform otherwise. When listing steps, don't just say what you did, but explain how you did it. For example, if you moved the cursor to the end of a line, explain if you used the mouse, or a keyboard shortcut or an Punchplatform command, and if so which one?
  • Provide specific examples to demonstrate the steps. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use Markdown code blocks.
  • Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
  • Explain which behavior you expected to see instead and why.
  • Include screenshots and animated GIFs which show you following the described steps and clearly demonstrate the problem. If you use the keyboard while following the steps, record the GIF with the Keybinding Resolver shown. You can use this tool to record GIFs on macOS and Windows, and this tool or this tool on Linux.
  • If you're reporting that Punchplatform crashed, include a crash report with a stack trace from the operating system. On macOS, the crash report will be available in Console.app under "Diagnostic and usage information" > "User diagnostic reports". Include the crash report in the issue in a code block, a file attachment, or put it in a gist and provide link to that gist.
  • If the problem is related to performance or memory, include a CPU profile capture with your report.
  • If the problem wasn't triggered by a specific action, describe what you were doing before the problem happened and share more information using the guidelines below.

Provide more context by answering these questions:

  • Can you reproduce the problem ?
  • Did the problem start happening recently (e.g. after updating to a new version of Punchplatform) or was this always a problem?
  • If the problem started happening recently, can you reproduce the problem in an older version of Punchplatform? What's the most recent version in which the problem doesn't happen? You can download older versions of Punchplatform from Download page.
  • Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens.
  • If the problem is related to working with files (e.g. opening and editing files), does the problem happen for all files and projects or only some? Does the problem happen only when working with local or remote files (e.g. on network drives), with files of a specific type (e.g. only JavaScript or Python files), with large files or files with very long lines, or with files in a specific encoding? Is there anything else special about the files you are using?

Include details about your configuration and environment:

  • Which version of Punchplatform are you using? You can get the exact version by running punchplatform -v in your terminal, or by starting Punchplatform and running the Application: About command from the Command Palette.
  • What's the name and version of the OS you're using?
  • Are you running Punchplatform in a virtual machine? If so, which VM software are you using and which operating systems and versions are used for the host and the guest?
  • Which packages do you have used (developer only)?
  • Are you using local configuration files deploymen-settings.json, punchplatform.properties, channels, parsers to customize Punchplatform? If so, provide the contents of those files, preferably in a code block or with a link to a gist.
  • Which keyboard layout are you using? Are you using a US layout or some other layout?

Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for Punchplatform, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions :mag_right:.

Before creating enhancement suggestions, please check this list as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please include as many details as possible. Includes the steps that you imagine you would take if the feature you're requesting existed.

Before Submitting An Enhancement Suggestion

How Do I Submit A (Good) Enhancement Suggestion?

Enhancement suggestions are tracked as Jira issues. After you've determined which repository your enhancement suggestion is related to, create an issue on that repository and provide the following information:

  • Use a clear and descriptive title for the issue to identify the suggestion.
  • Provide a step-by-step description of the suggested enhancement in as many details as possible.
  • Provide specific examples to demonstrate the steps. Include copy/pasteable snippets which you use in those examples, as Markdown code blocks.
  • Describe the current behavior and explain which behavior you expected to see instead and why.
  • Include screenshots or animated GIFs which help you demonstrate the steps or point out the part of Punchplatform which the suggestion is related to. You can use this tool to record GIFs on macOS and Windows, and this tool or this tool on Linux.
  • Explain why this enhancement would be useful to most Punchplatform users and isn't something that can or should be implemented as a community package.
  • List some other text editors or applications where this enhancement exists.
  • Specify which version of Punchplatform you're using. You can get the exact version by running punchplatform -v in your terminal.
  • Specify the name and version of the OS you're using.

Development Strategy

The punchplatform team follows a trunk base development process. The most important observation is the following:

Quote

Branches create distance between developers and we do not want that

In a nutshell, there is a single branch. We commit often, we do not stop coding whenever a release approaches, the single branch is always release ready, and all developers run the build locally.

Make sure you read the trunk based developments observed habits.

Local development

Punchplatform Core and all packages can be developed locally. For instructions on how to do this, see the following sections in the Punchplatform Core repository:

Pull Requests

The process described here has several goals:

  • Maintain Punchplatform's quality
  • Fix problems that are important to users
  • Engage the community in working toward the best possible Punchplatform
  • Enable a sustainable system for Punchplatform's maintainers to review contributions

Please follow these steps to have your contribution considered by the maintainers:

  1. Follow the styleguides
  2. After you submit your pull request, verify that all status checks are passing.

What if the status checks are failing?

If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated. A maintainer will re-run the status check for you. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite.

While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted.

Contributing Documentation Changes

To propose a change to release documentation (that is, docs that appear under https://doc.punchplatform.com/), edit the Markdown source files in pp-documentation repository, whose README file shows how to build the documentation locally to test your changes. The process to propose a doc change is otherwise the same as the process for proposing code changes below.

Styleguides

Git Commit Messages

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 72 characters or less
  • Consider starting the commit message with the reference issues and title

Language Styleguide

Please refer to the for Java Styleguide, Bash Styleguide, and JS Styleguide

Documentation Styleguide

Read the Punchplatform Contributing guide.