From a531f79b71962a74110c541decad9258ae118b0c Mon Sep 17 00:00:00 2001 From: Oleg Nenashev Date: Tue, 8 Aug 2023 12:04:16 +0200 Subject: [PATCH 1/3] Move the contributing guide to the documentation and publish it on the site --- CONTRIBUTING.md | 31 ---------------------- README.md | 8 ++++-- docs/CONTRIBUTING.md | 62 ++++++++++++++++++++++++++++++++++++++++++++ docs/examples.md | 4 +-- examples/README.md | 2 +- mkdocs.yml | 1 + 6 files changed, 72 insertions(+), 36 deletions(-) delete mode 100644 CONTRIBUTING.md create mode 100644 docs/CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index f8051a6..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,31 +0,0 @@ -# Contributing to Python WireMock - -[![a](https://img.shields.io/badge/slack-%23wiremock%2Fpython-brightgreen?style=flat&logo=slack)](https://slack.wiremock.org/) - -## Get Started - -1. Join us ion the `#wiremock-python` channel on the [WireMock Slack](https://slack.wiremock.org/) -2. Check out the GitHub issues! - -## Pull Requests - -General Rules: - -- All Tests must pass -- Coverage shouldn't decrease -- All Pull Requests should be rebased against master **before** submitting the PR. - -## Development - -Setup the project using poetry. - -`poetry install` - -## Contributing examples - -Please submit new examples as a pull requests to the [examples directory](./examples/). -You can also also add links to external examples and tutorials to the `README.md` -file in the directory. - -When adding new examples, -make sure to update the [documentation site page](./docs/examples.md) too. diff --git a/README.md b/README.md index d410298..f2d2747 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ WireMock can run in unit tests, as a standalone process or a container. Key feat - [Testcontainers Python](https://github.com/testcontainers/testcontainers-python) module to easily start WireMock server for your tests - REST API Client for a standalone WireMock Java server -- Support for most of ajor [WireMock features ](https://wiremock.org/docs) (more on their way soon) +- Support for most of major [WireMock features ](https://wiremock.org/docs) (more on their way soon) ## References @@ -33,9 +33,13 @@ WireMock can run in unit tests, as a standalone process or a container. Key feat ## Examples -There are several [example projects](./examples/) included to demonstrate the different ways that wiremock can be used to mock +There are several [example projects](./examples/) included to demonstrate the different ways that WireMock can be used to mock services in your tests and systems. The example test modules demonstrate different strategies for testing against the same "product service" and act as a good demonstration of real world applications to help you get started. - [Testcontainers Python](examples/intro/tests/test_testcontainers.py) - [Standalone Java Server Version](examples/intro/tests/test_java_server.py) + +## Contributing + +See the [Contributor Guide](./docs/CONTRIBUTING.md) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 0000000..25c951a --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1,62 @@ +# Contributing to Python WireMock + +[![a](https://img.shields.io/badge/slack-%23wiremock%2Fpython-brightgreen?style=flat&logo=slack)](https://slack.wiremock.org/) + +WireMock exists and continues to thrive due to the efforts of over 150 contributors, and we continue to welcome contributions to its evolution. Regardless of your expertise and time you could dedicate, there’re opportunities to participate and help the project! + +This page covers contributing to _Python WireMock_. +For generic guidelines and links to other technology stacks, +see [this page](https://wiremock.org/docs/participate/). + +## Get Started + +1. Join us ion the `#wiremock-python` channel on the [WireMock Slack](https://slack.wiremock.org/) +2. Check out the GitHub issues! + +## Pull Requests + +All patches to the repository are done via pull requests. +No special prerequisites exist, you can just submit the patches! +General expectations: + +- All Tests and static checkers must pass +- Code coverage shouldn't decrease +- All Pull Requests should be rebased against master **before** submitting the PR. +- The Pull Request titles represent the change well for users or developers + +## Development + +We use [Poetry](https://python-poetry.org/) for packaging and dependency management. + +After forking and cloning the repository, +run the following command to setup the project: + +`poetry install` + +Then use your favorite IDE for development and testing. + +## Contributing examples + +Please submit new examples as a pull requests to the [examples directory](./examples/). +You can also also add links to external examples and tutorials to the `README.md` +file in the directory. + +When adding new examples, +make sure to update the [documentation site page](./examples.md) too. + +## Working on Documentation + +The documentation is powered by [MkDocs](https://www.mkdocs.org/) and [ReadTheDocs](https://readthedocs.org/). +All the necessary dependencies are included into the Poetry definition. +To build the docs locally: + +```bash +poetry run mkdocs build --site-dir=html +``` + +MkDocs also comes with a built-in dev-server that lets you preview your documentation as you work on it by running the `mkdocs serve` command. +By default, it will deploy the live documentation site to `http://localhost:8000`. + +## See also + +- [Contributing to WireMock](https://wiremock.org/docs/participate/) \ No newline at end of file diff --git a/docs/examples.md b/docs/examples.md index cc3fc0c..e434ad9 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -9,9 +9,9 @@ ## External examples No external examples are referenced at the moment. -Please be welcome to [contribute]([./../CONTRIBUTING.md](https://github.com/wiremock/python-wiremock/blob/master/CONTRIBUTING.md))! +Please be welcome to [contribute](./CONTRIBUTING.md)! ## Contributing examples More examples are always welcome! -See the [Contributor Guide]([./../CONTRIBUTING.md](https://github.com/wiremock/python-wiremock/blob/master/CONTRIBUTING.md)). +See the [Contributor Guide](./CONTRIBUTING.md). diff --git a/examples/README.md b/examples/README.md index 7ea2bec..0156cae 100644 --- a/examples/README.md +++ b/examples/README.md @@ -8,7 +8,7 @@ ## External examples No external examples are referenced at the moment. -Please be welcome to [contribute](./../CONTRIBUTING.md)! +Please be welcome to [contribute](.CONTRIBUTING.md)! ## Contributing diff --git a/mkdocs.yml b/mkdocs.yml index 954e1cd..66a057f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -15,6 +15,7 @@ nav: - Installation: install.md - Testcontainers: testcontainers.md - Standalone: api-client.md + - Contributing: CONTRIBUTING.md - Resources: - Examples: examples.md - Changelog: changelog.md From 9cac92c830df89ae99ddf0c728eb08dd04de4109 Mon Sep 17 00:00:00 2001 From: Oleg Nenashev Date: Tue, 8 Aug 2023 12:08:00 +0200 Subject: [PATCH 2/3] Fix the link in examples README --- examples/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/README.md b/examples/README.md index 0156cae..a4829d1 100644 --- a/examples/README.md +++ b/examples/README.md @@ -8,7 +8,7 @@ ## External examples No external examples are referenced at the moment. -Please be welcome to [contribute](.CONTRIBUTING.md)! +Please be welcome to [contribute](../docs/CONTRIBUTING.md)! ## Contributing From 067f9ccd5f69306f0345791f89cefa5c0c49931e Mon Sep 17 00:00:00 2001 From: Oleg Nenashev Date: Tue, 8 Aug 2023 12:10:57 +0200 Subject: [PATCH 3/3] Fix another dead link --- docs/CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 25c951a..92ef237 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -37,7 +37,8 @@ Then use your favorite IDE for development and testing. ## Contributing examples -Please submit new examples as a pull requests to the [examples directory](./examples/). +Please submit new examples as a pull requests to the +[examples directory]([./examples/](https://github.com/wiremock/python-wiremock/tree/master/examples)). You can also also add links to external examples and tutorials to the `README.md` file in the directory.