diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 4e6e28f3bc..8dd8bf3538 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -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) @@ -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 @@ -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 @@ -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 @@ -179,6 +184,37 @@ asm ``` +### 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/` folder, where: + +- `` 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: + +
+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.
+
+ ## Images Images may be one of the following (unless otherwise noted): @@ -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 @@ -243,8 +281,9 @@ Local images are referenced like this: where `` is one of the following directories, and `` is the filename of the image: -* Sample program article: `/assets/images/projects//` +* Sample program article: `/assets/images/projects//` * Language article: `/assets/images/languages/` +* Project article: `/assets/images/projects/` For example: @@ -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/ @@ -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 diff --git a/.github/ISSUE_TEMPLATE/language-article-request.md b/.github/ISSUE_TEMPLATE/language-article-request.md index dff5aa3f85..1cb5e34053 100644 --- a/.github/ISSUE_TEMPLATE/language-article-request.md +++ b/.github/ISSUE_TEMPLATE/language-article-request.md @@ -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. diff --git a/.github/ISSUE_TEMPLATE/project-article-request.md b/.github/ISSUE_TEMPLATE/project-article-request.md new file mode 100644 index 0000000000..8bd0b45ff9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/project-article-request.md @@ -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 diff --git a/.github/ISSUE_TEMPLATE/sample-program-article-request.md b/.github/ISSUE_TEMPLATE/sample-program-article-request.md index 9c921f4677..c691af7540 100644 --- a/.github/ISSUE_TEMPLATE/sample-program-article-request.md +++ b/.github/ISSUE_TEMPLATE/sample-program-article-request.md @@ -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. diff --git a/.github/disabled/project-request.md b/.github/disabled/project-request.md deleted file mode 100644 index 2f9604410c..0000000000 --- a/.github/disabled/project-request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -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: '' - ---- - -Please describe the project you would like included in the collection (links are great too!): - -If possible, please provide some test cases for the new project: - -| Description | Input | Output | -|---------------|--------|---------------------------------| -| No Input | | "Error: please provide input" | diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a06b586e0f..778d5647e5 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,6 +8,8 @@ Please fill out this form in the following way: ``` [x] Right :) +[x ] Wrong: :( +[ x] Wrong: :( [ x ] Wrong :( ``` @@ -15,16 +17,33 @@ 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