Skip to content

Commit c35b82e

Browse files
committed
Fix grammar and other documentation issues
Suggestions were made by ChatGPT. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent a8ba246 commit c35b82e

File tree

3 files changed

+89
-88
lines changed

3 files changed

+89
-88
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
1-
# Frequenz repository configuration for Python
1+
# Frequenz Repository Configuration
22

33
[![Build Status](https://github.com/frequenz-floss/frequenz-repo-config-python/actions/workflows/ci.yaml/badge.svg)](https://github.com/frequenz-floss/frequenz-repo-config-python/actions/workflows/ci.yaml)
44
[![PyPI Package](https://img.shields.io/pypi/v/frequenz-repo-config)](https://pypi.org/project/frequenz-repo-config/)
55
[![Docs](https://img.shields.io/badge/docs-latest-informational)](https://frequenz-floss.github.io/frequenz-repo-config-python/)
66

77
## Introduction
88

9-
This is very opinionated set of tools and configurations to setup a Python
9+
This is a highly opinionated set of tools and configurations to set up a Python
1010
repository for [Frequenz](https://frequenz.com) projects.
1111

12-
If offers:
12+
It offers:
1313

1414
* [Cookiecutter] templates for scaffolding new projects
15-
* Trivial build of `noxfile.py` with some predefined sessions with all common
16-
checks.
15+
* Trivial build of `noxfile.py` with some predefined sessions that include all
16+
common checks.
1717
* Tools to build protobuf/grpc files as Python, including type information.
1818

1919
## Quick Example
2020

21-
To start a new project you should first [install
21+
To start a new project, you should first [install
2222
Cookiecutter](https://cookiecutter.readthedocs.io/en/stable/installation.html).
2323
It is normally available in any Linux distribution, but some have a very old
24-
version (for example, Ubuntu/Debian). You can [check which version your distro
25-
has in Repology](https://repology.org/project/cookiecutter/versions). You need
26-
**at least version 2.1.0**. To make sure to get an up to date version you can
27-
always uses `pip` and install in a `venv`:
24+
version (for example, Ubuntu/Debian). You can [check which version your distro
25+
has on Repology](https://repology.org/project/cookiecutter/versions). You need
26+
**at least version 2.1.0**. To ensure you get an up-to-date version, you can
27+
always use `pip` and install it in a `venv`:
2828

2929
```console
3030
$ python -m venv cookiecutter
3131
$ cd cookiecutter
3232
$ . bin/activate
33-
[cookiecutter] $ pip install cookiecutter
33+
(venv) $ pip install cookiecutter
3434
Collecting cookiecutter
3535
...
3636
```
3737

38-
Then just run cookiecutter where you want to create the new project. A new
38+
Then simply run [Cookiecutter] where you want to create the new project. A new
3939
directory will be created with the generated project name. For example:
4040

4141
```sh
4242
cd ~/devel
4343
cookiecutter gh:frequenz-floss/frequenz-repo-config-python --directory=cookiecutter
4444
```
4545

46-
This will prompt for the project type, name and other configuration and
47-
generate the whole project for you.
46+
This command will prompt you for the project type, name, and other
47+
configuration options, and it will generate the entire project for you.
4848

49-
After completing it and fixing the `TODO`s you can amend the previous commit
50-
using `git commit --amend` or create a new commit for the changes using `git
51-
commit`.
49+
After completing the project and fixing the `TODO`s, you can either amend the
50+
previous commit using `git commit --amend` or create a new commit for the
51+
changes using `git commit`.
5252

5353
## Documentation
5454

55-
For more detailed documentation please check the [project's
55+
For more detailed documentation, please check the [project's
5656
website](https://frequenz-floss.github.io/frequenz-repo-config-python/).
5757

5858
## Contributing
5959

6060
If you want to know how to build this project and contribute to it, please
61-
check out the [Contributing Guide](CONTRIBUTING.md).
61+
refer to the [Contributing Guide](CONTRIBUTING.md).
6262

6363

6464
[Cookiecutter]: https://cookiecutter.readthedocs.io/en/stable

RELEASE_NOTES.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ This release is a major step and adds many features and breaking changes.
66

77
## Upgrading
88

9-
Since this projects is still in very heavy devepoment, the easiest way to
10-
upgrade is to just regenerate the templates. Please follow the instructions in
11-
the new documentation website about [updating
9+
Since this project is still in heavy development, the easiest way to upgrade is
10+
to regenerate the templates. Please follow the instructions in the new
11+
documentation website about [updating
1212
projects](https://frequenz-floss.github.io/frequenz-repo-config-python/next/#update-an-existing-project).
1313

1414
## New Features
@@ -22,7 +22,7 @@ This is just a quick (non-comprehensive) summary of the new features:
2222
* Cookiecutter template
2323

2424
* Add `dependabot` configuration
25-
* Add issue templates, keyword labeler and PR labeler
25+
* Add issue templates, keyword labeler, and PR labeler
2626
* Add `CODEOWNERS` file
2727
* Add `direnv`-related files to `.gitignore`
2828
* Add GitHub CI workflow to `cookiecutter`

docs/index.md

Lines changed: 66 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
# Frequenz repository configuration for Python
1+
# Frequenz Repository Configuration
22

33
## Introduction
44

5-
This is very opinionated set of tools and configurations to setup a Python
5+
This is a highly opinionated set of tools and configurations to set up a Python
66
repository for [Frequenz](https://frequenz.com) projects.
77

8-
If offers:
8+
It offers:
99

1010
* [Cookiecutter] templates for scaffolding new projects
11-
* Trivial build of `noxfile.py` with some predefined sessions with all common
12-
checks.
11+
* Trivial build of `noxfile.py` with some predefined sessions that include all
12+
common checks.
1313
* Tools to build protobuf/grpc files as Python, including type information.
1414

1515
## Start a new project
1616

17-
To start a new project you should first [install
17+
To start a new project, you should first [install
1818
Cookiecutter](https://cookiecutter.readthedocs.io/en/stable/installation.html).
1919
It is normally available in any Linux distribution, but some have a very old
20-
version (for example, Ubuntu/Debian). You can [check which version your distro
21-
has in Repology](https://repology.org/project/cookiecutter/versions). You need
22-
**at least version 2.1.0**. To make sure to get an up to date version you can
23-
always uses `pip` and install in a `venv`:
20+
version (for example, Ubuntu/Debian). You can [check which version your distro
21+
has on Repology](https://repology.org/project/cookiecutter/versions). You need
22+
**at least version 2.1.0**. To ensure you get an up-to-date version, you can
23+
always use `pip` and install it in a `venv`:
2424

2525
```console
2626
$ python -m venv cookiecutter
@@ -31,108 +31,109 @@ Collecting cookiecutter
3131
...
3232
```
3333

34-
Then just run cookiecutter where you want to create the new project. A new
34+
Then simply run [Cookiecutter] where you want to create the new project. A new
3535
directory will be created with the generated project name. For example:
3636

3737
```sh
3838
cd ~/devel
3939
cookiecutter gh:frequenz-floss/frequenz-repo-config-python --directory=cookiecutter
4040
```
4141

42-
This will prompt for the project type, name and other configuration and
43-
generate the whole project for you.
42+
This command will prompt you for the project type, name, and other
43+
configuration options, and it will generate the entire project for you.
4444

45-
After completing it and fixing the `TODO`s you can amend the previous commit
46-
using `git commit --amend` or create a new commit for the changes using `git
47-
commit`.
45+
After completing the project and fixing the `TODO`s, you can either amend the
46+
previous commit using `git commit --amend` or create a new commit for the
47+
changes using `git commit`.
4848

4949
### Create the local development environment
5050

51-
To start the development, you need to make sure your environment is correctly
52-
setup. One way to do this is by using a virtual environment and installing all
53-
the dependencies there:
51+
To start development, you need to make sure your environment is correctly set
52+
up. One way to do this is by using a virtual environment and installing all the
53+
dependencies there:
5454

5555
```sh
56-
# requires at least python version 3.11
56+
# requires at least Python version 3.11
5757
python3 -m venv .venv
5858
. .venv/bin/activate
5959
pip install -e .[dev]
6060
```
6161

62-
This will install you package in [*editable*
62+
This will install your package in [*editable*
6363
mode](https://setuptools.pypa.io/en/latest/userguide/development_mode.html), so
64-
you can open a python interpreter and import your package modules and pick up
65-
any local changes without the need to reinstall. You can now run tools
64+
you can open a Python interpreter and import your package modules, picking up
65+
any local changes without the need to reinstall. Now you can run tools
6666
directly, like `pytest`.
6767

6868
### Verify the new repository is healthy using `nox`
6969

70-
If you prefer to keep your virtual enviroment cleaner and avoid installing development dependencies, you can also use `nox` to create isolated environments for you:
70+
If you prefer to keep your virtual environment cleaner and avoid installing
71+
development dependencies, you can also use `nox` to create isolated
72+
environments:
7173

7274
```sh
7375
pip install -e .[dev-noxfile]
7476
nox --install-only # Set up virtual environments once
75-
nox -R # Run linting and testing reusing the already existing virtual environments
77+
nox -R # Run linting and testing reusing the existing virtual environments
7678
```
7779

78-
This will only install you package in *editable* mode and the minimum
79-
dependencies to be able to run `nox`, and then run all `nox` default sessions,
80-
which will run linters and tests.
80+
This will only install your package in *editable* mode and the minimum
81+
dependencies required to run `nox`. It will then run all `nox` default
82+
sessions, which include running linters and tests.
8183

8284
!!! note
8385

84-
It's much faster to use `nox` with `--install-only` once (each time to
85-
change or update dependencies you need to run it again) and then using `nox
86-
-R` to run the sessions without re-creating the virtual environments.
86+
It's much faster to use `nox` with `--install-only` once (each time you
87+
change or update dependencies, you need to run it again) and then use `nox
88+
-R` to run the sessions without recreating the virtual environments.
8789

88-
Otherwise `nox` will create many virtual environments each time you run it,
89-
which is **very** slow.
90+
Otherwise, `nox` will create many virtual environments each time you run
91+
it, which is **very** slow.
9092

9193
### Verify the generated documentation works
9294

93-
To generate the documentation you can use `mkdocs`:
95+
To generate the documentation, you can use `mkdocs`:
9496

9597
```sh
9698
pip install .[dev-mkdocs] # Not necessary if you already installed .[dev]
9799
mkdocs serve
98100
```
99101

100-
If the command fails, look at the log warnings and errors and fix them. If it
101-
worked, now there is a local web server serving the documentation, you can
102-
point your browser to Now you can point your browser to
103-
[http://127.0.0.1:8000](/http://127.0.0.1:8000/) to have a look.
102+
If the command fails, look at the log warnings and errors and fix them. If it
103+
worked, now there is a local web server serving the documentation. You can
104+
point your browser to [http://127.0.0.1:8000](http://127.0.0.1:8000) to have
105+
a look.
104106

105107
!!! info
106108

107-
For API projects `docker` is needed to generate and serve documentation, as
108-
the easiest way to use the [tool to generate the documentation from
109-
`.proto`](https://github.com/pseudomuto/protoc-gen-doc) files is using
109+
For API projects, `docker` is needed to generate and serve documentation,
110+
as the easiest way to use the [tool to generate the documentation from
111+
`.proto` files](https://github.com/pseudomuto/protoc-gen-doc) is using
110112
`docker`.
111113

112-
### Initialize the GitHub pages website
114+
### Initialize the GitHub Pages website
113115

114-
The generated documentation can be easily published via GitHub pages, and it
115-
will be automatically updated for new pushed and releases, but for that to work
116-
correctly, some initial setup is needed:
116+
The generated documentation can be easily published via GitHub Pages, and it
117+
will be automatically updated for new pushes and releases. However, some
118+
initial setup is needed for it to work correctly:
117119

118120
```sh
119121
pip install -e .[dev-mkdocs] # Not necessary if you already installed .[dev]
120122
mike deploy --update-aliases next latest # Creates the branch gh-pages locally
121123
mike set-default latest # Makes the latest alias the default version
122-
git push upstream gh-pages # Pushes the new branch upstream so the website is published
124+
git push upstream gh-pages # Pushes the new branch upstream to publish the website
123125
```
124126

125-
Then make sure that GitHub pages is enabled in
127+
Then make sure that GitHub Pages is enabled in
126128
`https://github.com/<repo-owner>/<repo-name>/settings/pages`.
127129

128130
If all went well, your website should be available soon via
129-
`https://<repo-owner>.github.io//<repo-name>/`.
131+
`https://<repo-owner>.github.io/<repo-name>/`.
130132

131133
## Migrate an existing project
132134

133-
The easiest way to migrate an existing project is to just generate a new one
134-
basing all the inputs in the current project metadata and then overwritting the
135-
existing files.
135+
The easiest way to migrate an existing project is to generate a new one based
136+
on the current project metadata and then overwrite the existing files.
136137

137138
It is recommended to commit all changes before doing this, so you can then use
138139
`git` to look at the changes.
@@ -146,7 +147,7 @@ cookiecutter gh:frequenz-floss/frequenz-repo-config-python --directory=cookiecut
146147
rsync -vr --exclude=.git/ new-project/ /path/to/existing/project
147148
cd /path/to/existing/project
148149
git diff
149-
# Fix all the `TODO`s and cleanup the generated files
150+
# Fix all the `TODO`s and clean up the generated files
150151
git commit -a
151152
```
152153

@@ -155,8 +156,8 @@ git commit -a
155156
The trailing slash in `new-project/` and the lack of it in
156157
`/path/to/existing/project` are meaningful to `rsync`.
157158

158-
Also make sure to **exclude** the `.git/` directory to avoid messing up
159-
with your local git repository.
159+
Also, make sure to **exclude** the `.git/` directory to avoid messing up
160+
with your local Git repository.
160161

161162
!!! tip
162163

@@ -166,10 +167,10 @@ git commit -a
166167

167168
## Update an existing project
168169

169-
To update an existing project you can use the [Cookiecutter *replay
170+
To update an existing project, you can use the [Cookiecutter *replay
170171
file*](https://cookiecutter.readthedocs.io/en/stable/advanced/replay.html) that
171-
was saved during the project generation. The file is saved in
172-
`.cookiecutter-replay.json`. Using this file you can re-run [Cookiecutter]
172+
was saved during the project generation. The file is saved as
173+
`.cookiecutter-replay.json`. Using this file, you can re-run [Cookiecutter]
173174
without having to enter all the inputs again.
174175

175176
!!! warning
@@ -189,17 +190,17 @@ cookiecutter gh:frequenz-floss/frequenz-repo-config-python \
189190

190191
This will create a new commit with all the changes to the overwritten files.
191192
Bear in mind that all the `TODO`s will come back, so there will be quite a bit
192-
of cleanup to do. You can easily check what was changed using `git show`, and
193+
of cleanup to do. You can easily check what was changed using `git show`, and
193194
you can use `git commit --amend` to amend the previous commit with the template
194-
updates, or create a new commit with the fixes. You can also use `git citool`
195-
or `git gui` to easily add, remove or even discard (revert) changes in the
195+
updates, or create a new commit with the fixes. You can also use `git citool`
196+
or `git gui` to easily add, remove, or even discard (revert) changes in the
196197
templates update commit.
197198

198199
!!! note
199200

200201
The `project-directory` is the directory of your previously generated
201202
project. If you renamed it, then the files will be generated in a new
202-
directory with the original name. You can update the target directory in
203+
directory with the original name. You can update the target directory in
203204
the replay file.
204205

205206
!!! note
@@ -218,12 +219,12 @@ templates update commit.
218219
The [Cookiecutter] template uses some tools provided as a library by this
219220
project.
220221

221-
Usually users don't need deal with it directly, but if you project needs some
222-
extra customization (like disabling `nox` sessions or adding new ones, or using
223-
different CLI options for some tools), then you'll need to.
222+
Usually, users don't need to deal with it directly, but if your project needs
223+
some extra customization (like disabling `nox` sessions or adding new ones, or
224+
using different CLI options for some tools), then you'll need to.
224225

225226
You can find information about the extra features in the [API
226-
refence](reference/frequenz/repo/config/).
227+
reference](reference/frequenz/repo/config/).
227228

228229

229230
[Cookiecutter]: https://cookiecutter.readthedocs.io/en/stable

0 commit comments

Comments
 (0)