Thank you for your interest in contributing to the CP-SAT Primer book!
- Discussions and issues are managed in the GitHub repository.
- Feel free to open a new issue for discussions or email me directly.
- All contributions are welcome, and substantial contributions will be recognized with co-authorship.
Each chapter of the book has as a separate Markdown file in the root directory
(e.g., 00_intro.md
for the introduction). If you want to fix typos or add
material, edit these chapters directly in the root directory. Please do not make
edits to the README.md
file as this file will be automatically generated by
running the build.py
script.
If you install pre-commit, formatting and building
will be done automatically for every commit. pre-commit can be installed from
pip via pip install pre-commit
and activated with pre-commit install
in the
repository.
To preview the changes that you make to the book:
-
Install
mdbook
using the official mdBook installation guide. -
From the root directory, run:
python3 build.py
-
Navigate to the
.mdbook
directory:cd .mdbook
-
Build the book:
mdbook build
-
To view and automatically update the book in your browser:
mdbook watch --open .
-
After any changes, rerun
python3 build.py
from the root directory to see the changes reflected in your browser.
-
Fork the repository to your GitHub account.
-
Make your changes directly to the relevant Markdown files in the root directory of your fork.
-
Build and preview your changes locally by following the steps in the Building the Book Locally section above.
python3 build.py cd .mdbook mdbook build mdbook watch --open
-
Commit your changes (including changes to the
README.md
file) with a clear and descriptive commit message:git commit -am "Add description of your changes"
-
Push your changes to your forked repository:
git push origin main
-
Go to the original repository on GitHub and click "New pull request".
-
Select your fork and ensure the changes you want to submit are included.
-
Provide a clear title and description for your pull request, explaining the changes you've made.
-
Submit the pull request for review.
-
Be prepared to make additional changes if requested by the maintainers.
CP-SAT is under rapid development, and its behavior can change from time to time. Therefore, while it is not mandatory, it is highly appreciated if code snippets are converted into simple test cases. These test cases do not need to be complex; even detecting syntax errors when CP-SAT changes is valuable. All test cases will be automatically run every week against the latest version of CP-SAT to ensure that the code snippets remain valid.