(Based on the ATOM Contributor Guidelines)
Many thanks for considering contributing to Sealog-Server.
I don't want to read this whole thing, I just have a question!!!
What should I know before I get started?
This project and everyone participating in it is governed by the Sealog Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to oceandatatools@github.com.
Sealog is largely a volunteer effort. Most folks involved in the project have demanding day jobs and are supporting the code in their spare time. They may not be able to respond quickly and comprehensively to every question.
The Sealog architecture is intended to be modular, extensible and as vessel/vehicle-independent as practical. Contributors should consider how their proposed changes will affect the core system functionality
This section guides you through submitting a bug report for Sealog. 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 the required template, 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.
- 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.
Bugs are tracked as GitHub issues. 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.
- 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.
- If the problem is related to performance or memory, include a CPU profile capture if able.
- 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:
- Did the problem start happening recently (e.g. after updating to a new version) or was this always a problem?
- Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens.
Include details about your configuration and environment:
- Which version of the code are you using?
- What's the name and version of the OS you're using?
- Are you running Sealog-Server 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?
This section guides you through submitting an enhancement suggestion for Sealog-Server, 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. Fill in the template, including the steps that you imagine you would take if the feature you're requesting existed.
- Perform a cursory search to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
Enhancement suggestions are tracked as GitHub 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.
- Explain why this enhancement would be useful to Sealog users.
Unsure where to begin contributing to Sealog? You can start by looking through these good first issue
and help-wanted
issues:
- Good first issue - 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.
Once you have selected an issue to work on, say 'issue 57', check out the dev
branch and create from it a new branch with the name of the issue you've selected:
git branch issue_57
git checkout issue_57
The expectation will be that when your contribution is ready, it will be merged back into the dev
branch. The dev
branch will be merged into the master
branch when new numbered versions are released.
Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:
$ git commit -m "A brief summary of the commit
>
> A paragraph describing what changed and its impact."
Please send a GitHub Pull Request to opengovernment with a clear list of what you've done (read more about pull requests). When you send a pull request, we will love you forever if you include examples. We can always use more test coverage. Please follow our coding conventions (below) and make sure all of your commits are atomic (one feature per commit).
All JavaScript must adhere to JavaScript Standard Style.
-
Prefer the object spread operator (
{...anotherObj}
) toObject.assign()
-
Inline
export
s with expressions whenever possible// Use this: export default class ClassName { } // Instead of: class ClassName { } export default ClassName
-
Place class properties in the following order:
- Class methods and properties (methods starting with
static
) - Instance methods and properties
- Class methods and properties (methods starting with
-
Use
count + 1
instead ofcount+1
-
Use spaces after commas (unless separated by newlines)
-
Use parentheses if it improves code clarity.
-
Prefer alphabetic keywords to symbolic keywords:
a is b
instead ofa == b
-
Avoid spaces inside the curly-braces of hash literals:
{a: 1, b: 2}
instead of{ a: 1, b: 2 }
-
Include a single line of whitespace between methods.
-
Capitalize initialisms and acronyms in names, except for the first word, which should be lower-case:
getURI
instead ofgetUri
uriToOpen
instead ofURIToOpen
-
Use
slice()
to copy an array -
Add an explicit
return
when your function ends with afor
/while
loop and you don't want it to return a collected array. -
Use
this
instead of a standalone@
return this
instead ofreturn @
-
Place class properties in the following order:
- Class methods and properties (methods starting with a
@
) - Instance methods and properties
- Class methods and properties (methods starting with a
- With few exceptions, we try to adhere to the Google Python Style Guide
- Exceptions include:
- We prefer two-space indentation to four-space indentation.
- All unqualified imports (
import foo
) are clustered alphabetically before qualified imports (from foo import bar
).
- Do not mix styles: when editing a pre-existing file, strive for consistency with the file's style over adherence with the Style Guide.
- Use Markdown.
- Reference methods and classes in markdown with the custom
{}
notation:- Reference classes with
{ClassName}
- Reference instance methods with
{ClassName::methodName}
- Reference class methods with
{ClassName.methodName}
- Reference classes with