1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
# Code Contributions
!!! note "Prerequisites"
This guide assumes you are already familiar with our [setup guide](./setup.md).
## Development Workflow
Create a new branch for your code changes:
```sh
git checkout -b fix/your-fix-name # for bug fixes
# or
git checkout -b site/website-name # for new site scrapers
# or
git checkout -b feature/feature-name # for new features
```
After making your changes commit them:
```bash
git add -p # Review changes before adding them
git commit -m "meaningful commit message"
git push origin your-branch-name
```
Then create a Pull Request back to the [main repository](https://github.com/hhursev/recipe-scrapers) from your fork.
## Development Guidelines
While we're working on comprehensive documentation, the codebase is designed to
be self-explanatory. As a developer, you can understand our patterns and expectations
by taking a look at existing scrapers in the `recipe_scrapers/` directory.
## Hints
!!! tip "Generator Tool"
If you're adding a new site scraper, you can use our generator command to create a template:
```sh
python generate.py <ClassName> <URL>
```
Where:
- `ClassName`: The name of your new scraper class (e.g., `BBCGoodFood`)
- `URL`: A sample recipe URL from the target site. This will be saved in `test_data/`
for testing.
## Examples
!!! warning "Work in Progress"
This contributing guide is currently being developed. Meanwhile, you can check these
PRs as examples of good contribution standards:
- [#1414](https://github.com/hhursev/recipe-scrapers/pull/1414/) - Adding a new site scraper
- [#1432](https://github.com/hhursev/recipe-scrapers/pull/1432/) - Fixing broken functionality
- [#1434](https://github.com/hhursev/recipe-scrapers/pull/1434/) - Test improvements
- [#1345](https://github.com/hhursev/recipe-scrapers/pull/1345/) - CI Improvements
|