Skip to content

Commit 979cc78

Browse files
ydcjeffvfdev-5
andauthored
chore: update REAME.md & CONTRIBUTING.md [skip ci] (#75)
* chore: update REAME.md & CONTRIBUTING.md [skip ci] * chore: tense change [skip ci] * Update CONTRIBUTING.md Co-authored-by: vfdev <vfdev.5@gmail.com>
1 parent 47c3aae commit 979cc78

File tree

4 files changed

+134
-10
lines changed

4 files changed

+134
-10
lines changed

CONTRIBUTING.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Code-Generator Contribution Guide
2+
3+
Hi! Thanks for your interest in contributing to Code-Generator.
4+
Before submitting your contribution, please make sure to take a moment and read through the following guide:
5+
6+
## Repo Setup
7+
8+
**Quickstart guide for first-time contributors**
9+
10+
<details>
11+
12+
- Install [miniconda](https://docs.conda.io/projects/continuumio-conda/en/latest/user-guide/install/index.html) for your system.
13+
14+
- Create an isolated conda environment for Code-Generator:
15+
16+
```sh
17+
conda create -n code-generator-dev python=3.8
18+
```
19+
20+
- Activate the newly created environment:
21+
22+
```sh
23+
conda activate code-generator-dev
24+
```
25+
26+
- When developing please take care of preserving `.gitignore` file and make use of `.git/info/exclude` to exclude custom files like: `.idea`, `.vscode` etc.
27+
28+
- Please refer to [github first contributions guidelines](https://github.com/firstcontributions/first-contributions) and don't hesitate to ask the pytorch-ignite community in case of any doubt.
29+
30+
</details>
31+
32+
To develop and test Code-Generator:
33+
34+
- Fork this repository.
35+
36+
- Clone the repo and install dependencies.
37+
38+
```sh
39+
git clone https://github.com/<your-github-username>/code-generator.git
40+
cd code-generator
41+
pip install -r requirements-dev.txt
42+
```
43+
44+
- Generate and run the tests.
45+
```sh
46+
bash .github/run_test.sh generate
47+
bash .github/run_test.sh unittest
48+
```
49+
50+
## Code development
51+
52+
### Codebase structure
53+
54+
- [app](https://github.com/pytorch-ignite/code-generator/tree/master/app) - Directory containing files about Streamlit App and code generation
55+
- [templates](https://github.com/pytorch-ignite/code-generator/tree/master/templates) - Directory containing ML/DL Templates
56+
- [tests](https://github.com/pytorch-ignite/code-generator/tree/master/tests) - Directory containing test related files
57+
58+
> TIP
59+
>
60+
> If you are adding a new template, use Single Model, Singe Optimizer Template from
61+
> [Code-Generator](https://share.streamlit.io/pytorch-ignite/code-generator) itself
62+
> to generate a base template and extend according to the new template you want to add.
63+
64+
## Pull Request Guidelines
65+
66+
- Checkout a topic branch from a base branch, e.g. `master`.
67+
68+
- If adding a new template:
69+
70+
- Please open a suggestion issue first and have it approved before working on it.
71+
- Add accompanying test cases – internal tests should live in `_test_internal.py` and the rest in `test_all.py`.
72+
73+
- It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.
74+
75+
- Make sure tests pass!
76+
77+
- To ensure the codebase complies with a style guide, we use flake8, black and isort tools to format and check codebase for compliance with PEP8. Install and run with:
78+
79+
```sh
80+
# install code formatting dependencies
81+
bash .github/run_code_style.sh install
82+
# format the codes
83+
bash .github/run_code_style.sh fmt
84+
# lint the codes
85+
bash .github/run_code_style.sh lint
86+
```
87+
88+
**NOTE : When sending a PR, please kindly check if the changes are required to run in the CI.**
89+
90+
For example, typo changes in `CONTRIBUTING.md`, `README.md` are not required to run in the CI. So, please add `[skip ci]` in the PR title to save the resources.
91+
92+
**NOTE : Those skip statement is case sensitive and needs open bracket `[` and close bracket `]`.**
93+
94+
## Sync up with the upstream
95+
96+
First, make sure you have set [upstream](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork) by running:
97+
98+
```sh
99+
git remote add upstream https://github.com/pytorch-ignite/code-generator
100+
```
101+
102+
Then you can see if you have set up multiple remote correctly by running git remote -v:
103+
104+
```sh
105+
origin https://github.com/<your-github-username>/code-generator (fetch)
106+
origin https://github.com/<your-github-username>/code-generator (push)
107+
upstream https://github.com/pytorch-ignite/code-generator (fetch)
108+
upstream https://github.com/pytorch-ignite/code-generator (push)
109+
```
110+
111+
Now you can get the latest development into your forked repository with this:
112+
113+
```sh
114+
git fetch --all --prune
115+
git checkout master
116+
git merge upstream/master
117+
```

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[![Streamlit App][streamlit-img]][streamlit-url]
2+
[![ci][gha-img]][gha-url]
3+
[![Preview App][aws-img]][aws-url]
4+
15
# Code Generator
26

37
Application to generate your training scripts with [PyTorch-Ignite](https://github.com/pytorch/ignite).
@@ -6,22 +10,23 @@ Application to generate your training scripts with [PyTorch-Ignite](https://gith
610
Here should be an image and link to deployed application
711
</div>
812

9-
## How to contribute
13+
## Contribution
1014

11-
Please, see [CONTRIBUTING.md](CONTRIBUTING.md)
15+
Please, see [Contribution Guide](CONTRIBUTING.md).
1216

1317
## Acknowledgements
1418

1519
This project is highly inspired from https://traingenerator.jrieke.com/ project, big thanks to its author Johannes Rieke!
1620

1721
Development of this project is supported by NumFOCUS Small Development Grant. We are very grateful to them for this support!
1822

19-
## Development
20-
21-
```bash
22-
pip install -r requirements-dev.txt
23+
## License
2324

24-
streamlit run app/streamlit_app.py
25-
```
25+
[BSD 3-Clause](LICENSE)
2626

27-
Deployed master version: http://pytorch-ignite-code-generator-dev.eu-west-3.elasticbeanstalk.com/
27+
[aws-img]: https://badgen.net/badge/%20/Deployed%20master%20version/ee4c2c?label=
28+
[aws-url]: http://pytorch-ignite-code-generator-dev.eu-west-3.elasticbeanstalk.com/
29+
[gha-img]: https://github.com/pytorch-ignite/code-generator/actions/workflows/ci.yml/badge.svg
30+
[gha-url]: https://github.com/pytorch-ignite/code-generator/actions/workflows/ci.yml
31+
[streamlit-img]: https://static.streamlit.io/badges/streamlit_badge_black_white.svg
32+
[streamlit-url]: https://share.streamlit.io/pytorch-ignite/code-generator

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ requests
99

1010
# test
1111
pytest
12-
hypothesis

templates/_base/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Base Template
2+
3+
> Directory containing base template files

0 commit comments

Comments
 (0)