mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
update "how to contribute" doc and md indentation
This commit is contained in:
parent
2aa5688d90
commit
2f25363d76
@ -21,3 +21,9 @@ indent_size = 4
|
|||||||
# flake8
|
# flake8
|
||||||
[.flake8]
|
[.flake8]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
# Markdown MkDocs
|
||||||
|
[docs/**/*.md]
|
||||||
|
max_line_length = 80
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = unset
|
||||||
|
@ -2,7 +2,6 @@ embeddedLanguageFormatting: auto
|
|||||||
endOfLine: lf
|
endOfLine: lf
|
||||||
singleQuote: true
|
singleQuote: true
|
||||||
semi: true
|
semi: true
|
||||||
tabWidth: 2
|
|
||||||
trailingComma: es5
|
trailingComma: es5
|
||||||
useTabs: false
|
useTabs: false
|
||||||
overrides:
|
overrides:
|
||||||
@ -12,6 +11,9 @@ overrides:
|
|||||||
printWidth: 80
|
printWidth: 80
|
||||||
parser: markdown
|
parser: markdown
|
||||||
cursorOffset: -1
|
cursorOffset: -1
|
||||||
|
- files: docs/**/*.md
|
||||||
|
options:
|
||||||
|
tabWidth: 4
|
||||||
- files: 'invokeai/frontend/public/locales/*.json'
|
- files: 'invokeai/frontend/public/locales/*.json'
|
||||||
options:
|
options:
|
||||||
tabWidth: 4
|
tabWidth: 4
|
||||||
|
@ -2,50 +2,60 @@
|
|||||||
title: How to Contribute
|
title: How to Contribute
|
||||||
---
|
---
|
||||||
|
|
||||||
## pre-requirements
|
There are different ways how you can contribute to
|
||||||
|
[InvokeAI](https://github.com/invoke-ai/InvokeAI), like Translations, opening
|
||||||
|
Issues for Bugs or ideas how to improve.
|
||||||
|
|
||||||
To follow the steps in this tutorial you will need the following:
|
## Pull Requests
|
||||||
|
|
||||||
|
### pre-requirements
|
||||||
|
|
||||||
|
To follow the steps in this tutorial you will need:
|
||||||
|
|
||||||
- [git](https://git-scm.com/downloads)
|
|
||||||
- [GitHub](https://github.com) account
|
- [GitHub](https://github.com) account
|
||||||
- A Code Editor (personally I use Visual Studio Code)
|
- [git](https://git-scm.com/downloads) source controll
|
||||||
|
- Text / Code Editor (personally I preffer
|
||||||
|
[Visual Studio Code](https://code.visualstudio.com/Download))
|
||||||
|
- Terminal:
|
||||||
|
- If you are on Linux/MacOS you can use bash or zsh
|
||||||
|
- for Windows Users the commands are written for PowerShell
|
||||||
|
|
||||||
## Fork Repository
|
### Fork Repository
|
||||||
|
|
||||||
The first step to be done if you want to contribute to InvokeAI, is to fork the
|
The first step to be done if you want to contribute to InvokeAI, is to fork the
|
||||||
rpeository.
|
rpeository.
|
||||||
|
|
||||||
The easiest way to do so is by clicking
|
Since you are already reading this doc, the easiest way to do so is by clicking
|
||||||
[here](https://github.com/invoke-ai/InvokeAI/fork). It is also possible by
|
[here](https://github.com/invoke-ai/InvokeAI/fork). You could also open
|
||||||
opening [InvokeAI](https://github.com/invoke-ai/InvoekAI) and click on the
|
[InvokeAI](https://github.com/invoke-ai/InvoekAI) and click on the "Fork" Button
|
||||||
"Fork" Button in the top right.
|
in the top right.
|
||||||
|
|
||||||
## Clone your fork
|
### Clone your fork
|
||||||
|
|
||||||
After you forked the Repository, you should clone it to your dev machine:
|
After you forked the Repository, you should clone it to your dev machine:
|
||||||
|
|
||||||
=== "Linux/MacOS"
|
=== "Linux:fontawesome-brands-linux: / MacOS:simple-apple:"
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
git clone https://github.com/<github username>/InvokeAI \
|
git clone https://github.com/<github username>/InvokeAI \
|
||||||
&& cd InvokeAI
|
&& cd InvokeAI
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Windows"
|
=== "Windows:fontawesome-brands-windows:"
|
||||||
|
|
||||||
``` powershell
|
``` powershell
|
||||||
git clone https://github.com/<github username>/InvokeAI `
|
git clone https://github.com/<github username>/InvokeAI `
|
||||||
&& cd InvokeAI
|
&& cd InvokeAI
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install in Editable Mode
|
### Install in Editable Mode
|
||||||
|
|
||||||
To install InvokeAI in editable mode, (as always) we recommend to create and
|
To install InvokeAI in editable mode, (as always) we recommend to create and
|
||||||
activate a venv first. Afterwards you can install the InvokeAI Package,
|
activate a venv first. Afterwards you can install the InvokeAI Package,
|
||||||
including dev and docs extras in editable mode, follwed by the installation of
|
including dev and docs extras in editable mode, follwed by the installation of
|
||||||
the pre-commit hook:
|
the pre-commit hook:
|
||||||
|
|
||||||
=== "Linux/MacOS"
|
=== "Linux:fontawesome-brands-linux: / MacOS:simple-apple:"
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
python -m venv .venv \
|
python -m venv .venv \
|
||||||
@ -59,7 +69,7 @@ the pre-commit hook:
|
|||||||
&& pre-commit install
|
&& pre-commit install
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Windows"
|
=== "Windows:fontawesome-brands-windows:"
|
||||||
|
|
||||||
``` powershell
|
``` powershell
|
||||||
python -m venv .venv `
|
python -m venv .venv `
|
||||||
@ -73,11 +83,11 @@ the pre-commit hook:
|
|||||||
&& pre-commit install
|
&& pre-commit install
|
||||||
```
|
```
|
||||||
|
|
||||||
## Create a branch
|
### Create a branch
|
||||||
|
|
||||||
Make sure you are on main branch, from there create your feature branch:
|
Make sure you are on main branch, from there create your feature branch:
|
||||||
|
|
||||||
=== "Linux/MacOS"
|
=== "Linux:fontawesome-brands-linux: / MacOS:simple-apple:"
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
git checkout main \
|
git checkout main \
|
||||||
@ -85,10 +95,45 @@ Make sure you are on main branch, from there create your feature branch:
|
|||||||
&& git checkout -B <branch name>
|
&& git checkout -B <branch name>
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Windows"
|
=== "Windows:fontawesome-brands-windows:"
|
||||||
|
|
||||||
``` powershell
|
``` powershell
|
||||||
git checkout main `
|
git checkout main `
|
||||||
&& git pull `
|
&& git pull `
|
||||||
&& git checkout -B <branch name>
|
&& git checkout -B <branch name>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Commit your changes
|
||||||
|
|
||||||
|
When you are done with adding / updating content, you need to commit those
|
||||||
|
changes to your repository before you can actually open an PR:
|
||||||
|
|
||||||
|
```{ .sh .annotate }
|
||||||
|
git add <files you have changed> # (1)!
|
||||||
|
git commit -m "A commit message which describes your change"
|
||||||
|
git push
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Replace this with a space seperated list of the files you changed, like:
|
||||||
|
`README.md foo.sh bar.json baz`
|
||||||
|
|
||||||
|
### Create a Pull Request
|
||||||
|
|
||||||
|
After pushing your changes, you are ready to create a Pull Request. just head
|
||||||
|
over to your fork on [GitHub](https://github.com), which should already show you
|
||||||
|
a message that there have been recent changes on your feature branch and a green
|
||||||
|
button which you could use to create the PR.
|
||||||
|
|
||||||
|
The default target for your PRs would be the main branch of
|
||||||
|
[invoke-ai/InvokeAI](https://github.com/invoke-ai/InvokeAI)
|
||||||
|
|
||||||
|
Another way would be to create it in VS-Code or via the GitHub CLI (or even via
|
||||||
|
the GitHub CLI in a VS-Code Terminal Window 🤭):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
gh pr create
|
||||||
|
```
|
||||||
|
|
||||||
|
The CLI will inform you if there are still unpushed commits on your branch. It
|
||||||
|
will also prompt you for things like the the Title and the Body (Description) if
|
||||||
|
you did not already pass them as arguments.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user