Skip to content

Commit b9037f5

Browse files
docs: update CONTRIBUTING.md for JS SDK
1 parent d4bad81 commit b9037f5

1 file changed

Lines changed: 39 additions & 65 deletions

File tree

CONTRIBUTING.MD

Lines changed: 39 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,57 @@
1-
# Contributing to ScrapeGraphAI
1+
# Contributing to scrapegraph-js
22

3-
Thank you for your interest in contributing to **ScrapeGraphAI**! We welcome contributions from the community to help improve and grow the project. This document outlines the guidelines and steps for contributing.
3+
## Setup
44

5-
## Table of Contents
5+
```bash
6+
bun install
7+
```
68

7-
- [Getting Started](#getting-started)
8-
- [Contributing Guidelines](#contributing-guidelines)
9-
- [Code Style](#code-style)
10-
- [Submitting a Pull Request](#submitting-a-pull-request)
11-
- [Reporting Issues](#reporting-issues)
12-
- [License](#license)
9+
## Development
1310

14-
## Getting Started
11+
```bash
12+
bun run build # build to dist/
13+
bun run check # tsc + biome lint
14+
```
1515

16-
To get started with contributing, follow these steps:
16+
## Before committing
1717

18-
1. Fork the repository on GitHub **(FROM pre/beta branch)**.
19-
2. Clone your forked repository to your local machine.
20-
3. Install the necessary dependencies from requirements.txt or via pyproject.toml as you prefere :).
21-
4. Make your changes or additions.
22-
5. Test your changes thoroughly.
23-
6. Commit your changes with descriptive commit messages.
24-
7. Push your changes to your forked repository.
25-
8. Submit a pull request to the pre/beta branch.
18+
Run all checks:
2619

27-
N.B All the pull request to the main branch will be rejected!
20+
```bash
21+
bun run format # auto-fix formatting
22+
bun run lint # check for errors
23+
bunx tsc --noEmit # type check
24+
bun run build # verify build
25+
bun test # unit tests
26+
```
2827

29-
## Contributing Guidelines
28+
## Testing
3029

31-
Please adhere to the following guidelines when contributing to ScrapeGraphAI:
30+
```bash
31+
bun test # unit tests only
32+
bun run test:integration # live API tests (requires SGAI_API_KEY)
33+
```
3234

33-
- Follow the code style and formatting guidelines specified in the [Code Style](#code-style) section.
34-
- Make sure your changes are well-documented and include any necessary updates to the project's documentation and requirements if needed.
35-
- Write clear and concise commit messages that describe the purpose of your changes and the last commit before the pull request has to follow the following format:
36-
- `feat: Add new feature`
37-
- `fix: Correct issue with existing feature`
38-
- `docs: Update documentation`
39-
- `style: Improve formatting and style`
40-
- `refactor: Restructure code`
41-
- `test: Add or update tests`
42-
- `perf: Improve performance`
43-
- Be respectful and considerate towards other contributors and maintainers.
35+
For integration tests, set `SGAI_API_KEY` in your environment or `.env` file.
4436

45-
## Code Style
37+
## Commit messages
4638

47-
Please make sure to format your code accordingly before submitting a pull request.
39+
Use conventional commits:
4840

49-
### Python
41+
- `feat:` new feature
42+
- `fix:` bug fix
43+
- `refactor:` code change (no new feature, no bug fix)
44+
- `chore:` maintenance (deps, config)
45+
- `test:` add/update tests
46+
- `docs:` documentation
5047

51-
- [Style Guide for Python Code](https://www.python.org/dev/peps/pep-0008/)
52-
- [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html)
53-
- [The Hitchhiker's Guide to Python](https://docs.python-guide.org/writing/style/)
54-
- [Pylint style of code for the documentation](https://pylint.pycqa.org/en/1.6.0/tutorial.html)
48+
## Pull requests
5549

56-
## Submitting a Pull Request
57-
58-
To submit your changes for review, please follow these steps:
59-
60-
1. Ensure that your changes are pushed to your forked repository.
61-
2. Go to the main repository on GitHub and navigate to the "Pull Requests" tab.
62-
3. Click on the "New Pull Request" button.
63-
4. Select your forked repository and the branch containing your changes.
64-
5. Provide a descriptive title and detailed description for your pull request.
65-
6. Reviewers will provide feedback and discuss any necessary changes.
66-
7. Once your pull request is approved, it will be merged into the pre/beta branch.
67-
68-
## Reporting Issues
69-
70-
If you encounter any issues or have suggestions for improvements, please open an issue on the GitHub repository. Provide a clear and detailed description of the problem or suggestion, along with any relevant information or steps to reproduce the issue.
50+
1. Fork and create a branch from `main`
51+
2. Make changes
52+
3. Run all checks (see above)
53+
4. Submit PR to `main`
7154

7255
## License
7356

74-
ScrapeGraphAI is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for more information.
75-
By contributing to this project, you agree to license your contributions under the same license.
76-
77-
ScrapeGraphAI uses code from the Langchain
78-
frameworks. You find their original licenses below.
79-
80-
LANGCHAIN LICENSE
81-
https://github.com/langchain-ai/langchain/blob/master/LICENSE
82-
83-
Can't wait to see your contributions! :smile:
57+
MIT - contributions are licensed under the same license.

0 commit comments

Comments
 (0)