Skip to content

Latest commit

 

History

History
396 lines (319 loc) · 40.5 KB

CONTRIBUTING.md

File metadata and controls

396 lines (319 loc) · 40.5 KB

Contributing to Dynamic Reports

👍🎉 First off, thanks for taking the time to contribute! 🎉👍

The following is a set of guidelines for contributing to DynamicReports, which is hosted in the Dynamic Reports Organization on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

Table Of Contents

Code of Conduct

What should I know before I get started?

[How Can I Contribute?](#How Can I Contribute?)

Styleguides

Additional Notes

Code of Conduct

This project and everyone participating in it is governed by the Dynamic Reports Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

What should I know before I get started?

Java and OOP

This project is largely built on java, but it contains occasional use of groovy here and there. Eloquence in famous GOF patterns is essential not only in making the source easily maintainable and scalable but also it would enable easy comprehension and correspondence. As we go functional constructs are also encouraged over declarative approaches, though over-use beats the purpose, that being comprehension. We would accept easily understandable "average-performance" code, over obfuscated high-performance code any day.

Apache POI Library

This library abstracts implementations for accessing and editing microsoft excel data, although eloquence in this library is not strictly necessary since it is abstracted by the Jasper Reports library, it might still go a long way in understanding the internals

Jasper Reports Library

This is a collection of libraries well known to do what this library is already doing except that this has to be done at compile time, or with xml files.

JAXB api

Dynamic reports behaves dynamically to the end user, but underneath all that, it uses the jasper reports engine which is static. Inorder to adhere to its dynamic nature configurations the dynamic reports uses the JAXB api for marshalling and unmarshalling configurations at runtime. This introduces a number of complexities which are mainly because the build could suddenly not contain the classes on which the api, depends. JAXB engines create classes and xml files which are not in the version control. Therefore the following conventions are encouraged:

  • Before running tests in the modules other than the core module please run compilation("mvn clean compile") on the core module first
  • If you are generating documentation using the "source-10" profile, also run the compilation on the core module first

Dynamic Reports Design Decisions

When we make a significant decision in how we maintain the project and what we can or cannot support, we will document it in the dynamicreports/design-decisions repository. If you have a question around how we do things, check to see if it is documented there. There is an excel file in the repository, containing matters about the way forward. However more details views of what is going on can be accessed at the projects page

How Can I Contribute?

Reporting Bugs

This section guides you through submitting a bug report for Dynamic Reports. 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](#How to I submit a good bug report?). Fill out [the required template](https://github.com/dynamicreports/dynamicreports/blob/master/ .github/ISSUE_TEMPLATE/standard-issue-template.md), 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

  • Check the debugging guide (work in progress)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 dynamic reports, and if you can get the desired behavior by changing local build of the source code.
  • Check the FAQs on the forum (coming soon) for a list of common questions and problems.
  • 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 to I submit a good bug report?

Bugs are tracked as GitHub issues. After you've done some debuging and cursory search, create an issue on the repository and provide the following information by filling in the template.

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. When listing steps, don't just say what you did, but show how you did it. For example, include a snippet of the offending code.
  • 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 the report generated with misaligned, or misconfigured or erroneous. If on windows 7+, we would love you to reproduce the bug, while running the problem recorder.
  • If you're reporting that dynamic reports crashed, include a crash report with the full java stack trace from the operating system, console or IDE. 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 in a different version of java runtime environment?
  • Did the problem start happening recently (e.g. after updating to a new version of dynamic reports) or was this always a problem?
  • If the problem started happening recently, can you reproduce the problem in an older version of dynamic reports? What's the most recent version in which the problem doesn't happen?
  • If the problem started happening recently, Is there a library you have added to your project recently? What is the name and version of that library, and what was it supposed to do?
  • 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 excel or word 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? Are they password protected? Which algorithm did you use to encrypt it?

Include details about your configuration and environment:

  • Which version of dynamic reports are you using?
  • What's the name and version of the OS you're using?
  • Are you running dynamic reports in a virtual machine or docker container? If so, which VM software are you using and which operating systems and versions are used for the host and the guest?
  • Are you using dynamic reports with multiple monitors? If so, can you reproduce the problem when you use a single monitor?
  • Which version of microsoft office were your generating? Is it the office 2003 or 2007

Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for dynamicreports, 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 🔎.

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](#How Do I Submit A Good Enhancement Suggestion?). Fill in the template, including 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 GitHub issues. After you've determined which module 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 and animated GIFs which help you demonstrate the steps or point out the part of DynamicReports 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 DynamicReports users and isn't something that can or should be implemented as a module.
  • List some other reporting libraries (in any programming language) or applications where this enhancement exists.
  • Specify which version of DynamicReports you're using. You can get the exact version by checking version number in the library's project's object model (pom)
  • Specify the name and version of the OS you're using.

Your First Code Contribution

Unsure where to begin contributing to DynamicReports? You can start by looking through these beginner and help-wanted issues:

  • Beginner issues - issues which should only require a few lines of code, and a test or two.
  • Help wanted issues - issues which should be a bit more involved than beginner issues.

Both issue lists are sorted by total number of comments. While not perfect, number of comments is a reasonable proxy for impact a given change will have.

If you want to read about using DynamicReports, the usage examples are available online.

Local development

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

  • [What I need to know before I get started](#What should I know before I get started?)
  • Watch this space...

Pull Requests

  • Fill in the required template
  • Do not include issue numbers in the PR title
  • Include screenshots and animated GIFs in your pull request whenever possible.
  • Follow the google java style guide.
  • Include thoughtfully-worded, well-structured unit tests folders. Run them using mvn clean compile && mvn test.
  • Document new code based on the Documentation Styleguide
  • Avoid platform-dependent code.
  • Disclose the additional libraries included and make a case for them. We would like to keep this library lean.
  • Place class properties in the following order:
    • Static Class methods and properties (methods or properties with static keyword in they signature)
    • Instance methods and properties

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
  • Reference issues and pull requests liberally after the first line
  • When only changing documentation, include [ci skip] in the commit title
  • Consider starting the commit message with an applicable emoji:
    • 🎨 :art: when improving the format/structure of the code
    • 🐎 :racehorse: when improving performance
    • 🚱 :non-potable_water: when plugging memory leaks
    • 📝 :memo: when writing docs
    • 🐧 :penguin: when fixing something on Linux
    • 🍎 :apple: when fixing something on macOS
    • 🏁 :checkered_flag: when fixing something on Windows
    • 🐛 :bug: when fixing a bug
    • 🔥 :fire: when removing code or files
    • 💚 :green_heart: when fixing the CI build
    • 🔨 :hammer: when fixing the project object model configurations (pom)
    • :white_check_mark: when adding tests
    • 🔒 :lock: when dealing with security
    • ⬆️ :arrow_up: when upgrading dependencies
    • ⬇️ :arrow_down: when downgrading dependencies
    • 👕 :shirt: when removing linter warnings
    • 🚢 :ship: when adding or removing code that could affect portability

Java Styleguide

All Java code must adhere to google java style guide.

XML Styleguide

This project seeks to adhere to the google xml document format style guide

Tests StyleGuide

Ok, that would be a bit too much, so this speaks to concept, approach and taste rather than style. This write up would be sufficiently eloquent on most matters pertaining to tests

Documentation Styleguide

  • Stick to the oracle javadoc guidelines. Read the documentation on javadoc tool. As for the project wide documentation project be sure to stick to the google python style guide

Logging Style Guide

There is not an agreed upon, style-for-the-masses here, neither is this to be enforced anywhere but in the application run, as you debug this library for the purposes of sending the contributors a bug report, or an enhancement suggestion, if there be logs, the following format is heartily encouraged :

%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}

If that format looks familiar, 😕 it's because it is. It's the default logback configuration in 🌱 spring-boot as of version 1.5.8.RELEASE. Logs in this format are quick to triage, but if you know of one that is even more readable 🚀 please send us a PR on this template with the format included.

Additional Notes

As you can see there is a lot of google style going on. That makes it easy to remember so next time you want to remember how to style up something, you simply "google" it (pun intended)

Issue and Pull Request Labels

This section lists the labels we use to help us track and manage issues and pull requests.

GitHub search makes it easy to use labels for finding groups of issues or pull requests you're interested in. For example, you might be interested in [open issues across dynamicreports/dynamicreports and all dynamicreports repositories which are labeled as bugs, but still need to be reliably reproduced](https://github .com/search?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+user%3Adynamicreports+label%3Abug+label%3Aneeds-reproduction) or perhaps open pull requests in dynamicreports/dynamicreports which haven't been reviewed yet. To help you find issues and pull requests, each label is listed with search links for finding open items with that label in dynamicreports/dynamicreports only and also across all DynamicReports repositories. We encourage you to read about [other search filters] (https://help.github.com/articles/searching-issues/) which will help you write more focused queries.

The labels are loosely grouped by their purpose, but it's not required that every issue have a label from every group or that an issue can't have more than one label from the same group.

Please open an issue on dynamicreports/dynamicreports if you have suggestions for new labels, and if you notice some labels are missing on some repositories, then please open an issue on that repository.

Type of Issue and Issue State

Label name dynamic/reports 🔎 dynamicreports‑org 🔎 Description
enhancement search search Feature requests.
bug search search Confirmed bugs or reports that are very likely to be bugs.
question search search Questions more than bug reports or feature requests (e.g. how do I do X).
feedback search search General feedback more than bug reports or feature requests.
help-wanted search search The DynamicReports core team would appreciate help from the community
in resolving these issues.
beginner search search Less complex issues which would be good first issues to work on for users who want to contribute to DynamicReports.
more-information-needed search search More information needs to be collected about these problems or feature requests (e.g. steps to reproduce).
needs-reproduction search search Likely bugs, but haven't been reliably reproduced.
blocked search search Issues blocked on other issues.
duplicate search search Issues which are duplicates of other issues, i.e. they have been reported before.
wontfix search search The DynamicReports core team has decided not to fix these issues for now, either because they're working as intended or for some other reason.
invalid search search Issues which aren't valid (e.g. user errors).

Topic Categories

Label name dynamicreports/dynamicreports 🔎 dynamicreports‑org 🔎 Description
windows search search Related to DynamicReports running on Windows.
linux search search Related to DynamicReports running on Linux.
mac search search Related to DynamicReports running on macOS.
documentation search search Related to any type of documentation (e.g. API documentation and the flight manual).
performance search search Related to performance.
security search search Related to security.
ui search search Related to visual design.
api search search Related to DynamicReports's public APIs.
uncaught-exception search search Issues about uncaught exceptions, normally created from the Notifications package.
crash search search Reports of DynamicReports completely crashing.
encoding search search Related to character encoding.
network search search Related to network problems or working with remote files (e.g. on network drives).
git search search Related to Git functionality (e.g. problems with gitignore files or with showing the correct file status).

dynamicreports/dynamicreports Topic Categories

Label name dynamicreports/dynamicreports 🔎 dynamicreports‑org 🔎 Description
editor-rendering search search Related to language-independent aspects of rendering text (e.g. scrolling, soft wrap, and font rendering).
build-error search search Related to problems with building DynamicReports from source.
deprecation-help search search Issues for helping package authors remove usage of deprecated APIs in packages.

Pull Request Labels

Label name dynamicreports/dynamicreports 🔎 dynamicreports‑org 🔎 Description
work-in-progress search search Pull requests which are still being worked on, more changes will follow.
needs-review search search Pull requests which need code review, and approval from maintainers or DynamicReports core team.
under-review search search Pull requests being reviewed by maintainers or DynamicReports core team.
requires-changes search search Pull requests which need to be updated based on review comments and then reviewed again.
needs-testing search search Pull requests which need manual testing.
  • Please note this guideline is borrowed from the Atom project contribution guide and still contains links to the same as it is still edits-in-progress" *