Browse Source

[DOC] finish dev and FAQ

tags/v0.3.2
bxdd 1 year ago
parent
commit
6c45da219f
2 changed files with 64 additions and 14 deletions
  1. +56
    -13
      docs/about/dev.rst
  2. +8
    -1
      docs/references/FAQ.rst

+ 56
- 13
docs/about/dev.rst View File

@@ -3,6 +3,26 @@
For Developer 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 Docstring
============ ============
Please use the `Numpydoc Style <https://stackoverflow.com/a/24385103>`_. Please use the `Numpydoc Style <https://stackoverflow.com/a/24385103>`_.
@@ -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. 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: ``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 .. code-block:: bash


@@ -31,21 +51,44 @@ Continuous Integration (CI) tools help you stick to the quality standards by run
python -m pytest tests python -m pytest tests


Development Guidance 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. 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

+ 8
- 1
docs/references/FAQ.rst View File

@@ -1,5 +1,12 @@
.. _faq: .. _faq:
==================== ====================
FAQ
Learnware FAQ
==================== ====================


Learnware Frequently Asked Questions
=====================================
.. contents::
:depth: 1
:local:
:backlinks: none


Loading…
Cancel
Save