EGI-Federation / EGI-Federation/documentation

Re-organise contributor page for development environment

Open
#637 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
15
Forks
52
Avg merge
12h 34m
Merged PRs (30d)
2

Description

# Re-organise development environment page

In order to contribute anything, you likely need the dev env working. I hold that this should be on a single page.

In the page https://docs.egi.eu/about/contributing/git/#installing-dependencies there is mention of installing NodeJS as a dependency. I propose suggesting the use of [NVM.sh](https://nvm.sh) for contributors to manage various Node versions:

```
➜ nvm use 12
Now using node v12.22.0 (npm v6.14.11) /2.5s

08:49:23 in egi-documentation on  main [!?] took 2.5s
➜ nvm use 20
Now using node v20.11.0 (npm v10.2.4)
```

`NVM.sh` is just a shell script which can be added using the `curl - | bash` method, and provides functionality similar to python's virtual environments.

Further, it's stated that NodeJS 12 should be used in the environment, but this is not declared anywhere. We should add it to `package.json`

```json
{
"engines": {
"node": "12"
}
}
```

Finally, if we merge #636 we will obviate the need for many of the local tests reproducing the checks run in the [actions CI checks](https://docs.egi.eu/about/contributing/git/#running-checks-from-github-actions-locally), since they will be taken care of by the [pre-commit](https://pre-commit.com) framework. For now, I propose **keeping** the existing documentation, but instructing contributors to install the pre-commit hooks when contributing.

# Summary of proposed changes

I propose:

1. Create a specific page for setting up the development environment
1. Propose use of NVM for Node
2. Explain how to install pre-commit hooks
3. [Declare dependencies explicitly](https://12factor.net/dependencies)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.