You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

dev.rst 1.6 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. .. _dev:
  2. =============
  3. Code Standard
  4. =============
  5. Docstring
  6. ============
  7. Please use the `Numpydoc Style <https://stackoverflow.com/a/24385103>`_.
  8. You can fix the bug by inputting the following code in the command line.
  9. Continuous Integration
  10. ======================
  11. 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.
  12. ``Learnware Market`` will check the following tests when you pull a request:
  13. 1. We will check your code style pylint, you can fix your code style by the following commands:
  14. .. code-block:: bash
  15. pip install black
  16. python -m black . -l 120
  17. 2. We will check the pytest, you commit should can pass all tests in the tests directory. Run the following commands to check:
  18. .. code-block:: bash
  19. pip install pytest
  20. python -m pytest tests
  21. Development Guidance
  22. =================================
  23. 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.
  24. - For Windows and Linux users:
  25. .. code-block:: bash
  26. $ git clone https://git.nju.edu.cn/learnware/learnware-market.git && cd learnware-market
  27. $ python setup.py install
  28. - For macOS users:
  29. .. code-block:: bash
  30. $ conda install -c pytorch faiss
  31. $ git clone https://git.nju.edu.cn/learnware/learnware-market.git && cd learnware-market
  32. $ python setup.py install