Skip to content

Commit

Permalink
docs/developing.md: Update outdated steps (#645)
Browse files Browse the repository at this point in the history
Update formatting to use ruff and provide some background info
about how the pip modules are installed.

---------

Signed-off-by: Michael Kubacki <[email protected]>
  • Loading branch information
makubacki authored Oct 1, 2024
1 parent 8bd86b1 commit 392b8fb
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions docs/contributor/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,29 +73,33 @@

## Testing

1. Run a Basic Syntax/Lint Check (using flake8) and resolve any issues
PIP modules used in this section such as `ruff` and `pydocstyle` are installed when you run `pip install -e .[dev]`
as described above.

``` cmd
flake8 .
```
> See [`pyproject.toml`](../../pyproject.toml) for the full list of development dependencies.
INFO: Newer editors are very helpful in resolving source formatting errors
(whitespace, indentation, etc). In VSCode open the py file and use
++alt+shift+f++ to auto format.
1. Run a Basic Syntax/Lint Check (using ruff) and resolve any issues

2. Run a Basic Python docstring Check (using pydocstring) and resolve any issues
* Run ruff

``` cmd
pydocstyle edk2toollib
```
``` cmd
ruff check .
```

* Note: Newer editors are very helpful in resolving source formatting errors. For example, in VSCode, you can
open the Python file and use `Alt+Shift+F` to auto format. See the [Ruff VSCode extension](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)
for more information.

* Note: `ruff` is a wrapper around tools like `pydocstyle`. See [`pyproject.toml`](../../pyproject.toml) for
more details.

3. Run the `BasicDevTests.py` script to check file encoding, file naming, etc
2. Run the `BasicDevTests.py` script to check file encoding, file naming, etc

```cmd
BasicDevTests.py
```

4. Run Coverage with pytest test execution
3. Run Coverage with pytest test execution

``` cmd
coverage run -m pytest
Expand All @@ -106,19 +110,19 @@

Coverage is uploaded to `codecov.io`.

5. Generate and review the html report
4. Generate and review the html report

```cmd
coverage html
```

6. Run the spell checker
5. Run the spell checker

```cmd
cspell -c .cspell.json "**/*.py" "**/*.md"
```

7. Run the markdown linter
6. Run the markdown linter

```cmd
markdownlint "**/*.md"
Expand Down

0 comments on commit 392b8fb

Please sign in to comment.