Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

CONTRIBUTING.md.txt 4.1 KB

You have to be logged in to leave a comment. Sign In
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
  1. # Contribution Guidelines
  2. We appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us.
  3. Here are a few more things to know:
  4. - [How to Contirbute](#how-to-contribute)
  5. - [Jupyter Notebooks Contribution](#jupyter-notebooks-contribution)
  6. - [Code Style Guidelines](#code-style-guidelines)
  7. ## How to Contribute
  8. Here is a simple guideline to get you started with your first contribution
  9. 1. Use [issues](https://github.com/Deci-AI/super-gradients/issues) to discuss the suggested changes. Create an issue describing changes if necessary and add labels to ease orientation.
  10. 1. [Fork super-gradients](https://help.github.com/articles/fork-a-repo/) so you can make local changes and test them.
  11. 1. Create a new branch for the issue. The branch naming convention is enforced by the CI/CD so please make sure you are using your_username/your_branch_name convention otherwise it will fail.
  12. 1. Create relevant tests for the issue, please make sure you are covering unit, integration and e2e tests where required.
  13. 1. Make code changes.
  14. 1. Ensure all the tests pass and code formatting is up to standards, and follows [PEP8](https://www.python.org/dev/peps/pep-0008/).
  15. <!--1. We use [pre-commit](https://pre-commit.com/) package to run our pre-commit hooks. Black formatter and flake8 linter will be ran on each commit. In order to set up pre-commit on your machine, follow the steps here, please note that you only need to run these steps the first time you use pre-commit for this project.)
  16. * Install pre-commit from pypi
  17. ```
  18. $ pip install pre-commit
  19. ```
  20. * Set up pre-commit inside super-gradients repo which will create .git/hooks directory.
  21. ```
  22. $ pre-commit install
  23. ```
  24. ```
  25. $ git commit -m "message"
  26. ```
  27. * Each time you commit, git will run the pre-commit hooks (black and flake8 for now) on any python files that are getting committed and are part of the git index. If black modifies/formats the file, or if flake8 finds any linting errors, the commit will not succeed. You will need to stage the file again if black changed the file, or fix the issues identified by flake8 and and stage it again.
  28. * To run pre-commit on all files just run
  29. ```
  30. $ pre-commit run --all-files
  31. ```
  32. -->
  33. 7. Create a pull request against <b>master</b> branch.
  34. ## Jupyter Notebooks Contribution
  35. Pulling updates from remote might cause merge conflicts with jupyter notebooks. The tool [nbdime](https://nbdime.readthedocs.io/en/latest/) might solve this.
  36. * Installing nbdime
  37. ```
  38. pip install ndime
  39. ```
  40. * Run a diff between two notebooks
  41. ```
  42. nbdiff notebook_1.ipynb notebook_2.ipynb
  43. ```
  44. ## Code Style Guidelines
  45. We are working hard to make sure all the code in this repository is readable, maintainable and testable.
  46. We follow the Google docstring guidelines outlined on this [styleguide](https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings) page. For example:
  47. ```python
  48. def python_function(first_argument: int, second_argument: int) -> bool:
  49. """
  50. This function will do something with the two arguments.
  51. Args:
  52. first_argument (int): the first argument to the function
  53. second_argument (int): the second argument to the function
  54. Raises:
  55. Exception: arguments should be ints not floats
  56. Returns:
  57. bool: whether or not the calculation was correct
  58. """
  59. ```
  60. ## Documentation
  61. We use GitHub Pages for technical documentation hosting on https://deci-ai.github.io/super-gradients/welcome.html <br>
  62. To generate the docs based on the current work tree, run: <br>
  63. <code>./scripts/generate_docs.sh</code> <br><br>
  64. And the documentation will automatically update, based on <code>documentation/</code>. <br>
  65. The new documentation HTML will be generated to <code>docs/</code>. <br>
  66. Once <code>docs/</code> is committed and pushed, GitHub Pages will use it.<br>
  67. The step of documentation update is currently manual.
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...