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

Re-organise contributor page for development environment #637

Open
brucellino opened this issue Feb 26, 2024 · 5 comments
Open

Re-organise contributor page for development environment #637

brucellino opened this issue Feb 26, 2024 · 5 comments

Comments

@brucellino
Copy link
Member

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 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

{
  "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, since they will be taken care of by the pre-commit 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
  2. Declare dependencies explicitly
@brucellino brucellino changed the title Re-organise contributor page for development environm,ent Re-organise contributor page for development environment Feb 26, 2024
@sebastian-luna-valero
Copy link
Member

Today I just came across https://github.com/flox/flox which may also help us keep a consistent environment throughout.

@brucellino
Copy link
Member Author

This actually looks like a really good idea. I was going to suggest using asdf instead, but I was convinced by this comment in the Elixr forum. Coming from the Nix world, and assuming the project will be stable long term, it looks like a good approach.

gwarf pushed a commit that referenced this issue Aug 29, 2024
# Summary

The "version" of docsy that we use is generating the issue described in
#639 with the latest versions of `hugo`. According to my tests the
latest working version of `hugo` is
[v0.110.0](https://github.com/gohugoio/hugo/releases/tag/v0.110.0).

In addition to specifying the latest working version of `hugo` in the
docs to contribute, I am also adding an [environment with
flox](https://flox.dev/docs/tutorials/sharing-environments/#sharing-environments-with-files).
See also related discussion in #637.

Merging this PR fixes #639. However, we may also want to discuss whether
to [migrate docsy from git submodules to hugo
modules](https://www.docsy.dev/docs/updating/convert-site-to-module/) so
the latest version of both `hugo` and `docsy` can be used.

---

**Related issue :**
#639
@gwarf
Copy link
Member

gwarf commented Aug 29, 2024

As #668 got merged, can/should this issue be closed?

@sebastian-luna-valero
Copy link
Member

Please note that in the flox environment in #668 we only pinned the version of hugo. Do we want to pin other deps as well (e.g. nodejs)?

@gwarf
Copy link
Member

gwarf commented Aug 29, 2024

Please note that in the flox environment in #668 we only pinned the version of hugo. Do we want to pin other deps as well (e.g. nodejs)?

For the record, the version somewhat pinned in the GitHub actions is pretty vague: https://github.com/EGI-Federation/documentation/blob/main/.github/workflows/build.yml#L32-L35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants