Skip to content

Commit

Permalink
Merge pull request #42 from caffeine-addictt/chore/contributing
Browse files Browse the repository at this point in the history
Chore/contributing
  • Loading branch information
caffeine-addictt authored May 1, 2024
2 parents 00806c7 + d3b298c commit 06dbda1
Show file tree
Hide file tree
Showing 9 changed files with 251 additions and 122 deletions.
51 changes: 17 additions & 34 deletions .github/CODESTYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,35 @@ remains consistent throughout all files. Please read this document in it's entir
and refer to it throughout the development of your contribution.

1. [General Guidelines](#general-guidelines)
2. [Commit Message Guidelines](#commit-message-guidelines)
3. [Markdown Guidelines](#markdown-guidelines)
2. [Markdown Guidelines](#markdown-guidelines)

## General Guidelines

Listed is a example class used demonstrate general rules you should follow throughout the development of your contribution.
Listed is a example class used demonstrate general rules you should follow
throughout the development of your contribution.

- Docstrings are to follow {{DOCSTRING_FORMAT}}
- Private attributes are to be prefixed with an underscore
We use [Prettier](https://prettier.io/) and [ESLint](https://eslint.org/)
to ensure that code is consistent and follows our [code style](./CODESTYLE.md).
Please ensure that your code passes linting before merging a Pull Request.

```
code example
```

## Commit Message Guidelines

When committing, commit messages are prefixed with one of the following depending on the type of change made.

- `feat:` when a new feature is introduced with the changes.
- `fix:` when a bug fix has occurred.
- `chore:` for changes that do not relate to a fix or feature and do not modify _source_ or _tests_. (like updating dependencies)
- `refactor:` for refactoring code that neither fixes a bug nor adds a feature.
- `docs:` when changes are made to documentation.
- `style:` when changes that do not affect the code, but modify formatting.
- `test:` when changes to tests are made.
- `perf:` for changes that improve performance.
- `ci:` for changes that affect CI.
- `build:` for changes that affect the build system or external dependencies.
- `revert:` when reverting changes.
- Docstrings are to follow [JSDoc syntax](https://jsdoc.app).
- Private attributes are to be prefixed with an underscore.

Commit messages are also to begin with an uppercase character. Below list some example commit messages.

```sh
git commit -m "docs: Added README.md"
git commit -m "revert: Removed README.md"
git commit -m "docs: Moved README.md"
```ts
/** Get a greeting string */
const myFunction = (): string => {
return 'hi';
};
```

## Markdown Guidelines

Currently, documentation for this project resides in markdown files.

- Headings are to be separated with 3 lines
- Use of HTML comments is appreciated
- Use of HTML is permitted
- [reference style links](https://www.markdownguide.org/basic-syntax/#reference-style-links) are not required by are appreciated
- Use of HTML comments is appreciated
- Exceedingly long lines are to be broken
- The indents are to be 4 spaces
- [reference style links][reference-style-links] are not required by are appreciated

```markdown
<!--example markdown document-->
Expand All @@ -79,3 +60,5 @@ anim id est laborum. found [Lorem Ipsum Generator]

[Lorem Ipsum Generator]: https://loremipsum.io/generator/
```

[reference-style-links]: https://www.markdownguide.org/basic-syntax/#reference-style-links
23 changes: 0 additions & 23 deletions .github/CONTRIBUTING.md

This file was deleted.

6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ authors:
orcid: https://orcid.org/0009-0001-1641-9397
identifiers:
- type: url
value: https://github.com/caffeine-addictt/template/releases/tag/v1.9.0
description: The GitHub release URL of tag v1.9.0.
value: https://github.com/caffeine-addictt/template/releases/tag/v1.9.1
description: The GitHub release URL of tag v1.9.1.
cff-version: 1.2.0
date-released: 2024-04-28
keywords:
Expand All @@ -19,4 +19,4 @@ message: If you use this software, please cite it using these metadata.
repository-code: https://github.com/caffeine-addictt/template
title: template
type: software
version: 1.9.0
version: 1.9.1
118 changes: 118 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# **Contributing**

When contributing to this repository,
please first discuss the change you wish to make via issue, email, or any other method
with the owners of this repository before making a change.

Please note we have a [code of conduct](./.github/CODE_OF_CONDUCT.md);
please follow it in all your interactions with the project.

## Table of Contents

<!-- prettier-ignore-start -->
<!--toc:start-->

1. [Pull Request Process](#pull-request-process)
2. [Issue Report Process](#issue-report-process)
3. [Commit Message Guidelines](#commit-message-guidelines)
4. [Code Quality](#code-quality)
- [Testing](#testing)
- [Linting](#linting)
- [Building](#building)

<!--toc:end-->
<!-- prettier-ignore-end -->

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer
when doing a build.
2. Ensure that tests and linting pass.
3. Ensure that `dist/` is updated with `npm run build`.
4. Update the README.md with details of changes to the interface;
this includes new environment variables, exposed ports,
valid file locations and container parameters.
5. Increase the version numbers in any examples files and the README.md
that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
6. You may merge the Pull Request once you have the sign-off of two other developers,
or if you do not have permission to do that, you may request the second reviewer
to merge it for you.

## Issue Report Process

1. Go to the project's issues.
2. Select the template that better fits your issue.
3. Read the instructions carefully and write within the template guidelines.
4. Submit it and wait for support.

## Commit Message Guidelines

When committing, commit messages are prefixed with one of the
following depending on the type of change made.

- `feat:` when a new feature is introduced with the changes.
- `fix:` when a bug fix has occurred.
- `chore:` for changes that do not relate to a fix or feature and do not modify
_source_ or _tests_. (like updating dependencies)
- `refactor:` for refactoring code that neither fixes a bug nor adds a feature.
- `docs:` when changes are made to documentation.
- `style:` when changes that do not affect the code, but modify formatting.
- `test:` when changes to tests are made.
- `perf:` for changes that improve performance.
- `ci:` for changes that affect CI.
- `build:` for changes that affect the build system or external dependencies.
- `revert:` when reverting changes.

Commit messages are also to begin with an uppercase character.
Below list some example commit messages.

```sh
git commit -m "docs: Added README.md"
git commit -m "revert: Removed README.md"
git commit -m "docs: Moved README.md"
```

## Code Quality

> [!IMPORTANT]
> To ensure our script can be ran directly with `Node.js`,
> without any additional install or build steps,
> the use of any external libraries or packages is not allowed.
>
> (This does not apply to development dependencies.)
To prevent any unintentional errors, we develop this project with [TypeScript](https://www.typescriptlang.org/).

### Testing

We use [Jest](https://jestjs.io/) to test our code.
Please ensure that tests are updated and pass before merging a Pull Request.

```sh
# To test your code, run:
npm run test
```

### Linting

We use [Prettier](https://prettier.io/) and [ESLint](https://eslint.org/)
to ensure that code is consistent and follows our [code style](./.github/CODESTYLE.md).
Please ensure that your code passes linting before merging a Pull Request.

```sh
# To lint your code, run:
npm run lint

# To fix any linting errors, run:
npm run lint:fix
```

### Building

We pre-transpile our code to JavaScript in the `dist/` directory.
Please ensure that the `dist/` directory is updated before merging a Pull Request.

```sh
# To build your code, run:
npm run build
```
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "repository_template",
"scripts": {
"lint": "eslint --cache .",
"lint:fix": "eslint --fix --cache .",
"lint": "eslint --cache . && prettier --cache --check .",
"lint:fix": "eslint --fix --cache . && prettier --cache --write .",
"test": "jest --passWithNoTests",
"build": "tsc --build"
},
Expand Down
48 changes: 14 additions & 34 deletions template/.github/CODESTYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,32 @@ remains consistent throughout all files. Please read this document in it's entir
and refer to it throughout the development of your contribution.

1. [General Guidelines](#general-guidelines)
2. [Commit Message Guidelines](#commit-message-guidelines)
3. [Markdown Guidelines](#markdown-guidelines)
2. [Markdown Guidelines](#markdown-guidelines)

## General Guidelines

Listed is a example class used demonstrate general rules you should follow throughout the development of your contribution.
Listed is a example class used demonstrate general rules you should follow
throughout the development of your contribution.

- Docstrings are to follow {{DOCSTRING_FORMAT}}
- Private attributes are to be prefixed with an underscore
We use _Replace this with with you lint your code with_
to ensure that code is consistent and follows our code style.
Please ensure that your code passes linting before merging a Pull Request.

```
code example
```

## Commit Message Guidelines

When committing, commit messages are prefixed with one of the following depending on the type of change made.

- `feat:` when a new feature is introduced with the changes.
- `fix:` when a bug fix has occurred.
- `chore:` for changes that do not relate to a fix or feature and do not modify _source_ or _tests_. (like updating dependencies)
- `refactor:` for refactoring code that neither fixes a bug nor adds a feature.
- `docs:` when changes are made to documentation.
- `style:` when changes that do not affect the code, but modify formatting.
- `test:` when changes to tests are made.
- `perf:` for changes that improve performance.
- `ci:` for changes that affect CI.
- `build:` for changes that affect the build system or external dependencies.
- `revert:` when reverting changes.
- Docstrings are to follow _Replace this with what style Docstrings should follow_.
- Private attributes are to be prefixed with an underscore.

Commit messages are also to begin with an uppercase character. Below list some example commit messages.

```sh
git commit -m "docs: Added README.md"
git commit -m "revert: Removed README.md"
git commit -m "docs: Moved README.md"
```text
# Replace this with examples
```

## Markdown Guidelines

Currently, documentation for this project resides in markdown files.

- Headings are to be separated with 3 lines
- Use of HTML comments is appreciated
- Use of HTML is permitted
- [reference style links](https://www.markdownguide.org/basic-syntax/#reference-style-links) are not required by are appreciated
- Use of HTML comments is appreciated
- Exceedingly long lines are to be broken
- The indents are to be 4 spaces
- [reference style links][reference-style-links] are not required by are appreciated

```markdown
<!--example markdown document-->
Expand All @@ -79,3 +57,5 @@ anim id est laborum. found [Lorem Ipsum Generator]

[Lorem Ipsum Generator]: https://loremipsum.io/generator/
```

[reference-style-links]: https://www.markdownguide.org/basic-syntax/#reference-style-links
23 changes: 0 additions & 23 deletions template/.github/CONTRIBUTING.md

This file was deleted.

Loading

0 comments on commit 06dbda1

Please sign in to comment.