-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from SkwalExe/docs
Finish "contributing" module in documentation, and update readme
- Loading branch information
Showing
12 changed files
with
605 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Contributing 🫂 | ||
|
||
### You found a bug, or you need help 🆘 | ||
|
||
Please, open an issue if you have any suggestion or if you found a bug. I will try to fix it as soon as possible. | ||
You can also open an issue if you need help, I will always be happy to help someone interested in my projects! | ||
|
||
[You can open an issue on the project's Github repository. 🐙](https://github.com/SkwalExe/fractalistic/issues) | ||
|
||
### You want to contribute 🧑💻 | ||
|
||
If you want to contribute, **open an empty pull request and explain what you want to do first.** | ||
Then, wait for me to approve it and then you can start working on it. | ||
This is very important, it is always heart-breaking to reject a pull | ||
request that someone has invested a lot of time and efforts into. 🙁 | ||
|
||
[You can create a pull request on the Github repository of the project. 🐙](https://github.com/SkwalExe/fractalistic/pulls) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Creating a pull request 🩷 | ||
|
||
When you finish your changes, you can then start to prepare your pull request. | ||
|
||
First, check for any formatting and linting errors. | ||
|
||
```bash | ||
pdm run lint | ||
pdm run format | ||
``` | ||
|
||
After that, check for type errors. | ||
|
||
```bash | ||
pdm run check-types | ||
``` | ||
|
||
Any problem that wasn't automatically corrected must be fixed manually before creating your pull request. If everything is OK, you can commit your changes to your own fork. | ||
|
||
```bash | ||
git add --all | ||
git commit -m "My new feature" | ||
git push origin main | ||
``` | ||
|
||
And finally, from your fork's repository, you can now open a new pull request. | ||
I should receive a notification and I will review your changes! | ||
|
||
![Creating a pull request](./pr.png) | ||
|
||
#### **Thank you for making it this far—your contribution means the world to me, and I can't express how happy it makes me. If you're just reading the documentation and haven't contributed yet, thank you for your interest in this project. 🩷** | ||
|
||
![Kiss!!](./kiss.gif) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Project setup 🏗️ {#projec-setup} | ||
|
||
Before you start programming, you must setup the project locally. | ||
|
||
First, you will need to [**fork**](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) the [Github repository](https://github.com/SkwalExe/fractalistic), and clone it. | ||
|
||
```bash | ||
# Replace SkwalExe with your github username | ||
git clone https://github.com/SkwalExe/fractalistic | ||
cd fractalistic | ||
``` | ||
|
||
> [PDM](https://pdm-project.org/en/latest/) is used as a package manager for the project. \ | ||
> If you need to install it, you can do so as follows on Linux systems: | ||
> | ||
> ```bash | ||
> curl -sSL https://pdm-project.org/install-pdm.py | python3 - | ||
> ``` | ||
Then, install the project and the dependencies. | ||
```bash | ||
pdm install | ||
``` | ||
You can now start to make changes! | ||
|
||
### Running the app | ||
|
||
Since Fractalistic uses a TUI (GUI-like interface but in the terminal) you cannot use `print()` statements. | ||
|
||
You will need to open 2 separate terminals. | ||
In the first one run `pdm console`, and in the second one, run `pdm run dev`. | ||
|
||
This will open the app in **dev mode**, allowing you to log messages | ||
to the **Textual console** (first terminal). To log messages within the code, | ||
you must use the `textual.log()` function, and import it if needed. (`from textual import log`) | ||
|
||
![Dev mode preview](./devmode.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Recommended IDE Setup ✅ {#recommended-setup} | ||
|
||
Writing code is good, but writing code with the assistance of autocomplete, | ||
autoformatting, error notifications, and linting is even better. ✨ | ||
|
||
![Example of type checking integration](./type-checking.png) | ||
|
||
You are not required to use the tools mentioned below in your IDE. | ||
However, keep in mind that once you finish your changes, | ||
**your code must still conform to the project's quality standards.** | ||
|
||
::: tip No worries 💫 | ||
You will be able to detect and correct errors automatically with the help of predefined PDM scripts, | ||
even if you don't use any of the IDE integrations presented below. | ||
|
||
This will be covered in a later section. | ||
::: | ||
|
||
|
||
### Linting and formatting 🦀 {#linting-and-formatting} | ||
|
||
We use [Ruff](https://docs.astral.sh/ruff/) for linting and formatting within our codebase. | ||
It is recommended that you install an extension for this tool, to benefit from automatic linting and formatting. | ||
|
||
- [Github repo for Ruff](https://github.com/astral-sh/ruff) | ||
- [LSP for Ruff (Neovim, Sublime Text...)](https://github.com/astral-sh/ruff-lsp) | ||
- [VSCode integration for Ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff) | ||
|
||
### Type checking 👮 {#type-checking} | ||
|
||
[Pyright](https://github.com/microsoft/pyright) is used for static type checking, | ||
enabling us to detect errors during coding instead of at runtime. | ||
It can also identify rare errors that would otherwise be time-consuming to diagnose. | ||
Installing an IDE extension for Pyright is recommended to receive notifications whenever an error is detected. | ||
|
||
- [Github repo for Pyright](https://github.com/microsoft/pyright) | ||
- [For Neovim, you can use nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) | ||
- [VSCode integration for Pyright](https://marketplace.visualstudio.com/items?itemName=ms-pyright.pyright) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.