-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
806f014
commit dac5d9e
Showing
9 changed files
with
117 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,120 @@ | ||
# Contribution Guide | ||
# Contributing Guide | ||
|
||
Thanks for considering a contribution to this project. Whether you're fixing bugs, adding features, or updating documentation, your effort is appreciated. | ||
Hello and welcome! 🚀 | ||
|
||
## For New Contributors | ||
Thank you for considering a contribution to this project. Your effort, whether it's fixing bugs, adding features, or improving documentation, is deeply valued. | ||
|
||
If this is your first time, welcome! The codebase is documented to help you get started. | ||
## First Time Contributing? | ||
|
||
## Test Environment | ||
|
||
Ensure you run tests in the provided [notebook](playground.ipynb) to validate your changes without causing regressions. | ||
If you're new here, fret not. The codebase is well-documented, guiding you step-by-step. | ||
|
||
## Contribution Workflow | ||
|
||
1. **Fork the Repository** | ||
|
||
Click the fork button to create your personal copy. | ||
Start by forking the repository to your account. | ||
|
||
2. **Clone the Repository** | ||
2. **Clone Your Fork** | ||
|
||
`git clone https://github.com/mohamed-chs/chatgpt-history-export-to-md.git` | ||
```bash | ||
git clone https://github.com/YOUR_USERNAME/chatgpt-history-export-to-md.git | ||
``` | ||
|
||
3. **Create a New Branch** | ||
|
||
Navigate to your directory and create a branch: | ||
Navigate to the cloned directory and initiate a new branch: | ||
|
||
```bash | ||
cd chatgpt-history-export-to-md | ||
git checkout -b your-branch-name | ||
``` | ||
|
||
## Setting Up Your Development Environment | ||
|
||
1. **Set Up a Virtual Environment with `venv`** | ||
|
||
It's advisable to use a virtual environment for an isolated setup: | ||
|
||
```bash | ||
python -m venv .venv | ||
source .venv/bin/activate # On Windows, use `.venv\Scripts\activate` | ||
``` | ||
|
||
2. **Install Development Dependencies** | ||
|
||
With your virtual environment activated: | ||
|
||
```bash | ||
pip install -r requirements-dev.txt | ||
``` | ||
|
||
3. **Development Workflow** | ||
|
||
- **Format the code**: | ||
|
||
```bash | ||
ruff format . | ||
``` | ||
|
||
- **Lint the code**: | ||
|
||
```bash | ||
ruff check . | ||
``` | ||
|
||
- **Type checks**: | ||
|
||
`git checkout -b branch-name` | ||
```bash | ||
mypy --install-types | ||
mypy . | ||
``` | ||
|
||
4. **Make Your Changes** | ||
- **Run tests**: | ||
|
||
Update the code or documentation as needed. | ||
```bash | ||
python -m pytest | ||
``` | ||
|
||
5. **Commit Your Changes** | ||
4. **Additional testing** | ||
|
||
`git commit -m "Brief description of changes"` | ||
You can also check [notebook](playground.ipynb) to see how the output looks. | ||
|
||
6. **Push to Your Fork** | ||
## Committing and Pushing Changes | ||
|
||
`git push origin branch-name` | ||
1. **Commit Your Changes** | ||
|
||
7. **Create a Pull Request** | ||
```bash | ||
git commit -m "Descriptive message about your changes" | ||
``` | ||
|
||
Navigate to the repository and submit a PR. Attach any relevant images or demos to facilitate the review process. | ||
2. **Push Your Branch** | ||
|
||
## Suggestions | ||
```bash | ||
git push origin your-branch-name | ||
``` | ||
|
||
Check the `Issues` tab for bugs, enhancements, or first-timer tasks. If you have a new idea or improvement, feel free to open an issue. | ||
3. **Open a Pull Request (PR)** | ||
|
||
The [Project Todo](TODO.md) and [JavaScript Todo](js/how_to_use.md#still-working-on) also offer areas needing attention. | ||
Navigate to the main repository and initiate a PR. Including demos or screenshots will enrich the review process. | ||
|
||
See also a rough internal dependency graph of the project [here](assets/deps_graph.png) (the graph is not complete, but it gives a general idea of the project's structure). Generated using : | ||
**Note**: Before pushing your changes, ensure that you reset the `user_config.json` file to its original state. (unless you want to add or change the default values) | ||
|
||
```bash | ||
pydeps cli.py -o assets/deps_graph.png -T png --noshow --reverse --rankdir BT --exclude-exact models views controllers | ||
``` | ||
## Seeking Contribution Ideas? | ||
|
||
## Documentation | ||
- Peruse the `Issues` tab for open bugs or feature suggestions. | ||
- Explore the [Project Todo](TODO.md) and [JavaScript Todo](js/how_to_use.md#still-working-on). | ||
- Get a project overview from [here](assets/deps_graph.png). Generated using : | ||
|
||
Refer to the in-code comments and docstrings for understanding and clarity. | ||
```bash | ||
pydeps cli.py -o assets/deps_graph.png -T png --noshow --reverse --rankdir BT --exclude-exact models views controllers utils | ||
``` | ||
|
||
## Code of Conduct | ||
## Documentation Insights | ||
|
||
Maintain a respectful and professional demeanor. Constructive collaboration is key. | ||
Engage with the codebase; in-code comments and docstrings offer ample context. | ||
|
||
## Final Note | ||
## In Closing | ||
|
||
Each contribution, irrespective of its scale, is valuable. Dive in and make a difference! | ||
Every contribution, big or small, enriches the project. We eagerly await your additions! | ||
|
||
Looking forward to your pull request. | ||
Catch you in the PRs! 🚀 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
[tool.ruff] | ||
select = ["ALL"] | ||
|
||
ignore = ["ANN101"] # missing-type-self | ||
ignore = [ | ||
"ANN101", # missing-type-self | ||
"TD002", # missing-todo-author | ||
"TD003", # missing-todo-link | ||
] | ||
|
||
[tool.ruff.per-file-ignores] | ||
"cli.py" = ["T201"] # print statement | ||
"setup.py" = ["T201"] # print statement | ||
"cli.py" = ["T201"] # print | ||
"setup.py" = ["T201"] # print | ||
"tests/*" = ["S101"] # assert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.