Skip to content

Commit

Permalink
Merge pull request #528 from dgwyer/update-contrib
Browse files Browse the repository at this point in the history
Updated contributing.md
  • Loading branch information
jph00 authored Oct 16, 2024
2 parents 1b97dd8 + ce6d2b5 commit c3f9323
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Make sure you have read the [doc on code style](
https://docs.fast.ai/dev/style.html) first. (Note that we don't follow PEP8, but instead follow a coding style designed specifically for numerical and interactive programming.)

This project uses [nbdev](https://nbdev.fast.ai/getting_started.html) for development. Before beginning, make sure that nbdev and a jupyter-compatible client such as jupyterlab or nbclassic are installed. To make changes, update the notebooks in the `nbs` folder, not the .py files directly. Then, run `nbdev_export`. For more details, have a look at the [nbdev tutorial](https://nbdev.fast.ai/tutorials/tutorial.html). Depending on the code changes, you might also need to run `tools/update.sh` to update python interface modules and [LLM reference material](https://github.com/AnswerDotAI/llms-txt).
This project uses [nbdev](https://nbdev.fast.ai/getting_started.html) for development. Before beginning, make sure that nbdev and a jupyter-compatible client such as jupyterlab or nbclassic are installed. To make changes to the codebase, update the notebooks in the `nbs` folder, not the .py files directly. Then, run `nbdev_export`. For more details, have a look at the [nbdev tutorial](https://nbdev.fast.ai/tutorials/tutorial.html). Depending on the code changes, you might also need to run `tools/update.sh` to update python interface modules and [LLM reference material](https://github.com/AnswerDotAI/llms-txt).

You may want to set up a `prep` alias in `~/.zshrc` or other shell startup file:

Expand All @@ -13,6 +13,28 @@ alias prep='nbdev_export && nbdev_clean && nbdev_trust'

Run `prep` before each commit to ensure your python files are up to date, and you notebooks cleaned of metadata and notarized.

## Updating README.md

Similar to updating Python source code files, to update the `README.md` file you will need to edit a notebook file, specifically `nbs/index.ipynb`.

However, there are a couple of extra dependencies that you need to install first in order to make this work properly. Go to the directory you cloned the repo to, and type:

```
pip install -e '.[dev]'
```

And install quarto too:

```
nbdev_install_quarto
```

Then, after you make subsequent changes to `nbs/index.ipynb`, run the following from the repo's root directory to (re)build `README.md`:

```
nbdev_readme
```

## Did you find a bug?

* Ensure the bug was not already reported by searching on GitHub under Issues.
Expand Down

0 comments on commit c3f9323

Please sign in to comment.