Skip to content

Commit ed8dff8

Browse files
authored
Add Project Documentation (#678)
1 parent 66e2069 commit ed8dff8

6 files changed

Lines changed: 88 additions & 30 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
- [how-to-run-the-solution.md (manditory)](#how-to-run-the-solutionmd-manditory)
1515
- [Language Article](#language-article)
1616
- [description.md (manditory)](#descriptionmd-manditory)
17+
- [Project Article](#project-article)
18+
- [description.md (manditory)](#descriptionmd-manditory-1)
19+
- [requirements.md (manditory)](#requirementsmd-manditory)
1720
- [Images](#images)
1821
- [General Guidelines](#general-guidelines-1)
1922
- [Title Image](#title-image)
@@ -33,6 +36,7 @@ Before making a pull request, please create one of the following issues:
3336

3437
- [Sample Program Article][1]
3538
- [Language Article][2]
39+
- [Project Article][17]
3640

3741
### Pull Requests
3842

@@ -50,6 +54,7 @@ Please make sure that your pull request follows these guidelines:
5054
For example, https://sampleprograms.io/languages/ada/. You can tell that this is a stub because
5155
the "Description" section indicates that the section is not available. For more information on
5256
how to write a language article, see [this](#general-guidelines) and [this](#language-article).
57+
- For a project article, see [this](#general-guidelines) and [this](#project-article).
5358
- The [Website Automation][3] passes.
5459

5560
## Articles
@@ -64,7 +69,7 @@ Please make sure that your article follows these guidelines:
6469
[this guide][5].
6570
- If you use someone else's work, please cite your references.
6671
- If your article requires multiple files (such as a sample program article) and you use
67-
numbered references, the numbers *must* be unique\. For example, you have this for your last
72+
numbered references, the numbers *must* be unique. For example, you have this for your last
6873
numbered reference in the first file:
6974

7075
```markdown
@@ -179,6 +184,37 @@ asm
179184
```
180185
</pre>
181186

187+
### Project Article
188+
189+
A project article describes a new or existing project. For a new project, please see the
190+
[Requirements for a New Project section of the Sample Programs Contributing Guide][19].
191+
192+
Files for this article are placed in the `sources/project/<project>` folder, where:
193+
194+
- `<project>` is the project name in lowercase, with spaces converted to dashes. For example,
195+
`binary-search` for the "Binary Search" project.
196+
197+
This folder must be created. The next sections describe the files that go into this folder.
198+
Images go into the same folder. These are optional. See [Images](#images) for details.
199+
200+
#### description.md (manditory)
201+
202+
This file describes a new or existing project. It gives some background information on the
203+
project and provides enough details that someone can implement a sample program in their chosen
204+
language. It should provide an example that demonstrates what the project does for some sample
205+
input (if applicable).
206+
207+
#### requirements.md (manditory)
208+
209+
This file describes the inputs, outputs, and constraints of this project in general terms. For example:
210+
211+
<pre>
212+
Create a file called "Even Odd" using the naming convention appropriate for your language of choice.
213+
214+
Write a sample program which accepts an integer on the command line and outputs if the integer is Even
215+
or Odd. For a missing input or an input that is not an integer, an error message is output.
216+
</pre>
217+
182218
## Images
183219

184220
Images may be one of the following (unless otherwise noted):
@@ -227,6 +263,8 @@ same image as the project:
227263

228264
For language articles, [this][11] is the default image.
229265

266+
For project articles, [this][18] is the default image.
267+
230268
### Other Images
231269

232270
Other images may be added to your articles to help clarify key points more clearly than words
@@ -243,8 +281,9 @@ Local images are referenced like this:
243281
where `<image-directory>` is one of the following directories, and `<image-filename>`
244282
is the filename of the image:
245283

246-
* Sample program article: `/assets/images/projects/<language>/<project>`
284+
* Sample program article: `/assets/images/projects/<project>/<language>`
247285
* Language article: `/assets/images/languages/<language>`
286+
* Project article: `/assets/images/projects/<project>`
248287

249288
For example:
250289

@@ -289,8 +328,8 @@ Now, run `./generate.sh`. This will build the website, create a temporary web se
289328
up the home webpage in your default browser at `http://localhost:8000/index.html`. When you are done,
290329
just press Ctrl+C to exit the web server.
291330

292-
[1]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/new?assignees=&labels=sample+program&projects=&template=sample-program-article-request.md&title=Add+%5BSample+Program%5D+in+%5BLanguage%5D+Article
293-
[2]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/new?assignees=&labels=language&projects=&template=language-article-request.md&title=Add+%5BLanguage%5D+Language+Article
331+
[1]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/new?assignees=&labels=sample+program&projects=&template=sample-program-article-request.md&title=Add+{PROGRAM}+in+{LANGUAGE}+Article
332+
[2]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/new?assignees=&labels=language&projects=&template=language-article-request.md&title=Add+{LANGUAGE}+Language+Article
294333
[3]: https://github.com/TheRenegadeCoder/sample-programs-website/actions/workflows/main.yml
295334
[4]: https://github.com/TheRenegadeCoder/sample-programs
296335
[5]: https://www.markdownguide.org/basic-syntax/
@@ -305,3 +344,6 @@ just press Ctrl+C to exit the web server.
305344
[14]: https://docs.docker.com/engine/install/
306345
[15]: https://pypi.org/project/poetry/
307346
[16]: https://pypi.org/project/pip/
347+
[17]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/new?assignees=&labels=project&projects=&template=project-article-request.md&title=Add+{PROJECT}+in+Every+Language+Article
348+
[18]: https://github.com/TheRenegadeCoder/sample-programs-website/blob/main/sources/projects/featured-image.jpg
349+
[19]: https://github.com/TheRenegadeCoder/sample-programs-website/blob/main/.github/CONTRIBUTING.md#requirements-for-a-new-project
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
22
name: Language Article Request
33
about: Suggest a language article (i.e. The Java Programming Language)
4-
title: Add [Language] Language Article
4+
title: Add {LANGUAGE} Language Article
55
labels: language
66
assignees: ''
77

88
---
99

10-
Please link some reference material for the language you'd like documented:
11-
- https://example.com/path/to/docs/
12-
- https://example.com/path/to/tutorial/
10+
If you are modifying an existing language article, please change "Add" to "Modify" in the title.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Project Article Request
3+
about: Suggest a project article (i.e. Bubble Sort in Every
4+
Language)
5+
title: Add {PROJECT} in Every Language Article
6+
labels: project
7+
assignees: ''
8+
9+
---
10+
11+
If you are adding a new project article, see the
12+
[Creating a new project in the Sample Programs Contributing Guide][sample-programs-new-project] for details.
13+
14+
If you are modifying an existing project article, please change "Add" to "Modify" in the title.
15+
16+
[sample-programs-new-project]: https://github.com/TheRenegadeCoder/sample-programs/blob/main/.github/CONTRIBUTING.md#requirements-for-a-new-project
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
name: Sample Program Article Request
3-
about: Suggest a sample program article (i.e. Hello World in Erlang)
4-
title: Add [Sample Program] in [Language] Article
3+
about: Suggest a sample program article (i.e., Hello World in Erlang)
4+
title: Add {PROJECT} in {LANGUAGE} Article
55
labels: "sample program"
66
assignees: ''
77

88
---
99

10-
Please link to the pull request that contains the related code snippet: #pull-request-number
10+
If you are modifying an existing sample program article, please change "Add" to "Modify" in the title.

.github/disabled/project-request.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/pull_request_template.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,42 @@ Please fill out this form in the following way:
88

99
```
1010
[x] Right :)
11+
[x ] Wrong: :(
12+
[ x] Wrong: :(
1113
[ x ] Wrong :(
1214
```
1315

1416
Please specify the type of pull request (please only check one of these):
1517

1618
- [ ] Sample Program Documentation
1719
- [ ] Language Documentation
20+
- [ ] Project Documentation
1821
- [ ] Other (explain in the Notes section)
1922

23+
The title of this pull request must be one of the following:
24+
25+
- Sample Program Documentation: `Add {PROJECT} in {LANGUAGE} Article`. For example,
26+
`Add Hello World in Erlang Article`.
27+
- Language Documentation: `Add {LANGUAGE} Language Article. For example, `Add Erlang Language Article`.
28+
- Project Documentation: `Add {PROJECT} in Every Language Article`. For example,
29+
`Add Zeckendorf in Every Language Article`.
30+
31+
If you are modify an existing article, please change "Add" to "Modify" in the title.
32+
2033
This pull request *must* have a corresponding issue number. If you have
2134
not already done so, please [create a new issue][1].
2235

23-
- I fixed #issue-number
36+
- I fixed #your-issue-number-here
37+
38+
Please put in the relevant issue number in the `I fixed #your-issue-number-here` item. For example, if your PR is
39+
for an issue called `Add Hello World in Erlang Article`, and that issue number is `156`, change `your-issue-number-here`
40+
to `156`. Do not put any space between `#` and the issue number. This is important because when the PR is merged,
41+
the corresponding issue will be closed.
2442

2543
## Notes
2644

27-
Feel free to share any details you feel are relevant.
45+
Feel free to share any details you feel are relevant. If you are modifying an existing
46+
article, please indicate the reason in this section.
2847

2948
[1]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/new/choose
3049
[2]: https://github.com/TheRenegadeCoder/sample-programs-website/blob/main/.github/CONTRIBUTING.md

0 commit comments

Comments
 (0)