|
1 | 1 | # Code Review During Development |
2 | 2 |
|
3 | | -This repository is automatically built from [markdown](https://commonmark.org/) files by [Hugo](https://gohugo.io/) using [GitHub Actions](https://github.com/features/actions). |
4 | | -This site uses the Hugo [LoveIt](https://hugoloveit.com/) theme. |
| 3 | +This repository is automatically built from [markdown](https://commonmark.org/) files by [Sphinx](https://www.sphinx-doc.org/) and the [MyST parser](https://myst-parser.readthedocs.io) |
| 4 | +using [ReadTheDocs](https://readthedocs.org/). |
| 5 | +This site uses the [Sphinx Book](https://sphinx-book-theme.readthedocs.io) theme. |
5 | 6 | This site is available here: https://researchcodereviewcommunity.github.io/dev-review/ |
6 | 7 |
|
7 | | -The following branches in this repository are important: |
8 | | -- `main`: the markdown files corresponding to the current live version of the website |
9 | | -- `gh-pages`: the static html site, automatically built by Hugo on new commits to `main` by [this script](.github/workflows/deploy.yml) |
| 8 | +The content of the website is contained in markdown files located in the `docs/` folder and are structured like so |
| 9 | + |
| 10 | +~~~text |
| 11 | +docs/ |
| 12 | +├── flowcharts <-- any mermaid flowcharts used in multiple locations |
| 13 | +│ └── high-level.md |
| 14 | +├── glossary.md <-- a glossary of important terms for code review |
| 15 | +├── guidelines <-- more general guidelines for code review apart from the more prescriptive recipes |
| 16 | +│ ├── approach.md |
| 17 | +│ └── points-to-check-for-reviewers.md |
| 18 | +├── index.md <-- the landing page of the website |
| 19 | +├── recipes <-- our suggested steps to follow during the code review process |
| 20 | +│ ├── explain_code_structure.md |
| 21 | +│ ├── find_a_reviewer.md |
| 22 | +│ ├── lonecoder.md |
| 23 | +│ ├── meet_and_agree_on_objectives.md |
| 24 | +│ ├── perform_code_review.md |
| 25 | +│ └── recipe_template.md |
| 26 | +└── refs-related.md <-- references for material related to code review |
| 27 | +~~~ |
10 | 28 |
|
11 | 29 | ## Dependencies |
12 | | -Install hugo extended dependency. |
13 | | -The "extended" hugo version is required to enable some features of [the LoveIt theme](https://hugoloveit.com/), such as mermaid diagrams. |
14 | | -See commands to install hugo based on your Operating system. |
15 | | -- macOS |
| 30 | +We use [`nox`](https://nox.thea.codes/en/stable/) |
| 31 | +as a task-runner to create development environments |
| 32 | +and to build the docs. |
| 33 | +There are many ways to install but we recommend the following: |
| 34 | +1. use a system package manager to install `pipx` |
| 35 | +2. use `pipx` to install `nox` so you can use it across projects |
| 36 | +3. finally ask `nox` to create a development environment |
| 37 | + |
| 38 | +- macOS/Linux |
16 | 39 | ``` |
17 | | -brew install hugo |
| 40 | +brew install pipx # or `python3 -m pip install --user pipx` |
| 41 | +pipx install nox |
| 42 | +nox -s dev |
18 | 43 | ``` |
19 | 44 | - Windows |
20 | 45 | ``` |
21 | | -choco install hugo -confirm |
22 | | -``` |
23 | | -- GNU/Linux (Debian and Ubuntu) |
| 46 | +choco install pipx -confirm |
| 47 | +pipx install nox |
| 48 | +nox -s dev |
24 | 49 | ``` |
25 | | -snap install hugo --channel=extended |
26 | | -``` |
27 | | - |
28 | | -See [documentation](https://gohugo.io/getting-started/installing/) for other options and furhter instructions. |
29 | 50 |
|
30 | 51 | ## Clone this repository |
31 | | -After generating your SSH keys as suggested [here](https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent). |
| 52 | +After generating your SSH keys as suggested [here](https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent). |
32 | 53 | You can then clone the repository by typing (or copying) the following line in a terminal at your preferred path in your machine: |
33 | 54 | ``` |
34 | | -git clone --recurse-submodules [email protected]:ResearchCodeReviewCommunity/dev-review.git |
| 55 | +git clone [email protected]:ResearchCodeReviewCommunity/dev-review.git |
35 | 56 | ``` |
36 | | -If you've cloned this repo without the `--recurse-submodules` options, then you can initialise your local git submodule config with |
37 | 57 |
|
38 | | -``` |
39 | | -git submodule init |
40 | | -``` |
41 | | -and update it with |
42 | | -``` |
43 | | -git submodule update |
44 | | -``` |
| 58 | +## Development |
| 59 | +To preview changes, you can build and serve the website locally. |
45 | 60 |
|
46 | | -## Development |
47 | | -To preview changes locally, you can build and serve the website locally. |
48 | | -The `disableFastRender` option is required to render some features brought by the LoveIt theme, such as mermaid diagrams. |
49 | 61 | ``` |
50 | | -cd site/ && hugo serve --disableFastRender |
| 62 | +nox -s docs -- serve |
51 | 63 | ``` |
52 | 64 |
|
53 | 65 | Open your favorite web-browser using the following url: |
54 | 66 | ``` |
55 | | -Web Server is available at http://localhost:1313/dev-review/ (bind address 127.0.0.1) |
56 | | -Press Ctrl+C to stop |
| 67 | +Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... |
57 | 68 | ``` |
58 | | -See [Launching the website locally (hugoloveit.com)](https://hugoloveit.com/theme-documentation-basics/#25-launching-the-website-locally) for further information. |
59 | 69 |
|
60 | 70 | ## Contributing |
61 | | -Commit changes to any other branch than `main` or `gh-pages`, open a pull request and request for reviews as common practice following the [pull request workflow with git](https://medium.com/@urna.hybesis/pull-request-workflow-with-git-6-steps-guide-3858e30b5fa4). |
62 | | -Once your changes are merged into `main` branch, the site will be automatically built and deployed and will be live roughly 1 minute later. |
| 71 | +Commit changes to any other branch than `main`, open a pull request and request for reviews as common practice following the [pull request workflow with git](https://medium.com/@urna.hybesis/pull-request-workflow-with-git-6-steps-guide-3858e30b5fa4). |
| 72 | +Once your changes are merged into `main` branch, the site will be automatically built and deployed and will be live roughly 1 minute later. |
63 | 73 |
|
64 | | -:warning: **Do not commit directly to `main` or `gh-pages`.** :warning: |
| 74 | +:warning: **Do not commit directly to `main`.** :warning: |
0 commit comments