mirror of
https://github.com/theoludwig/advent_of_code_2023.git
synced 2024-11-09 22:08:53 +01:00
docs: add contributing templates
This commit is contained in:
parent
abcf7c5163
commit
fcd57f1cf6
20
.github/ISSUE_TEMPLATE/BUG.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/BUG.md
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: "🐛 Bug Report"
|
||||||
|
about: "Report an unexpected problem or unintended behavior."
|
||||||
|
title: "[Bug]"
|
||||||
|
labels: "bug"
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Please provide a clear and concise description of what the bug is. Include
|
||||||
|
screenshots if needed. Please make sure your issue has not already been fixed.
|
||||||
|
-->
|
||||||
|
|
||||||
|
## Steps To Reproduce
|
||||||
|
|
||||||
|
1. Step 1
|
||||||
|
2. Step 2
|
||||||
|
|
||||||
|
## The current behavior
|
||||||
|
|
||||||
|
## The expected behavior
|
18
.github/ISSUE_TEMPLATE/DOCUMENTATION.md
vendored
Normal file
18
.github/ISSUE_TEMPLATE/DOCUMENTATION.md
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
name: "📜 Documentation"
|
||||||
|
about: "Correct spelling errors, improvements or additions to documentation files (README, CONTRIBUTING...)."
|
||||||
|
title: "[Documentation]"
|
||||||
|
labels: "documentation"
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- Please make sure your issue has not already been fixed. -->
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
<!-- Please uncomment the type of documentation problem this issue address -->
|
||||||
|
|
||||||
|
<!-- Documentation is Missing -->
|
||||||
|
<!-- Documentation is Confusing -->
|
||||||
|
<!-- Documentation has Typo errors -->
|
||||||
|
|
||||||
|
## Proposal
|
20
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: "✨ Feature Request"
|
||||||
|
about: "Suggest a new feature idea."
|
||||||
|
title: "[Feature]"
|
||||||
|
labels: "feature request"
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- Please make sure your issue has not already been fixed. -->
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
<!-- A clear and concise description of the problem or missing capability... -->
|
||||||
|
|
||||||
|
## Describe the solution you'd like
|
||||||
|
|
||||||
|
<!-- If you have a solution in mind, please describe it. -->
|
||||||
|
|
||||||
|
## Describe alternatives you've considered
|
||||||
|
|
||||||
|
<!-- Have you considered any alternative solutions or workarounds? -->
|
20
.github/ISSUE_TEMPLATE/IMPROVEMENT.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/IMPROVEMENT.md
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: "🔧 Improvement"
|
||||||
|
about: "Improve structure/format/performance/refactor/tests of the code."
|
||||||
|
title: "[Improvement]"
|
||||||
|
labels: "improvement"
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- Please make sure your issue has not already been fixed. -->
|
||||||
|
|
||||||
|
## Type of Improvement
|
||||||
|
|
||||||
|
<!-- Please uncomment the type of improvements this issue address -->
|
||||||
|
|
||||||
|
<!-- Files and Folders Structure -->
|
||||||
|
<!-- Performance -->
|
||||||
|
<!-- Refactoring code -->
|
||||||
|
<!-- Tests -->
|
||||||
|
<!-- Not Sure? -->
|
||||||
|
|
||||||
|
## Proposal
|
8
.github/ISSUE_TEMPLATE/QUESTION.md
vendored
Normal file
8
.github/ISSUE_TEMPLATE/QUESTION.md
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
name: "🙋 Question"
|
||||||
|
about: "Further information is requested."
|
||||||
|
title: "[Question]"
|
||||||
|
labels: "question"
|
||||||
|
---
|
||||||
|
|
||||||
|
### Question
|
7
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
7
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<!-- Please first discuss the change you wish to make via issue before making a change. It might avoid a waste of your time. -->
|
||||||
|
|
||||||
|
# What changes this PR introduce?
|
||||||
|
|
||||||
|
## List any relevant issue numbers
|
||||||
|
|
||||||
|
## Is there anything you'd like reviewers to focus on?
|
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
|||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rust-version: ["1.70.0", "stable"]
|
rust-version: ["1.74.0", "stable"]
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v4.1.1"
|
- uses: "actions/checkout@v4.1.1"
|
||||||
|
|
||||||
@ -48,3 +48,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
configFile: ".commitlintrc.json"
|
configFile: ".commitlintrc.json"
|
||||||
failOnWarnings: true
|
failOnWarnings: true
|
||||||
|
|
||||||
|
lint-prettier:
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
steps:
|
||||||
|
- uses: "actions/checkout@v4.1.1"
|
||||||
|
|
||||||
|
- name: "Setup Node.js"
|
||||||
|
uses: "actions/setup-node@v4.0.1"
|
||||||
|
with:
|
||||||
|
node-version: "20.11.0"
|
||||||
|
|
||||||
|
- run: "npm install --global prettier@3.2.4"
|
||||||
|
|
||||||
|
- run: "prettier . --check"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
{
|
{
|
||||||
"config": {
|
"config": {
|
||||||
"default": true,
|
"default": true,
|
||||||
|
"no-inline-html": false,
|
||||||
|
"no-duplicate-heading": false,
|
||||||
|
|
||||||
/* Disables rules that may conflict with Prettier */
|
/* Disables rules that may conflict with Prettier */
|
||||||
/* Reference: https://github.com/DavidAnson/markdownlint/blob/main/style/prettier.json */
|
/* Reference: https://github.com/DavidAnson/markdownlint/blob/main/style/prettier.json */
|
||||||
@ -25,7 +27,7 @@
|
|||||||
"no-trailing-spaces": false,
|
"no-trailing-spaces": false,
|
||||||
"ol-prefix": false,
|
"ol-prefix": false,
|
||||||
"strong-style": false,
|
"strong-style": false,
|
||||||
"ul-indent": false
|
"ul-indent": false,
|
||||||
},
|
},
|
||||||
"globs": ["**/*.md"]
|
"globs": ["**/*.md"],
|
||||||
}
|
}
|
||||||
|
3
.prettierrc.json
Normal file
3
.prettierrc.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"semi": false
|
||||||
|
}
|
9
.vscode/extensions.json
vendored
Normal file
9
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"editorconfig.editorconfig",
|
||||||
|
"esbenp.prettier-vscode",
|
||||||
|
"davidanson.vscode-markdownlint",
|
||||||
|
"rust-lang.rust-analyzer",
|
||||||
|
"tamasfe.even-better-toml"
|
||||||
|
]
|
||||||
|
}
|
18
.vscode/settings.json
vendored
Normal file
18
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"rust-analyzer.check.command": "clippy",
|
||||||
|
"[rust]": {
|
||||||
|
"editor.defaultFormatter": "rust-lang.rust-analyzer",
|
||||||
|
"editor.tabSize": 4,
|
||||||
|
"editor.formatOnSave": true
|
||||||
|
},
|
||||||
|
"[toml]": {
|
||||||
|
"editor.defaultFormatter": "tamasfe.even-better-toml",
|
||||||
|
"editor.formatOnSave": true
|
||||||
|
},
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
|
"prettier.configPath": ".prettierrc.json",
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"source.fixAll": "explicit"
|
||||||
|
}
|
||||||
|
}
|
132
CODE_OF_CONDUCT.md
Normal file
132
CODE_OF_CONDUCT.md
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
We as members, contributors, and leaders pledge to make participation in our
|
||||||
|
community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||||
|
identity and expression, level of experience, education, socio-economic status,
|
||||||
|
nationality, personal appearance, race, religion, or sexual identity
|
||||||
|
and orientation.
|
||||||
|
|
||||||
|
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||||
|
diverse, inclusive, and healthy community.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to a positive environment for our
|
||||||
|
community include:
|
||||||
|
|
||||||
|
- Demonstrating empathy and kindness toward other people
|
||||||
|
- Being respectful of differing opinions, viewpoints, and experiences
|
||||||
|
- Giving and gracefully accepting constructive feedback
|
||||||
|
- Accepting responsibility and apologizing to those affected by our mistakes,
|
||||||
|
and learning from the experience
|
||||||
|
- Focusing on what is best not just for us as individuals, but for the
|
||||||
|
overall community
|
||||||
|
|
||||||
|
Examples of unacceptable behavior include:
|
||||||
|
|
||||||
|
- The use of sexualized language or imagery, and sexual attention or
|
||||||
|
advances of any kind
|
||||||
|
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||||
|
- Public or private harassment
|
||||||
|
- Publishing others' private information, such as a physical or email
|
||||||
|
address, without their explicit permission
|
||||||
|
- Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Enforcement Responsibilities
|
||||||
|
|
||||||
|
Community leaders are responsible for clarifying and enforcing our standards of
|
||||||
|
acceptable behavior and will take appropriate and fair corrective action in
|
||||||
|
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||||
|
or harmful.
|
||||||
|
|
||||||
|
Community leaders have the right and responsibility to remove, edit, or reject
|
||||||
|
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||||
|
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||||
|
decisions when appropriate.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies within all community spaces, and also applies when
|
||||||
|
an individual is officially representing the community in public spaces.
|
||||||
|
Examples of representing our community include using an official e-mail address,
|
||||||
|
posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported to the community leaders responsible for enforcement at
|
||||||
|
<contact@theoludwig.fr>.
|
||||||
|
All complaints will be reviewed and investigated promptly and fairly.
|
||||||
|
|
||||||
|
All community leaders are obligated to respect the privacy and security of the
|
||||||
|
reporter of any incident.
|
||||||
|
|
||||||
|
## Enforcement Guidelines
|
||||||
|
|
||||||
|
Community leaders will follow these Community Impact Guidelines in determining
|
||||||
|
the consequences for any action they deem in violation of this Code of Conduct:
|
||||||
|
|
||||||
|
### 1. Correction
|
||||||
|
|
||||||
|
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||||
|
unprofessional or unwelcome in the community.
|
||||||
|
|
||||||
|
**Consequence**: A private, written warning from community leaders, providing
|
||||||
|
clarity around the nature of the violation and an explanation of why the
|
||||||
|
behavior was inappropriate. A public apology may be requested.
|
||||||
|
|
||||||
|
### 2. Warning
|
||||||
|
|
||||||
|
**Community Impact**: A violation through a single incident or series
|
||||||
|
of actions.
|
||||||
|
|
||||||
|
**Consequence**: A warning with consequences for continued behavior. No
|
||||||
|
interaction with the people involved, including unsolicited interaction with
|
||||||
|
those enforcing the Code of Conduct, for a specified period of time. This
|
||||||
|
includes avoiding interactions in community spaces as well as external channels
|
||||||
|
like social media. Violating these terms may lead to a temporary or
|
||||||
|
permanent ban.
|
||||||
|
|
||||||
|
### 3. Temporary Ban
|
||||||
|
|
||||||
|
**Community Impact**: A serious violation of community standards, including
|
||||||
|
sustained inappropriate behavior.
|
||||||
|
|
||||||
|
**Consequence**: A temporary ban from any sort of interaction or public
|
||||||
|
communication with the community for a specified period of time. No public or
|
||||||
|
private interaction with the people involved, including unsolicited interaction
|
||||||
|
with those enforcing the Code of Conduct, is allowed during this period.
|
||||||
|
Violating these terms may lead to a permanent ban.
|
||||||
|
|
||||||
|
### 4. Permanent Ban
|
||||||
|
|
||||||
|
**Community Impact**: Demonstrating a pattern of violation of community
|
||||||
|
standards, including sustained inappropriate behavior, harassment of an
|
||||||
|
individual, or aggression toward or disparagement of classes of individuals.
|
||||||
|
|
||||||
|
**Consequence**: A permanent ban from any sort of public interaction within
|
||||||
|
the community.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||||
|
version 2.0, available at
|
||||||
|
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
|
||||||
|
|
||||||
|
Community Impact Guidelines were inspired by
|
||||||
|
[Mozilla's code of conduct enforcement ladder][mozilla coc].
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see the FAQ at
|
||||||
|
[https://www.contributor-covenant.org/faq][faq]. Translations are available
|
||||||
|
at [https://www.contributor-covenant.org/translations][translations].
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
|
||||||
|
[mozilla coc]: https://github.com/mozilla/diversity
|
||||||
|
[faq]: https://www.contributor-covenant.org/faq
|
||||||
|
[translations]: https://www.contributor-covenant.org/translations
|
32
CONTRIBUTING.md
Normal file
32
CONTRIBUTING.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# 💡 Contributing
|
||||||
|
|
||||||
|
Thanks a lot for your interest in contributing to **theoludwig/advent_of_code_2023**! 🎉
|
||||||
|
|
||||||
|
## Code of Conduct
|
||||||
|
|
||||||
|
**theoludwig/advent_of_code_2023** adopted the [Contributor Covenant](https://www.contributor-covenant.org/) as its Code of Conduct, and we expect project participants to adhere to it. Please read [the full text](./CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated.
|
||||||
|
|
||||||
|
## Open Development
|
||||||
|
|
||||||
|
All work on **theoludwig/advent_of_code_2023** happens directly on this repository. Both core team members and external contributors send pull requests which go through the same review process.
|
||||||
|
|
||||||
|
## Types of contributions
|
||||||
|
|
||||||
|
- Reporting a bug.
|
||||||
|
- Suggest a new feature idea.
|
||||||
|
- Correct spelling errors, improvements or additions to documentation files (README, CONTRIBUTING...).
|
||||||
|
- Improve structure/format/performance/refactor/tests of the code.
|
||||||
|
|
||||||
|
## Pull Requests
|
||||||
|
|
||||||
|
- **Please first discuss** the change you wish to make via [issue](https://github.com/theoludwig/advent_of_code_2023/issues) before making a change. It might avoid a waste of your time.
|
||||||
|
|
||||||
|
- Ensure your code respect linting.
|
||||||
|
|
||||||
|
- Make sure your **code passes the tests**.
|
||||||
|
|
||||||
|
If you're adding new features to **theoludwig/advent_of_code_2023**, please include tests.
|
||||||
|
|
||||||
|
## Commits
|
||||||
|
|
||||||
|
The commit message guidelines adheres to [Conventional Commits](https://www.conventionalcommits.org/) and [Semantic Versioning](https://semver.org/) for releases.
|
@ -6,7 +6,7 @@ resolver = "2"
|
|||||||
name = "advent_of_code_2023"
|
name = "advent_of_code_2023"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.70.0"
|
rust-version = "1.74.0"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
rayon = { version = "=1.8.1" }
|
rayon = { version = "=1.8.1" }
|
||||||
|
31
README.md
31
README.md
@ -1,17 +1,30 @@
|
|||||||
# Advent of Code 2023
|
<h1 align="center">theoludwig/advent_of_code_2023</h1>
|
||||||
|
|
||||||
## About
|
<p align="center">
|
||||||
|
<strong>My Solutions for the <a href="https://adventofcode.com/2023">Advent of Code 2023</a>, implemented in the <a href="https://www.rust-lang.org/">Rust Programming Language</a>.</strong>
|
||||||
|
</p>
|
||||||
|
|
||||||
This repository contains my solutions for the [Advent of Code 2023](https://adventofcode.com/2023) challenges implemented in the [Rust Programming Language](https://www.rust-lang.org/).
|
<p align="center">
|
||||||
|
<a href="./CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" alt="CONTRIBUTING" /></a>
|
||||||
|
<a href="./LICENSE"><img src="https://img.shields.io/badge/licence-MIT-blue.svg" alt="Licence MIT"/></a>
|
||||||
|
<a href="./CODE_OF_CONDUCT.md"><img src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg" alt="Contributor Covenant" /></a>
|
||||||
|
<br />
|
||||||
|
<a href="https://github.com/theoludwig/advent_of_code_2023/actions/workflows/ci.yml"><img src="https://github.com/theoludwig/advent_of_code_2023/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI" /></a>
|
||||||
|
<a href="https://www.rust-lang.org/"><img src="https://img.shields.io/badge/Rust%20MSRV-v1.74.0-blue?logo=rust" alt="Rust" /></a>
|
||||||
|
<a href="https://conventionalcommits.org"><img src="https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg" alt="Conventional Commits" /></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
The current Minimum Supported [Rust](https://www.rust-lang.org/) Version (MSRV) is **1.70.0** (determined thanks to [cargo-msrv](https://crates.io/crates/cargo-msrv)).
|
#### Rust Toolchain
|
||||||
|
|
||||||
|
The current Minimum Supported [Rust](https://www.rust-lang.org/) Version (MSRV) is **1.74.0**.
|
||||||
|
|
||||||
The project is **tested** against the following Rust versions:
|
The project is **tested** against the following Rust versions:
|
||||||
- **Minimum Supported Rust Version (MSRV): v1.70.0**
|
|
||||||
|
- **Minimum Supported Rust Version (MSRV): v1.74.0**
|
||||||
- **Latest Stable Version**
|
- **Latest Stable Version**
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
@ -27,6 +40,12 @@ cargo clippy --verbose -- -D warnings
|
|||||||
cargo fmt -- --check
|
cargo fmt -- --check
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## 💡 Contributing
|
||||||
|
|
||||||
|
Anyone can help to improve the project, submit a Feature Request, a bug report or even correct a simple spelling mistake.
|
||||||
|
|
||||||
|
The steps to contribute can be found in the [CONTRIBUTING.md](./CONTRIBUTING.md) file.
|
||||||
|
|
||||||
|
## 📄 License
|
||||||
|
|
||||||
[MIT](./LICENSE)
|
[MIT](./LICENSE)
|
||||||
|
@ -62,7 +62,7 @@ Find the rank of every hand in your set. **What are the total winnings?**
|
|||||||
|
|
||||||
## Instructions - Part 2
|
## Instructions - Part 2
|
||||||
|
|
||||||
To make things a little more interesting, the Elf introduces one additional rule. Now, `J` cards are [jokers](https://en.wikipedia.org/wiki/Joker_(playing_card)) - wildcards that can act like whatever card would make the hand the strongest type possible.
|
To make things a little more interesting, the Elf introduces one additional rule. Now, `J` cards are [jokers](<https://en.wikipedia.org/wiki/Joker_(playing_card)>) - wildcards that can act like whatever card would make the hand the strongest type possible.
|
||||||
|
|
||||||
To balance this, **`J` cards are now the weakest** individual cards, weaker even than `2`. The other cards stay in the same order: `A`, `K`, `Q`, `T`, `9`, `8`, `7`, `6`, `5`, `4`, `3`, `2`, `J`.
|
To balance this, **`J` cards are now the weakest** individual cards, weaker even than `2`. The other cards stay in the same order: `A`, `K`, `Q`, `T`, `9`, `8`, `7`, `6`, `5`, `4`, `3`, `2`, `J`.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user