Contributing¶
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
Bug Reports¶
When reporting a bug, please include:
- Your operating system name and version
- Any details about your local setup that might be helpful in troubleshooting
- Detailed steps to reproduce the bug
Documentation Improvements¶
Logseq Doctor could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such.
Feature Requests and Feedback¶
The best way to send feedback is to file an issue.
If you are proposing a feature:
- Explain in detail how it would work
- Keep the scope as narrow as possible, to make it easier to implement
- Remember that this is a volunteer-driven project, and that code contributions are welcome :)
Development¶
To set up logseq-doctor for local development:
-
Fork logseq-doctor (look for the "Fork" button)
-
Clone your fork locally:
- Set up your local development environment:
This will: - Create a Python virtual environment - Install Python dependencies - Set up Go dependencies - Install development tools
- Create a branch for local development:
Now you can make your changes locally.
- When you're done making changes, run all the checks:
For Python changes:
For Go changes:
Run all tests:
- Commit your changes and push your branch to GitHub:
git add .
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature
- Submit a pull request through the GitHub website
Pull Request Guidelines¶
If you need some code review or feedback while you're developing the code, just make the pull request.
For merging, you should:
- Include passing tests (run
toxfor Python,make test-gofor Go) - Update documentation when there's new API, functionality, etc.
- Add a note to the changelog about the changes
Development Tips¶
Running a Subset of Tests¶
Python:
Go:
Running Tests in Parallel¶
Python:
Go:
Code Style¶
Python:
- We use
blackfor code formatting - We use
rufffor linting - Run
tox -e checkto check code style
Go:
- We use
gofmtfor code formatting - We use
golangci-lintfor linting - Run
make lint-goto check code style
Building Documentation Locally¶
To build and preview the documentation locally:
# Install MkDocs and dependencies
pip install -r docs/requirements.txt
# Serve the documentation locally
mkdocs serve
Then open http://127.0.0.1:8000 in your browser.
Project Structure¶
logseq-doctor/
├── cmd/ # Go CLI commands
├── internal/ # Go internal packages
├── pkg/ # Go public packages
├── src/ # Python source code
├── tests/ # Python tests
├── docs/ # Documentation (MkDocs)
├── main.go # Go main entry point
└── pyproject.toml # Python project configuration
Code of Conduct¶
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Questions?¶
Feel free to open an issue if you have any questions about contributing!