You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/developer.contributing.rst
+52-20Lines changed: 52 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,50 +45,82 @@ version.
45
45
git clone https://github.com/gambitproject/gambit.git # or your fork URL
46
46
cd gambit
47
47
48
-
3. Create a new branch for your changes ::
48
+
3. Follow the instructions in the :ref:`building-from-source` page to set up your development environment and build Gambit from source. If you only plan to make changes to the PyGambit Python code, you can skip to :ref:`build-python`.
49
+
50
+
4. Create a new branch for your changes ::
49
51
50
52
git checkout -b feature/your-feature-name
51
53
52
-
4. Make your changes. Commit each change with a clear commit message ::
54
+
5. Make your changes. Commit each change with a clear commit message ::
53
55
54
56
git add .
55
57
git commit -m "Add feature X or fix bug Y"
56
58
57
-
5. Push your changes to your fork or branch ::
59
+
6. Push your changes to your fork or branch ::
58
60
59
61
git push origin feature/your-feature-name
60
62
61
-
6. Open a pull request on GitHub to the master branch of the upstream repository, describing your changes and linking to any relevant issues.
62
-
7. Core developers will review your changes, provide feedback, and merge them into the master branch if they meet the project's standards.
63
+
7. Open a pull request on GitHub to the master branch of the upstream repository, describing your changes and linking to any relevant issues.
64
+
8. Core developers will review your changes, provide feedback, and merge them into the master branch if they meet the project's standards.
65
+
66
+
Testing your changes
67
+
--------------------
68
+
69
+
Be sure to familiarise yourself with :ref:`contributing-code` before reading this section.
70
+
71
+
By default, pull requests on GitHub will trigger the running of Gambit's test suite using GitHub Actions.
72
+
You can also run the tests locally before submitting your pull request, using `pytest`.
73
+
74
+
1. Install the test dependencies (into the virtual environment where you installed PyGambit): ::
75
+
76
+
pip install -r tests/requirements.txt
77
+
78
+
2. Navigate to the Gambit repository and run the tests: ::
79
+
80
+
pytest
81
+
82
+
Adding to the test suite
83
+
^^^^^^^^^^^^^^^^^^^^^^^^
84
+
85
+
Tests can be added to the test suite by creating new test files in the ``tests`` directory.
86
+
Tests should be written using the `pytest` framework.
87
+
Refer to existing test files for examples of how to write tests or see the `pytest documentation <https://docs.pytest.org/en/stable/>`_ for more information.
88
+
63
89
64
90
Editing this documentation
65
-
--------------------------
91
+
---------------------------
66
92
67
-
1. `Install Pandoc <https://pandoc.org/installing.html>`_ for your OS
93
+
Be sure to familiarise yourself with :ref:`contributing-code` before reading this section.
68
94
69
-
2. If you haven't already, clone the Gambit repository from GitHub: ::
95
+
You can make changes to the documentation by editing the `.rst` files in the ``doc`` directory.
96
+
Creating a pull request with your changes will automatically trigger a build of the documentation via the ReadTheDocs service, which can be viewed online.
97
+
You can also build the documentation locally to preview your changes before submitting a pull request.
1. `Install Pandoc <https://pandoc.org/installing.html>`_ for your OS
73
100
74
-
3. Either install the docs requirements into your existing PyGambit development environment, or create a new virtual environment and install both the requirements and PyGambit there. For example, you can use `venv` to create a new environment: ::
101
+
2. Install the docs dependencies (into the virtual environment where you installed PyGambit): ::
75
102
76
-
python -m venv docenv
77
-
source docenv/bin/activate
103
+
pip install -r doc/requirements.txt
78
104
79
-
4. Install the requirements and make the docs: ::
105
+
3. Navigate to the Gambit repo and build the docs: ::
80
106
81
-
pip install .
82
107
cd doc
83
-
pip install -r requirements.txt
84
108
make html # or make livehtml for live server with auto-rebuild
85
109
86
-
5. Open ``doc/_build/html/index.html`` in your browser to view the documentation.
110
+
4. Open ``doc/_build/html/index.html`` in your browser to view the documentation.
111
+
112
+
113
+
114
+
115
+
Recognising contributions
116
+
-------------------------
87
117
88
-
6. Make any changes you want to the `.rst` files in the ``doc`` directory and rebuild the documentation to check your changes.
118
+
Gambit is set up with `All Contributors <https://allcontributors.org/>`__ to recognise all types of contributions, including code, documentation, bug reports, and more.
89
119
90
-
7. Follow the usual GitHub workflow (see :ref:`contributing-code` above) to commit your changes and push them to the repository.
120
+
You can see the list of contributors on the README page of the `Gambit GitHub repo <https://github.com/gambitproject/gambit>`__.
91
121
92
-
8. Core developers will review your changes and merge to the master branch, which automatically deploys the documentation via the ReadTheDocs service.
122
+
To add a contributor, comment on a GitHub Issue or Pull Request, asking @all-contributors to add a contributor:
93
123
124
+
@all-contributors please add @<username> for <contributions>
94
125
126
+
Refer to the `emoji key <https://allcontributors.org/docs/en/emoji-key>`__ for a list of contribution types.
0 commit comments