From 6c45da219fa0ce5f606e06e90f520b9b5a6b4cb1 Mon Sep 17 00:00:00 2001 From: bxdd Date: Sun, 31 Dec 2023 03:19:02 +0800 Subject: [PATCH] [DOC] finish dev and FAQ --- docs/about/dev.rst | 69 +++++++++++++++++++++++++++++++++-------- docs/references/FAQ.rst | 9 +++++- 2 files changed, 64 insertions(+), 14 deletions(-) diff --git a/docs/about/dev.rst b/docs/about/dev.rst index 309d1dc..aa1ac04 100644 --- a/docs/about/dev.rst +++ b/docs/about/dev.rst @@ -3,6 +3,26 @@ For Developer ================ + +Commit Format +============== + +Please submit in the following manner: Submit using the format ``prefix`` + ``space`` + ``suffix``. +There are four choices for the prefix, and they can be combined using commas: + +- [ENH]: Represents enhancement, indicating the addition of new features. +- [DOC]: Indicates modifications to the documentation. +- [FIX]: Represents bug fixes and typo corrections. +- [MNT]: Indicates other minor modifications, such as version updates. + +The suffix specifies the specific nature of the modification, with the initial letter capitalized. + +Examples: The following are all valid: + +- [DOC] Fix the document +- [FIX, ENH] Fix the bug and add some feature" + + Docstring ============ Please use the `Numpydoc Style `_. @@ -15,7 +35,7 @@ Continuous Integration Continuous Integration (CI) tools help you stick to the quality standards by running tests every time you push a new commit and reporting the results to a pull request. ``Learnware Market`` will check the following tests when you pull a request: -1. We will check your code style pylint, you can fix your code style by the following commands: +1. We will check your code length, you can fix your code style by the following commands: .. code-block:: bash @@ -31,21 +51,44 @@ Continuous Integration (CI) tools help you stick to the quality standards by run python -m pytest tests Development Guidance -================================= +======================= As a developer, you often want make changes to ``Learnware Market`` and hope it would reflect directly in your environment without reinstalling it. You can install ``Learnware Market`` in editable mode with following command. -- For Windows and Linux users: +.. code-block:: bash + + $ git clone https://github.com/Learnware-LAMDA/Learnware.git && cd learnware + $ python setup.py install + + +``pre-commit`` Config +======================== + +The ``Learnware`` Package support config ``pre-commit``. Run the following command to install ``pre-commit``: + +.. code-block:: bash + + pip install pre-commit + + +Run the following command in the root directory of ``Learnware`` Project to enable ``pre-commit``: + +.. code-block:: bash + + pre-commit install + +``isort`` Config +=================== - .. code-block:: bash - - $ git clone https://git.nju.edu.cn/learnware/learnware-market.git && cd learnware-market - $ python setup.py install +The codes in the ``Learnware`` Package will be processed by ``isort``(``examples`` and ``tests`` are excluded). Run the following command to install ``isort``: + +.. code-block:: bash + + pip install isort + +Run the following command in the root directory of ``Learnware`` Project to run ``isort``: + +.. code-block:: bash -- For macOS users: + isort learnware --reverse-relative - .. code-block:: bash - - $ conda install -c pytorch faiss - $ git clone https://git.nju.edu.cn/learnware/learnware-market.git && cd learnware-market - $ python setup.py install \ No newline at end of file diff --git a/docs/references/FAQ.rst b/docs/references/FAQ.rst index 0b7fe8c..9a10bca 100644 --- a/docs/references/FAQ.rst +++ b/docs/references/FAQ.rst @@ -1,5 +1,12 @@ .. _faq: ==================== -FAQ +Learnware FAQ ==================== +Learnware Frequently Asked Questions +===================================== +.. contents:: + :depth: 1 + :local: + :backlinks: none +