Skip to content

Commit e0ab462

Browse files
authored
Merge pull request #1 from BigThinkcode/initial
Add initial project setup
2 parents 6cd13ee + 3fa3d78 commit e0ab462

37 files changed

Lines changed: 6233 additions & 2 deletions

CONTRIBUTING.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# How to Contribute to python-rest-tester
2+
3+
We're excited that you're interested in contributing to python-rest-tester! :+1: Your help is greatly appreciated.
4+
5+
To ensure a smooth contribution process, please follow the guidelines below.
6+
7+
- [Reporting Issues and Bugs](#reporting-issues-and-bugs)
8+
- [Requesting Features](#requesting-features)
9+
- [Submitting Your Contributions](#submitting-your-contributions)
10+
11+
## Reporting Issues and Bugs
12+
13+
Found a bug? Here’s how you can help:
14+
15+
1. **Search for Existing Issues**: Before opening a new issue, please check the [issue tracker](https://github.com/BigThinkcode/python-rest-tester/issues) to see if the problem has already been reported. If it has, you can contribute additional information for the issue.
16+
17+
2. **Create a Minimal Reproduction**: To help us understand and fix the issue, please provide a minimal reproduction scenario. This can be a repository or a code snippet a [Gist](https://gist.github.com/). Include:
18+
- Version of python-rest-tester
19+
- Detailed steps to reproduce the issue
20+
21+
3. **Submit a New Issue**: If no existing issue matches your problem, open a new issue using [this form](https://github.com/BigThinkcode/python-rest-tester/issues/new).
22+
23+
## Requesting Features
24+
25+
Do you have a feature in mind that would make Python REST Tester better? Here’s how to proceed:
26+
27+
1. **Check for Existing Requests**: Look through the [issue tracker](https://github.com/BigThinkcode/python-rest-tester/issues) to see if the feature has already been requested. If it has, feel free to add your thoughts and vote for it.
28+
29+
2. **Submit a New Feature Request**: If the feature is not yet requested, open a new issue with a detailed description of the feature, including:
30+
- What the feature does
31+
- Why it would be useful
32+
- Any implementation ideas you might have
33+
34+
35+
## Submitting Your Contributions
36+
37+
Ready to contribute code? Follow these steps to ensure your contribution is properly reviewed and integrated:
38+
39+
1. **Fork the Repository**: Create a fork of the `python-rest-tester` repo on GitHub.
40+
41+
2. **Create a New Branch**: Use a descriptive name for your branch (e.g., `new-feature`).
42+
43+
3. **Make Your Changes**: Implement your feature or fix. Be sure to include appropriate comments, test cases if needed.
44+
45+
4. **Commit Your Changes**: Write a descriptive commit message.
46+
47+
```shell
48+
git commit -am "Add new feature to python-rest-tester"
49+
```
50+
5. **Push Your Branch**: Push your branch to your fork on GitHub.
51+
52+
```shell
53+
git push origin new-feature
54+
```
55+
56+
6. **Open a Pull Request**: Go to your forked repository and create a pull request. Provide a clear description of your changes.
57+
58+
7. **Address Feedback**: If maintainers request changes, make the updates in your branch and push them.
59+
60+
Thank you for contributing to python-rest-tester framework! Your help is greatly appreciated and helps make this project better for everyone.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 BigThinkCode Technologies Private Limited
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
help: ## Display this help message
2+
@echo "Available commands:"
3+
@echo "[For docker related]"
4+
@awk 'BEGIN {FS = ":.*?##"}; /^[a-zA-Z0-9_-]+:.*?##/ {if ($$0 ~ /\(docker\)/) {sub(" \\(docker\\)", "", $$2); printf " \033[36m%-25s\033[0m %s\n", $$1, $$2}}' $(MAKEFILE_LIST) | sort
5+
@echo "[For app related]"
6+
@awk 'BEGIN {FS = ":.*?##"}; /^[a-zA-Z0-9_-]+:.*?##/ {if ($$0 ~ /\(app\)/) {sub(" \\(app\\)", "", $$2); printf " \033[36m%-25s\033[0m %s\n", $$1, $$2}}' $(MAKEFILE_LIST) | sort
7+
8+
9+
run-dev-shell: ## Run the application in Dev mode once build completed as interactive shell(docker)
10+
sudo docker compose -f deployment/dev-docker-compose.yml run --rm -i --entrypoint bash rest_tester
11+
12+
run-dev: ## Run the application in Dev mode once build completed straight away (docker)
13+
sudo docker compose -f deployment/dev-docker-compose.yml run rest_tester make test-with-report
14+
15+
run-prod: ## Run the application in Prod mode once build completed (docker)
16+
sudo docker compose -f deployment/prod-docker-compose.yml run rest_tester make test-with-report
17+
18+
local-remove-images: ## Removes locally present dangling images (docker)
19+
sudo docker image prune -f
20+
21+
22+
23+
lint: ## Lint (app)
24+
poetry run python3 -m black --line-length 120 .
25+
26+
check-lint: ## Check Lint (app)
27+
poetry run python3 -m black --check --line-length 120 .
28+
29+
test: ## To performs all tests (app)
30+
poetry run pytest rest_tester/main.py -s -rA
31+
32+
test-with-report: ## To performs all tests and generate a HTML report file (app)
33+
poetry run pytest rest_tester/main.py -s -rA --html=rest_tester/report/report_`date +%Y-%m-%d-%H:%M:%S`.html --css=rest_tester/report/assets/custom.css --self-contained-html

PULL_REQUEST_TEMPLATE.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
3+
4+
## Description
5+
<!--- Describe your changes in detail -->
6+
7+
## Any relevant logs, error output, etc?
8+
<!-- If it’s long, please paste to https://gist.github.com/ and insert the link here. -->
9+
10+
## Any other comments?
11+
12+
## Related Issue
13+
<!--- This project only accepts pull requests related to open issues -->
14+
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
15+
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
16+
<!--- Please link to the issue here: -->
17+
18+
## Motivation and Context
19+
<!--- Why is this change required? What problem does it solve? -->
20+
21+
## How Has This Been Tested?
22+
<!--- Please describe in detail how you tested your changes. -->
23+
<!--- Include details of your testing environment, and the tests you ran to -->
24+
<!--- see how your change affects other areas of the code, etc. -->
25+
26+
## Screenshots (if appropriate):
27+
28+
## Types of changes
29+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
30+
- [ ] Bug fix (non-breaking change which fixes an issue)
31+
- [ ] New feature (non-breaking change which adds functionality)
32+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
33+
34+
## Checklist:
35+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
36+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
37+
- [ ] My code follows the code style of this project.
38+
- [ ] My change requires a change to the documentation.
39+
- [ ] I have updated the documentation accordingly.
40+
- [ ] I have read the **CONTRIBUTING** document.
41+
- [ ] I have added tests to cover my changes.
42+
- [ ] All new and existing tests passed.
43+
- [ ] Your commits messages format follows this project's git commit message format
44+
45+
## Further comments
46+
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

0 commit comments

Comments
 (0)