From fe8959577c7d7f12f6bbb9bb0450c086ad0b91eb Mon Sep 17 00:00:00 2001 From: Redume Date: Mon, 24 Feb 2025 20:15:30 +0300 Subject: [PATCH] docs: page for contributing --- docs/astro.config.mjs | 3 + .../docs/getting-started/contributing.mdx | 80 +++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 docs/src/content/docs/docs/getting-started/contributing.mdx diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index bd2734a..fb0d309 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -18,6 +18,9 @@ export default defineConfig({ slug: 'docs/getting-started/docker', badge: 'recommended', }, + { + label: 'Contributing', slug: 'docs/getting-started/contributing' + }, ], }, ], diff --git a/docs/src/content/docs/docs/getting-started/contributing.mdx b/docs/src/content/docs/docs/getting-started/contributing.mdx new file mode 100644 index 0000000..6f4d389 --- /dev/null +++ b/docs/src/content/docs/docs/getting-started/contributing.mdx @@ -0,0 +1,80 @@ +--- +title: Contributing +--- + +If you have any questions, you can write to the +[mail](mailto:redddume@gmail.com) +or [Telegram](https://t.me/Redddume) + +### Fork and clone your repository +1. Fork the repository +([click here to fork now](https://github.com/Redume/Kekkai/fork)) +2. Clone your forked code +```bash +git clone https://github.com//Kekkai.git +``` +3. Create new branch +```bash +git branch +``` +4. Switch to new branch +```bash +git checkout +``` +5. Push your commits +6. Submit a new Pull Request + +### Testing +Before sending a Pull Request, test the functionality. +Everything should work both in Docker Compose and without it. + +It is recommended to use Debugger and Debug log for testing. +The logging level is changed in `config.yaml` + +### Code Style +[`Pylint`][pylint], [`mypy`][mypy], +[`eslint`][eslint] and [`prettier`][prettier] are used as code syntax checks + +#### Checking the Node.JS code + +To check the code, you must first download the necessary libraries, +which are located at the root of the project +```bash +npm install +``` + +`eslint` and `prettier` is used to check and automatically correct the Node.JS code +```bash +npx eslint . +``` +Or add the `--fix` flag to automatically fix the code + +#### Checking the Python code +To check code, you need to install libraries `mypy` and `pylint` + +```bash +python3 -m pip install -U mypy +``` + +and install `pylint` +```bash +pip install pylint +``` +Start check the code + +for `pylint`: +```bash +pylint /chart/ +``` + +and for `mypy`: +```bash +mypy /chart/ +``` + + + +[pylint]: https://github.com/pylint-dev/pylint +[mypy]: https://github.com/python/mypy +[eslint]: https://github.com/eslint/eslint +[prettier]: https://github.com/prettier/prettier \ No newline at end of file