Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 46 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
- [how-to-run-the-solution.md (manditory)](#how-to-run-the-solutionmd-manditory)
- [Language Article](#language-article)
- [description.md (manditory)](#descriptionmd-manditory)
- [Project Article](#project-article)
- [description.md (manditory)](#descriptionmd-manditory-1)
- [requirements.md (manditory)](#requirementsmd-manditory)
- [Images](#images)
- [General Guidelines](#general-guidelines-1)
- [Title Image](#title-image)
Expand All @@ -33,6 +36,7 @@ Before making a pull request, please create one of the following issues:

- [Sample Program Article][1]
- [Language Article][2]
- [Project Article][17]

### Pull Requests

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

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

```markdown
Expand Down Expand Up @@ -179,6 +184,37 @@ asm
```
</pre>

### Project Article

A project article describes a new or existing project. For a new project, please see the
[Requirements for a New Project section of the Sample Programs Contributing Guide][19].

Files for this article are placed in the `sources/project/<project>` folder, where:

- `<project>` is the project name in lowercase, with spaces converted to dashes. For example,
`binary-search` for the "Binary Search" project.

This folder must be created. The next sections describe the files that go into this folder.
Images go into the same folder. These are optional. See [Images](#images) for details.

#### description.md (manditory)

This file describes a new or existing project. It gives some background information on the
project and provides enough details that someone can implement a sample program in their chosen
language. It should provide an example that demonstrates what the project does for some sample
input (if applicable).

#### requirements.md (manditory)

This file describes the inputs, outputs, and constraints of this project in general terms. For example:

<pre>
Create a file called "Even Odd" using the naming convention appropriate for your language of choice.

Write a sample program which accepts an integer on the command line and outputs if the integer is Even
or Odd. For a missing input or an input that is not an integer, an error message is output.
</pre>

## Images

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

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

For project articles, [this][18] is the default image.

### Other Images

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

* Sample program article: `/assets/images/projects/<language>/<project>`
* Sample program article: `/assets/images/projects/<project>/<language>`
* Language article: `/assets/images/languages/<language>`
* Project article: `/assets/images/projects/<project>`

For example:

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

[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
[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
[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
[2]: https://github.com/TheRenegadeCoder/sample-programs-website/issues/new?assignees=&labels=language&projects=&template=language-article-request.md&title=Add+{LANGUAGE}+Language+Article
[3]: https://github.com/TheRenegadeCoder/sample-programs-website/actions/workflows/main.yml
[4]: https://github.com/TheRenegadeCoder/sample-programs
[5]: https://www.markdownguide.org/basic-syntax/
Expand All @@ -305,3 +344,6 @@ just press Ctrl+C to exit the web server.
[14]: https://docs.docker.com/engine/install/
[15]: https://pypi.org/project/poetry/
[16]: https://pypi.org/project/pip/
[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
[18]: https://github.com/TheRenegadeCoder/sample-programs-website/blob/main/sources/projects/featured-image.jpg
[19]: https://github.com/TheRenegadeCoder/sample-programs-website/blob/main/.github/CONTRIBUTING.md#requirements-for-a-new-project
6 changes: 2 additions & 4 deletions .github/ISSUE_TEMPLATE/language-article-request.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
name: Language Article Request
about: Suggest a language article (i.e. The Java Programming Language)
title: Add [Language] Language Article
title: Add {LANGUAGE} Language Article
labels: language
assignees: ''

---

Please link some reference material for the language you'd like documented:
- https://example.com/path/to/docs/
- https://example.com/path/to/tutorial/
If you are modifying an existing language article, please change "Add" to "Modify" in the title.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/project-article-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Project Article Request
about: Suggest a project article (i.e. Bubble Sort in Every
Language)
title: Add {PROJECT} in Every Language Article
labels: project
assignees: ''

---

If you are adding a new project article, see the
[Creating a new project in the Sample Programs Contributing Guide][sample-programs-new-project] for details.

If you are modifying an existing project article, please change "Add" to "Modify" in the title.

[sample-programs-new-project]: https://github.com/TheRenegadeCoder/sample-programs/blob/main/.github/CONTRIBUTING.md#requirements-for-a-new-project
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/sample-program-article-request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
name: Sample Program Article Request
about: Suggest a sample program article (i.e. Hello World in Erlang)
title: Add [Sample Program] in [Language] Article
about: Suggest a sample program article (i.e., Hello World in Erlang)
title: Add {PROJECT} in {LANGUAGE} Article
labels: "sample program"
assignees: ''

---

Please link to the pull request that contains the related code snippet: #pull-request-number
If you are modifying an existing sample program article, please change "Add" to "Modify" in the title.
17 changes: 0 additions & 17 deletions .github/disabled/project-request.md

This file was deleted.

23 changes: 21 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,42 @@ Please fill out this form in the following way:

```
[x] Right :)
[x ] Wrong: :(
[ x] Wrong: :(
[ x ] Wrong :(
```

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

- [ ] Sample Program Documentation
- [ ] Language Documentation
- [ ] Project Documentation
- [ ] Other (explain in the Notes section)

The title of this pull request must be one of the following:

- Sample Program Documentation: `Add {PROJECT} in {LANGUAGE} Article`. For example,
`Add Hello World in Erlang Article`.
- Language Documentation: `Add {LANGUAGE} Language Article. For example, `Add Erlang Language Article`.
- Project Documentation: `Add {PROJECT} in Every Language Article`. For example,
`Add Zeckendorf in Every Language Article`.

If you are modify an existing article, please change "Add" to "Modify" in the title.

This pull request *must* have a corresponding issue number. If you have
not already done so, please [create a new issue][1].

- I fixed #issue-number
- I fixed #your-issue-number-here

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

## Notes

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

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