Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update guidelines #496

Merged
merged 33 commits into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5d4d611
IDE setup guide
seeforschauer Apr 20, 2022
a56e316
beloved editor
seeforschauer Apr 20, 2022
922cf8b
review
seeforschauer Apr 20, 2022
7af9403
https://sembr.org
seeforschauer Apr 20, 2022
9b65776
added 1-1 calls reminder
seeforschauer Apr 20, 2022
bfc3149
fmt
seeforschauer Apr 20, 2022
3503584
fmt
seeforschauer Apr 20, 2022
faf63ae
on sentence per line
seeforschauer Apr 20, 2022
aeb0baf
added pre-hook-commit description
seeforschauer Apr 20, 2022
cf64074
remove obvious from doc
seeforschauer Apr 20, 2022
e8e468b
sembr for processes
seeforschauer Apr 20, 2022
f2badbc
Update CONTRIBUTING.md
seeforschauer Apr 20, 2022
f1a864d
Update .github/PROCESS.md
seeforschauer Apr 20, 2022
e4e9c44
added mentioning of docs-fmt and fmt lint tasks
seeforschauer Apr 20, 2022
41f91c8
Merge branch 'main' into ide-setup
seeforschauer Apr 20, 2022
ce87bd7
separated
seeforschauer Apr 20, 2022
8ca6816
tests grouping
seeforschauer Apr 20, 2022
f415895
remove prev
seeforschauer Apr 20, 2022
7b61a0e
automate
seeforschauer Apr 20, 2022
594eda2
Merge branch 'main' into ide-setup
AlekSi Apr 21, 2022
e305015
Merge branch 'main' into ide-setup
AlekSi Apr 21, 2022
9c348b9
Merge branch 'main' into ide-setup
seeforschauer Apr 25, 2022
932cfa4
changes
seeforschauer Apr 22, 2022
119834c
more story, connected text
seeforschauer Apr 22, 2022
9968b18
wip
seeforschauer Apr 25, 2022
e903a03
gramarly process
seeforschauer Apr 25, 2022
68963a0
corrections
seeforschauer Apr 25, 2022
9b6e85e
clarity
seeforschauer Apr 25, 2022
abb448a
clarity
seeforschauer Apr 25, 2022
6d27416
Merge branch 'main' into ide-setup
AlekSi Apr 25, 2022
cc27c95
process fixes
seeforschauer Apr 25, 2022
eff468f
fmt
seeforschauer Apr 25, 2022
e8c294f
fix
seeforschauer Apr 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ We will do all that for you so you can focus on what is really interesting for y
All commits are always squashed on merge by GitHub, so there is no need to squash them manually, amend them, and/or do force pushes.
Autogenerated GitHub's squash commit's title and body should be manually replaced by PR's title and description; that includes both manual merges and auto-merges.
Do not leave original commit messages in the squashed commit body.

## Calls `to show and/or to explain`
AlekSi marked this conversation as resolved.
Show resolved Hide resolved

Keep guides short: we don't create rules; we automate.
AlekSi marked this conversation as resolved.
Show resolved Hide resolved

Please multiply the knowledge shared on calls and 1-1 messages by writing a detailed article.
AlekSi marked this conversation as resolved.
Show resolved Hide resolved
1-1s are good to check what you might have missed along the way - what seemed to you obvious and to others is not.

We encourage diversity between us as different points of view expand our vision and contribute to the project's success.
AlekSi marked this conversation as resolved.
Show resolved Hide resolved
34 changes: 21 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,33 @@ cd FerretDB
git remote add upstream https://github.com/FerretDB/FerretDB.git
```

### Setting up the development environment
### Run
AlekSi marked this conversation as resolved.
Show resolved Hide resolved

To run development commands, you should first install the [`task`](https://taskfile.dev/) tool.
You should first install the [`task`](https://taskfile.dev/) tool to run development commands.
AlekSi marked this conversation as resolved.
Show resolved Hide resolved
You can do this by changing the directory to `tools` (`cd tools`) and running `go generate -x`.
That will install `task` into the `bin` directory (`bin/task` on Linux and macOS, `bin\task.exe` on Windows).
You can then add `./bin` to `$PATH` either manually (`export PATH=./bin:$PATH` in `bash`) or using something like (`direnv` (`.envrc` files)[https://direnv.net], or replace every invocation of `task` with explicit `bin/task`.
You can also [install `task` globally](https://taskfile.dev/#/installation), but that might lead to the version skew.

With `task` installed, you may do the following:

1. Install development tools with `task init`.
2. Start the development environment with `task env-up`.
This will start PostgreSQL and MongoDB containers, filling them with identical sets of test data.
3. Run all tests in another terminal window with `task test`.
4. Start FerretDB with `task run`.
This will start it in a development mode where all requests are handled by FerretDB, but also routed to MongoDB.
The differences in response are then logged and the FerretDB response is sent back to the client.
5. Run `mongosh` with `task mongosh`.
This allows you to run commands against FerretDB.
With `task` installed, you may run:

* `task init` to install development tools.
AlekSi marked this conversation as resolved.
Show resolved Hide resolved

AlekSi marked this conversation as resolved.
Show resolved Hide resolved
* `task env-up` to set up the development environment.
`task env-up` will start PostgreSQL and MongoDB containers, filling them with identical datasets.

* `task test` to run all tests in another terminal window.

* `task run` to start FerretDB in a development mode.
In the development mode, FerretDB not only handles all requests but also routes them to MongoDB and logs the differences in response.

* `task mongosh` to run `mongosh` to run commands against FerretDB.

* `task fmt` to format source code.
AlekSi marked this conversation as resolved.
Show resolved Hide resolved

* `task lint` to run linter checks.

* `task docs-fmt` to format markdown documents with the markdown linter.

You can see all available `task` tasks with `task -l`.

Expand Down