Skip to content

Commit

Permalink
docs: Add a page on the procedure for contributing to documentation (#…
Browse files Browse the repository at this point in the history
…196)


---------

Co-authored-by: Stephen Knox <[email protected]>
  • Loading branch information
knoxsp and Stephen Knox authored Jun 12, 2024
1 parent 1b07603 commit 70ba15d
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,5 @@ Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

.DS_Store
1 change: 1 addition & 0 deletions pywr-book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
- [Version control](./model-management/version-control.md)
- [Packaging](./model-management/packaging.md)
- [Deployment & Docker](./model-management/deployment.md)
- [Documentation](./building_documentation.md)
64 changes: 64 additions & 0 deletions pywr-book/src/building_documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Contributing to Documentation

The documentation for Pywr V2 is located in the pywr-next repository, [here](https://github.com/pywr/pywr-next) in the `pywr-book` subfolder.

The documentation is written using 'markdown', a format which enables easy formatting for the web.

This website can help get started: [www.markdownguide.org](https://www.markdownguide.org)

To contribute documentation for Pywr V2, we recommend following the steps below to ensure we can review and integrate any changes as easily as possible.

## Steps to create documentation

1. Fork the pywr-next repository

![Fork the repository](./images/making_documentation/fork.png "Fork")

2. Clone the fork

``` <bash>
git clone https://github.com/MYUSER/pywr-next
```

3. Create a branch

``` <bash>
git checkout -b my-awesome-docs
```

4. Open the book documentation in your favourite editor

``` <bash>
vi pywr-next/pywr-book/introduction.md
```

Which should look something like this:

![An example docs file](./images/making_documentation/docs_example.png "Docs example")

5. Having modified the documentation, add and commit the changes <ins>using the commit format<ins>

```<bash>
git add introduction.md"
```

```<bash>
git commit -m "docs: Add an example documentation"
```

6. Create a pull request from your branch
1. In your fork, click on the 'Pull Requests' tab
![Pull request](./images/making_documentation/pr1.png "Pull Request")

2. Click on 'New Pull Request'
![Pull request](./images/making_documentation/pr2.png "Pull Request")

3. Choose your branch from the drop-down on the right-hand-side
![Pull request](./images/making_documentation/pr3.png "Pull Request")

4. Click 'Create Pull Request' when the button appears
![Pull request](./images/making_documentation/pr4.png "Pull Request")

5. Add a note if you want, and click 'Create Pull Request'
![Pull request](./images/making_documentation/pr5.png "Pull Request")

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pywr-book/src/images/making_documentation/pr2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pywr-book/src/images/making_documentation/pr3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pywr-book/src/images/making_documentation/pr4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pywr-book/src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ It allows users to construct models of water systems using a network of nodes an
The model can then be used to simulate the operation of a water system, and to evaluate the performance of the system under different scenarios.

This version is a major update to the original Pywr model, which was written in Python and Cython.
The new version is written in Rust, and uses Python bindings to expose the functionality to Python.
The new version is written in Rust, and uses Python bindings to expose the functionality to Python.

0 comments on commit 70ba15d

Please sign in to comment.