- Notifications
You must be signed in to change notification settings - Fork673
docs: add the start of a contributor's guide#1741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
JohnVillalovos wants to merge1 commit intomainChoose a base branch fromjlvillal/devel_docs
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Draft
Changes fromall commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
50 changes: 50 additions & 0 deletionsdocs/contributor/contributing.rst
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
.. _code-contribution-guide: | ||
============================ | ||
So You Want to Contribute... | ||
============================ | ||
This document provides some necessary points for developers to consider when | ||
writing and reviewing python-gitlab code. The checklist will help developers get | ||
things right. | ||
Getting Started | ||
=============== | ||
If you're completely new to GitHub development and want to contribute to the | ||
python-gitlab project, please start by familiarizing yourself with the `GitHub | ||
Getting Started Guide <https://docs.github.com/en/get-started>`_. This will | ||
help you familiarize yourself with the workflow for the GitHub continuous | ||
integration and testing systems, and help you with your first commit. | ||
Useful Links | ||
------------ | ||
Bug/Task tracker | ||
https://github.com/python-gitlab/python-gitlab/issues | ||
Code Hosting | ||
https://github.com/python-gitlab/python-gitlab | ||
Getting Your Patch Merged | ||
------------------------- | ||
TODO: Document info that will be useful | ||
Bug Reporting | ||
============= | ||
Bugs can reported via our issue tracker at | ||
https://github.com/python-gitlab/python-gitlab/issues | ||
When filing bugs, please include as much detail as possible, and don't be shy. | ||
Essential pieces of information are generally: | ||
* Steps to reproduce the issue. | ||
* Exceptions and surrounding lines from the logs. | ||
* Versions of python-gitlab and Gitlab. | ||
Please also set your expectations of what *should* be happening. | ||
Statements of user expectations are how we understand what is occuring and | ||
how we learn new use cases! |
92 changes: 92 additions & 0 deletionsdocs/contributor/dev-quickstart.rst
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
.. _dev-quickstart: | ||
===================== | ||
Developer Quick-Start | ||
===================== | ||
This is a quick walkthrough to get you started developing code for | ||
python-gitlab. This assumes you are already familiar with submitting code | ||
reviews to a Github based project. | ||
The CI (Continuous Integration) system currently runs the unit tests under | ||
Python 3.7, 3.8, 3.9, and 3.10. It is strongly encouraged to run the unit tests | ||
locally prior to submitting a patch. | ||
Prepare Development System | ||
========================== | ||
System Prerequisites | ||
-------------------- | ||
The following packages cover the prerequisites for a local development | ||
environment on most current distributions. Instructions for getting set up with | ||
non-default versions of Python and on older distributions are included below as | ||
well. | ||
- Ubuntu/Debian:: | ||
sudo apt-get install python3-pip git | ||
- RHEL/CentOS/Fedora:: | ||
sudo dnf install python3-pip git | ||
Python Prerequisites | ||
-------------------- | ||
We suggest to use at least tox 3.24, if your distribution has an older version, | ||
you can install it using pip system-wise or better per user using the --user | ||
option that by default will install the binary under $HOME/.local/bin, so you | ||
need to be sure to have that path in $PATH; for example:: | ||
pip3 install tox --user | ||
will install tox as ~/.local/bin/tox | ||
You may need to explicitly upgrade virtualenv if you've installed the one | ||
from your OS distribution and it is too old (tox will complain). You can | ||
upgrade it individually, if you need to:: | ||
pip3 install -U virtualenv --user | ||
Running Unit Tests Locally | ||
========================== | ||
If you haven't already, python-gitlab source code should be pulled directly from git:: | ||
# from your home or source directory | ||
cd ~ | ||
git clone https://github.com/python-gitlab/python-gitlab | ||
cd python-gitlab | ||
Running Unit and Style Tests | ||
---------------------------- | ||
All unit tests should be run using tox. To run python-gitlab's entire test suite:: | ||
# to run the py3 unit tests, and the style tests | ||
tox | ||
To run a specific test or tests, use the "-e" option followed by the tox target | ||
name. For example:: | ||
# run the unit tests under py310 (Python 3.10) and also run the pep8 tests | ||
tox -e py310,pep8 | ||
You may pass options to the test programs using positional arguments. | ||
To run a specific unit test, this passes the desired test | ||
(regex string) to `pytest <https://docs.pytest.org/en/latest/>`_:: | ||
# run tests for Python 3.8 which match the string 'test_projects' | ||
tox -e py310 -- -k test_projects | ||
Additional Tox Targets | ||
---------------------- | ||
There are several additional tox targets not included in the default list, such | ||
as the target which builds the documentation site. See the ``tox.ini`` file | ||
for a complete listing of tox targets. These can be run directly by specifying | ||
the target name:: | ||
# generate the documentation pages locally | ||
tox -e docs |
23 changes: 23 additions & 0 deletionsdocs/contributor/index.rst
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. python-gitlab documentation master file, created by | ||
sphinx-quickstart on Mon Dec 8 15:17:39 2014. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Developer's Guide | ||
================= | ||
Contents: | ||
.. toctree:: | ||
:maxdepth: 2 | ||
Developer Contribution Guide <contributing> | ||
Setting Up Your Development Environment <dev-quickstart> | ||
Indices and tables | ||
================== | ||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
1 change: 1 addition & 0 deletionsdocs/index.rst
This file contains hidden or 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 |
---|---|---|
@@ -18,6 +18,7 @@ Contents: | ||
api-objects | ||
api/gitlab | ||
cli-objects | ||
contributor/index | ||
changelog | ||
release-notes | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.