Skip to content

Commit

Permalink
DOCS: Use intersphinx to link to Cython documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sebp committed Dec 30, 2023
1 parent 3d95dce commit b799328
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
5 changes: 4 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@
"issue": ("https://github.com/sebp/scikit-survival/issues/%s", "#%s"),
}

intersphinx_mapping = {"sklearn": ("https://scikit-learn.org/1.3", None)}
intersphinx_mapping = {
"sklearn": ("https://scikit-learn.org/1.3", None),
"cython": ("https://cython.readthedocs.io/en/latest/", None),
}


def linkcode_resolve(domain, info):
Expand Down
28 changes: 24 additions & 4 deletions doc/contributing.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _contributing:

Contributing Guidelines
=======================

Expand All @@ -13,7 +15,10 @@ scikit-survival is developed on `GitHub`_ using the `Git`_ version control syste
The preferred way to contribute to scikit-survival is to fork
the main repository on GitHub, then submit a *pull request* (PR).

Creating a fork

.. _forking:

Creating a Fork
---------------

These are the steps you need to take to create a copy of the scikit-survival repository
Expand All @@ -33,6 +38,8 @@ on your computer.
cd scikit-survival


.. _setup-dev-environment:

Setting up a Development Environment
------------------------------------

Expand All @@ -58,6 +65,9 @@ These are the steps you need to take.

pip install -e .[dev]


.. _making-changes-to-code:

Making Changes to the Code
--------------------------
For a pull request to be accepted, your changes must meet the below requirements.
Expand Down Expand Up @@ -97,6 +107,9 @@ For a pull request to be accepted, your changes must meet the below requirements
is compatible and include the license information in the contributed files,
or obtain a permission from the original author to relicense the contributed code.


.. _submit-pull-request:

Submitting a Pull Request
-------------------------

Expand All @@ -120,6 +133,8 @@ Submitting a Pull Request
4. `Create a pull request <https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request>`_.


.. _building-documentation:

Building the Documentation
--------------------------

Expand All @@ -134,12 +149,17 @@ of the documentation, run::

xdg-open _build/html/index.html

Building Cython code

.. _building-cython-code:

Building Cython Code
--------------------

Part of the code base is written in `Cython`_. To rebuild this code after making changes, please re-run the install command from the 'Setting up a Development Environment' section.
Part of the code base is written in `Cython`_. To rebuild this code after making changes,
please re-run the install command from the :ref:`setup-dev-environment` section.

If you are new to Cython you may find the project's documentation on `debugging <https://cython.readthedocs.io/en/latest/src/userguide/debugging.html>`_ and `profiling <https://cython.readthedocs.io/en/latest/src/tutorial/profiling_tutorial.html>`_ helpful.
If you are new to Cython you may find the project's documentation on
:ref:`debugging <cython:debugging>` and :ref:`profiling <cython:profiling>` helpful.

.. _conda: https://conda.io/miniconda.html
.. _Cython: https://cython.org
Expand Down

0 comments on commit b799328

Please sign in to comment.