From 40518230fe81c4363e84e9c8f6a33afad6094ee4 Mon Sep 17 00:00:00 2001 From: Sarah Withee <2601974+geekygirlsarah@users.noreply.github.com> Date: Tue, 11 Jul 2023 22:25:15 -0400 Subject: [PATCH 01/12] Upgrade dependencies for security updates --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index b03b9c4b0..982145659 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ -asgiref==3.4.1 +asgiref==3.7.2 astroid==2.6.6 bleach==4.1.0 colorama==0.4.4 dj-database-url==0.5.0 -Django==4.0.10 +Django==4.2.3 django-markdownify==0.9.0 django-on-heroku==1.1.2 gunicorn==20.1.0 @@ -22,7 +22,7 @@ pytz==2021.1 six==1.16.0 sqlparse==0.4.4 toml==0.10.2 -typing-extensions==3.10.0.0 +typing-extensions==4.7.1 tzdata==2021.5 webencodings==0.5.1 whitenoise==5.3.0 From d478a8dbeb85d35b405515625ea583c5100e71c1 Mon Sep 17 00:00:00 2001 From: Sarah Withee <2601974+geekygirlsarah@users.noreply.github.com> Date: Tue, 11 Jul 2023 22:26:45 -0400 Subject: [PATCH 02/12] Fix test error that works/doesn't work depending on OS --- web/views.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/web/views.py b/web/views.py index 10d65613a..99421d050 100644 --- a/web/views.py +++ b/web/views.py @@ -87,20 +87,21 @@ def index(request): random_langs = random.sample(list(meta_data_langs.values()), k=3) - thesauruses_dir = f'{BASE_DIR}/web/thesauruses' - meta_dir = f'{thesauruses_dir}/_meta' + thesauruses_dir = os.path.join(BASE_DIR, 'web', 'thesauruses') + meta_dir = os.path.join(thesauruses_dir, '_meta') meta_concepts = os.listdir(meta_dir) for lang in os.listdir(thesauruses_dir): if 'meta' in lang: continue - for ver in os.listdir(f'{thesauruses_dir}/{lang}'): + for ver in os.listdir(os.path.join(thesauruses_dir, lang)): for concept_json in meta_concepts: concept_name = concept_json.split('.')[0] - if concept_json in os.listdir(f'{thesauruses_dir}/{lang}/{ver}'): - for i in meta_data_langs[lang]: - if i['version'] == ver: - i['availStructs'].append(concept_name) - break + if os.path.isdir(os.path.join(thesauruses_dir, lang, ver)): + if concept_json in os.listdir(os.path.join(thesauruses_dir, lang, ver)): + for i in meta_data_langs[lang]: + if i['version'] == ver: + i['availStructs'].append(concept_name) + break content = { 'title': 'Welcome', From 696b20c630e6621279945ae6f971c707b5ec634d Mon Sep 17 00:00:00 2001 From: Sarah Withee <2601974+geekygirlsarah@users.noreply.github.com> Date: Sat, 12 Aug 2023 20:55:49 -0400 Subject: [PATCH 03/12] Attempt 500 server error fix --- Dockerfile | 4 +++- runtime.txt | 2 +- web/views.py | 12 ++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index caf7f8711..a2f271ebc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,6 @@ COPY requirements.txt /code/ RUN pip install --no-cache-dir -r requirements.txt COPY . . EXPOSE 8000 -CMD python manage.py migrate && python manage.py runserver 0.0.0.0:8000 +CMD python manage.py migrate && \ + python manage.py collectstatic && \ + python manage.py runserver 0.0.0.0:8000 diff --git a/runtime.txt b/runtime.txt index 2fef004c5..fefae710d 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-3.10.8 \ No newline at end of file +python-3.11.4 \ No newline at end of file diff --git a/web/views.py b/web/views.py index 99421d050..578b5acc6 100644 --- a/web/views.py +++ b/web/views.py @@ -1,5 +1,5 @@ """codethesaur.us views""" -import json +import logging import random import os @@ -228,7 +228,7 @@ def render_concepts(request, languages, structure, all_categories): return render(request, 'concepts.html', response) -def error_handler_400_bad_request(request, _exception): +def error_handler_400_bad_request(request, exception): """ Renders the page for a generic client error (HTTP 400) @@ -238,11 +238,12 @@ def error_handler_400_bad_request(request, _exception): """ store_url_info(request) + logging.error(exception) response = render(request, 'error400.html') return HttpResponseBadRequest(response) -def error_handler_403_forbidden(request, _exception): +def error_handler_403_forbidden(request, exception): """ Renders the page for a forbidden error (HTTP 403) @@ -252,11 +253,12 @@ def error_handler_403_forbidden(request, _exception): """ store_url_info(request) + logging.error(exception) response = render(request, 'error403.html') return HttpResponseForbidden(response) -def error_handler_404_not_found(request, _exception): +def error_handler_404_not_found(request, exception): """ Renders the page for a file not found error (HTTP 404) @@ -266,6 +268,7 @@ def error_handler_404_not_found(request, _exception): """ store_url_info(request) + logging.error(exception) response = render(request, 'error404.html') return HttpResponseNotFound(response) @@ -279,6 +282,7 @@ def error_handler_500_server_error(request): """ store_url_info(request) + logging.error(request) response = render(request, 'error500.html') return HttpResponseServerError(response) From 5d72432b25cbafc12984efc28dcfe41a65de935f Mon Sep 17 00:00:00 2001 From: Sarah Withee <2601974+geekygirlsarah@users.noreply.github.com> Date: Sat, 12 Aug 2023 21:14:58 -0400 Subject: [PATCH 04/12] Downplay 404 errors in server logs (don't need list of all URL paths) --- Dockerfile | 2 +- web/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a2f271ebc..ee0fc7dff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,5 +6,5 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . . EXPOSE 8000 CMD python manage.py migrate && \ - python manage.py collectstatic && \ + python manage.py collectstatic --clear --no-input && \ python manage.py runserver 0.0.0.0:8000 diff --git a/web/views.py b/web/views.py index 578b5acc6..cad8c61e1 100644 --- a/web/views.py +++ b/web/views.py @@ -268,7 +268,7 @@ def error_handler_404_not_found(request, exception): """ store_url_info(request) - logging.error(exception) + logging.info(request) response = render(request, 'error404.html') return HttpResponseNotFound(response) From 8627027f242dd80669ee68ae65ad3fb48a8e295a Mon Sep 17 00:00:00 2001 From: Sarah Withee <2601974+geekygirlsarah@users.noreply.github.com> Date: Sat, 12 Aug 2023 21:34:48 -0400 Subject: [PATCH 05/12] Add tests to ensure 404s return as expected --- web/tests/test_views.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/tests/test_views.py b/web/tests/test_views.py index 934c9ec7e..07d5ff16f 100644 --- a/web/tests/test_views.py +++ b/web/tests/test_views.py @@ -26,6 +26,15 @@ def test_about_view_GET(self): self.assertTemplateUsed(response, 'about.html') self.assertTemplateUsed(response, 'base.html') + def test_invalid_page_gives_404_error(self): + url = 'no_real_page' + response = self.client.get(url) + + self.assertEqual(response.status_code, 404) + self.assertTemplateUsed(response, 'error404.html') + self.assertTemplateUsed(response, 'base.html') + self.assertTemplateNotUsed(response, 'concepts.html') + def test_compare_concepts_view_both_valid_languages(self): """test if compare with 2 valid languages uses the correct templates""" url = reverse('index') + \ From 0b381d2d076b2b80c59391c6b59962cda48c64c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 13 Aug 2023 01:37:01 +0000 Subject: [PATCH 06/12] Bump pygments from 2.9.0 to 2.15.0 Bumps [pygments](https://github.com/pygments/pygments) from 2.9.0 to 2.15.0. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.9.0...2.15.0) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 982145659..55dced160 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,7 +15,7 @@ mccabe==0.6.1 packaging==21.3 protobuf==3.18.3 psycopg2-binary==2.9.5 -Pygments==2.9.0 +Pygments==2.15.0 pylint==2.9.6 pyparsing==3.0.6 pytz==2021.1 From 344066b7535cbd32331945f6be9597fb928e86ba Mon Sep 17 00:00:00 2001 From: Sarah Withee <2601974+geekygirlsarah@users.noreply.github.com> Date: Mon, 25 Sep 2023 17:52:31 -0500 Subject: [PATCH 07/12] Update README.md for Hacktoberfest --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 99584a88b..d828d337e 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,10 @@ Check out our [Installation/Running Locally](https://docs.codethesaur.us/install Check out the [Contributing Guide](https://docs.codethesaur.us/contributing/) to learn more about how you can help add more language data, fix bugs, or add features! +## Is this project available for Hacktoberfest contributions? + +Yes! The Code Thesaurus code and documentation projects are both enabled for Hacktoberfest contributions. + ## Code of Conduct All contributors are required to follow the [Code Thesaurus Code of Conduct](https://docs.codethesaur.us/code_of_conduct/). From 86f3ea9c2596a761503346bb37d7f746650f1cee Mon Sep 17 00:00:00 2001 From: Terri Penn Date: Sun, 1 Oct 2023 09:40:54 -0500 Subject: [PATCH 08/12] Added functions, methods, and subroutines to Java 17, 15, 11 --- web/thesauruses/java/11/functions.json | 50 ++++++++++++++++++++++++++ web/thesauruses/java/15/functions.json | 50 ++++++++++++++++++++++++++ web/thesauruses/java/17/functions.json | 50 ++++++++++++++++++++++++++ 3 files changed, 150 insertions(+) create mode 100644 web/thesauruses/java/11/functions.json create mode 100644 web/thesauruses/java/15/functions.json create mode 100644 web/thesauruses/java/17/functions.json diff --git a/web/thesauruses/java/11/functions.json b/web/thesauruses/java/11/functions.json new file mode 100644 index 000000000..c57e49e5c --- /dev/null +++ b/web/thesauruses/java/11/functions.json @@ -0,0 +1,50 @@ +{ + "meta": { + "language": "java", + "language_version": "11", + "language_name": "Java", + "structure": "functions" + }, + "concepts": { + "void_function_no_parameters": { + "code": "void methodName()\n{\n\t//code\n}", + "name": "Method that does not return a value and takes no parameters" + }, + "void_function_with_parameters": { + "code": "void methodName(parameterType1 parameterName1, parameterType2 parameterName2)\n{\n\t//code\n}", + "name": "Method that does not return a value and that takes 1 or more defined parameters" + }, + "void_function_variable_parameters": { + "code": "void methodName(parameterType... parameterName)\n{\n\t//code\n}", + "name": "Method that does not return a value and takes a variable number of parameters" + }, + "return_value_function_no_parameters": { + "code": "returnValueType methodName()\n{\n\t//code\n\treturn returnValue;\n}", + "name": "Method that returns a value and takes no parameters" + }, + "return_value_function_with_parameters": { + "code": "returnValueType methodName(parameterType1 parameterName1, parameterType2 parameterName2)\n{\n\t//code\n\treturn returnValue;\n}", + "name": "Method that returns a value and takes 1 or more defined parameters" + }, + "return_value_function_variable_parameters": { + "name": "Method that returns a value and takes a variable number of parameters", + "code": "returnValueType methodName(parameterType... parameterName)\n{\n\t//code\n\treturn returnValue;\n}" + }, + "anonymous_function_no_parameters": { + "name": "Anonymous function that takes no parameters", + "code": "() -> //single line of code\n\n() ->\n{\n\t//multiple lines of code\n}" + }, + "anonymous_function_with_parameters": { + "name": "Anonymous function that takes 1 or more defined parameters", + "code": "(parameterName1, parameterName2) ->\n{\n\t//code\n}" + }, + "call_subroutine": { + "name": "Call subroutine", + "code": "MyClass x = new MyClass();\nx.subRoutine();" + }, + "return_from_subroutine": { + "name": "Return from subroutine", + "code": "MyClass x = new MyClass();\nsubRoutineReturnType y = x.subRoutine();" + } + } +} diff --git a/web/thesauruses/java/15/functions.json b/web/thesauruses/java/15/functions.json new file mode 100644 index 000000000..088e7e21d --- /dev/null +++ b/web/thesauruses/java/15/functions.json @@ -0,0 +1,50 @@ +{ + "meta": { + "language": "java", + "language_version": "15", + "language_name": "Java", + "structure": "functions" + }, + "concepts": { + "void_function_no_parameters": { + "code": "void methodName()\n{\n\t//code\n}", + "name": "Method that does not return a value and takes no parameters" + }, + "void_function_with_parameters": { + "code": "void methodName(parameterType1 parameterName1, parameterType2 parameterName2)\n{\n\t//code\n}", + "name": "Method that does not return a value and that takes 1 or more defined parameters" + }, + "void_function_variable_parameters": { + "code": "void methodName(parameterType... parameterName)\n{\n\t//code\n}", + "name": "Method that does not return a value and takes a variable number of parameters" + }, + "return_value_function_no_parameters": { + "code": "returnValueType methodName()\n{\n\t//code\n\treturn returnValue;\n}", + "name": "Method that returns a value and takes no parameters" + }, + "return_value_function_with_parameters": { + "code": "returnValueType methodName(parameterType1 parameterName1, parameterType2 parameterName2)\n{\n\t//code\n\treturn returnValue;\n}", + "name": "Method that returns a value and takes 1 or more defined parameters" + }, + "return_value_function_variable_parameters": { + "name": "Method that returns a value and takes a variable number of parameters", + "code": "returnValueType methodName(parameterType... parameterName)\n{\n\t//code\n\treturn returnValue;\n}" + }, + "anonymous_function_no_parameters": { + "name": "Anonymous function that takes no parameters", + "code": "() -> //single line of code\n\n() ->\n{\n\t//multiple lines of code\n}" + }, + "anonymous_function_with_parameters": { + "name": "Anonymous function that takes 1 or more defined parameters", + "code": "(parameterName1, parameterName2) ->\n{\n\t//code\n}" + }, + "call_subroutine": { + "name": "Call subroutine", + "code": "MyClass x = new MyClass();\nx.subRoutine();" + }, + "return_from_subroutine": { + "name": "Return from subroutine", + "code": "MyClass x = new MyClass();\nsubRoutineReturnType y = x.subRoutine();" + } + } +} diff --git a/web/thesauruses/java/17/functions.json b/web/thesauruses/java/17/functions.json new file mode 100644 index 000000000..18a773a39 --- /dev/null +++ b/web/thesauruses/java/17/functions.json @@ -0,0 +1,50 @@ +{ + "meta": { + "language": "java", + "language_version": "17", + "language_name": "Java", + "structure": "functions" + }, + "concepts": { + "void_function_no_parameters": { + "code": "void methodName()\n{\n\t//code\n}", + "name": "Method that does not return a value and takes no parameters" + }, + "void_function_with_parameters": { + "code": "void methodName(parameterType1 parameterName1, parameterType2 parameterName2)\n{\n\t//code\n}", + "name": "Method that does not return a value and that takes 1 or more defined parameters" + }, + "void_function_variable_parameters": { + "code": "void methodName(parameterType... parameterName)\n{\n\t//code\n}", + "name": "Method that does not return a value and takes a variable number of parameters" + }, + "return_value_function_no_parameters": { + "code": "returnValueType methodName()\n{\n\t//code\n\treturn returnValue;\n}", + "name": "Method that returns a value and takes no parameters" + }, + "return_value_function_with_parameters": { + "code": "returnValueType methodName(parameterType1 parameterName1, parameterType2 parameterName2)\n{\n\t//code\n\treturn returnValue;\n}", + "name": "Method that returns a value and takes 1 or more defined parameters" + }, + "return_value_function_variable_parameters": { + "name": "Method that returns a value and takes a variable number of parameters", + "code": "returnValueType methodName(parameterType... parameterName)\n{\n\t//code\n\treturn returnValue;\n}" + }, + "anonymous_function_no_parameters": { + "name": "Anonymous function that takes no parameters", + "code": "() -> //single line of code\n\n() ->\n{\n\t//multiple lines of code\n}" + }, + "anonymous_function_with_parameters": { + "name": "Anonymous function that takes 1 or more defined parameters", + "code": "(parameterName1, parameterName2) ->\n{\n\t//code\n}" + }, + "call_subroutine": { + "name": "Call subroutine", + "code": "MyClass x = new MyClass();\nx.subRoutine();" + }, + "return_from_subroutine": { + "name": "Return from subroutine", + "code": "MyClass x = new MyClass();\nsubRoutineReturnType y = x.subRoutine();" + } + } +} From 6c36f0083b0d2ff5f4b9f8c6618e493669f6efd0 Mon Sep 17 00:00:00 2001 From: Terri Penn Date: Sun, 1 Oct 2023 10:07:27 -0500 Subject: [PATCH 09/12] Added more to functions, methods, and subroutines to Java 17, 15, 11 --- web/thesauruses/java/11/functions.json | 8 ++++++++ web/thesauruses/java/15/functions.json | 8 ++++++++ web/thesauruses/java/17/functions.json | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/web/thesauruses/java/11/functions.json b/web/thesauruses/java/11/functions.json index c57e49e5c..b466439ad 100644 --- a/web/thesauruses/java/11/functions.json +++ b/web/thesauruses/java/11/functions.json @@ -38,6 +38,14 @@ "name": "Anonymous function that takes 1 or more defined parameters", "code": "(parameterName1, parameterName2) ->\n{\n\t//code\n}" }, + "anonymous_function_no_parameters_with_return": { + "name": "Anonymous function that takes no parameters and returns a value", + "code": "() -> //single line expression/value\n\n() ->\n{\n\t//multiple lines of code\n\treturn returnValue;\n}" + }, + "anonymous_function_with_parameters_with_return": { + "name": "Anonymous function that takes 1 or more defined parameters and returns a value", + "code": "(parameterName1, parameterName2) ->\n{\n\t//code\n\treturn returnValue;\n}" + }, "call_subroutine": { "name": "Call subroutine", "code": "MyClass x = new MyClass();\nx.subRoutine();" diff --git a/web/thesauruses/java/15/functions.json b/web/thesauruses/java/15/functions.json index 088e7e21d..fe96ee0b4 100644 --- a/web/thesauruses/java/15/functions.json +++ b/web/thesauruses/java/15/functions.json @@ -38,6 +38,14 @@ "name": "Anonymous function that takes 1 or more defined parameters", "code": "(parameterName1, parameterName2) ->\n{\n\t//code\n}" }, + "anonymous_function_no_parameters_with_return": { + "name": "Anonymous function that takes no parameters and returns a value", + "code": "() -> //single line expression/value\n\n() ->\n{\n\t//multiple lines of code\n\treturn returnValue;\n}" + }, + "anonymous_function_with_parameters_with_return": { + "name": "Anonymous function that takes 1 or more defined parameters and returns a value", + "code": "(parameterName1, parameterName2) ->\n{\n\t//code\n\treturn returnValue;\n}" + }, "call_subroutine": { "name": "Call subroutine", "code": "MyClass x = new MyClass();\nx.subRoutine();" diff --git a/web/thesauruses/java/17/functions.json b/web/thesauruses/java/17/functions.json index 18a773a39..f8d5f7bb4 100644 --- a/web/thesauruses/java/17/functions.json +++ b/web/thesauruses/java/17/functions.json @@ -38,6 +38,14 @@ "name": "Anonymous function that takes 1 or more defined parameters", "code": "(parameterName1, parameterName2) ->\n{\n\t//code\n}" }, + "anonymous_function_no_parameters_with_return": { + "name": "Anonymous function that takes no parameters and returns a value", + "code": "() -> //single line expression/value\n\n() ->\n{\n\t//multiple lines of code\n\treturn returnValue;\n}" + }, + "anonymous_function_with_parameters_with_return": { + "name": "Anonymous function that takes 1 or more defined parameters and returns a value", + "code": "(parameterName1, parameterName2) ->\n{\n\t//code\n\treturn returnValue;\n}" + }, "call_subroutine": { "name": "Call subroutine", "code": "MyClass x = new MyClass();\nx.subRoutine();" From 145ff906b0fa605d0a3ef045ee585b09d2937a57 Mon Sep 17 00:00:00 2001 From: Terri Penn Date: Sun, 1 Oct 2023 12:59:35 -0500 Subject: [PATCH 10/12] Added queues and stacks to C# --- web/thesauruses/csharp/9/queues_stacks.json | 280 ++++++++++++++++++++ 1 file changed, 280 insertions(+) create mode 100644 web/thesauruses/csharp/9/queues_stacks.json diff --git a/web/thesauruses/csharp/9/queues_stacks.json b/web/thesauruses/csharp/9/queues_stacks.json new file mode 100644 index 000000000..0572c35b3 --- /dev/null +++ b/web/thesauruses/csharp/9/queues_stacks.json @@ -0,0 +1,280 @@ +{ + "meta": { + "language": "csharp", + "language_version": "9.0", + "language_name": "C#", + "structure": "queues_stacks" + }, + "concepts": { + "simple_queue_import_statement": { + "name": "Import statement to add simple queue", + "code": "using System.Collections.Generic;" + }, + "simple_queue_data_type": { + "name": "Queue data type name", + "code": "Queue" + }, + "simple_queue_create_statement": { + "name": "Create a queue", + "code": "Queue newQueue = new Queue();" + }, + "simple_queue_create_copy_statement": { + "name": "Create a queue from existing queue", + "code": "Queue newQueue = new Queue(existingQueue);" + }, + "simple_queue_create_copy_from_list_statement": { + "name": "Create a queue from a list of items", + "code": "Queue newQueue = new Queue(list);" + }, + "simple_queue_destroy_statement": { + "not-implemented": true, + "name": "Destroy/delete a queue" + }, + "simple_queue_data_structure": { + "name": "Data structure that backs the simple queue", + "code": [ + "inherits Object", + "implements IEnumerable IReadOnlyCollection ICollection IEnumerable" + ] + }, + "circular_queue_import_statement": { + "not-implemented": true, + "name": "Import statement to add circular queue" + }, + "circular_queue_data_type": { + "not-implemented": true, + "name": "Queue data type name" + }, + "circular_queue_create_statement": { + "not-implemented": true, + "name": "Create a queue" + }, + "circular_queue_create_copy_statement": { + "not-implemented": true, + "name": "Create a queue from existing queue" + }, + "circular_queue_create_copy_from_list_statement": { + "not-implemented": true, + "name": "Create a queue from a list of items" + }, + "circular_queue_destroy_statement": { + "not-implemented": true, + "name": "Destroy/delete a queue" + }, + "circular_queue_data_structure": { + "not-implemented": true, + "name": "Data structure that backs the simple queue" + }, + "priority_queue_import_statement": { + "not-implemented": true, + "name": "Import statement to add priority queue" + }, + "priority_queue_data_type": { + "not-implemented": true, + "name": "Queue data type name" + }, + "priority_queue_create_statement": { + "not-implemented": true, + "name": "Create a queue" + }, + "priority_queue_create_copy_statement": { + "not-implemented": true, + "name": "Create a queue from existing queue" + }, + "priority_queue_create_copy_from_list_statement": { + "not-implemented": true, + "name": "Create a queue from a list of items" + }, + "priority_queue_destroy_statement": { + "not-implemented": true, + "name": "Destroy/delete a queue" + }, + "priority_queue_data_structure": { + "not-implemented": true, + "name": "Data structure that backs the simple queue" + }, + "double_ended_queue_import_statement": { + "not-implemented": true, + "name": "Import statement to add double-ended queue" + }, + "double_ended_queue_data_type": { + "not-implemented": true, + "name": "Queue data type name" + }, + "double_ended_queue_create_statement": { + "not-implemented": true, + "name": "Create a queue" + }, + "double_ended_queue_create_copy_statement": { + "not-implemented": true, + "name": "Create a queue from existing queue" + }, + "double_ended_queue_create_copy_from_list_statement": { + "not-implemented": true, + "name": "Create a queue from a list" + }, + "double_ended_queue_destroy_statement": { + "not-implemented": true, + "name": "Destroy/delete a queue" + }, + "double_ended_queue_data_structure": { + "not-implemented": true, + "name": "Data structure that backs the simple queue" + }, + "stack_import_statement": { + "name": "Import statement to add stacks", + "code": "using System.Collections.Generic;" + }, + "stack_data_type": { + "name": "Stack data type name", + "code": "Stack" + }, + "stack_create_statement": { + "name": "Create a stack", + "code": "Stack newStack = new Stack();" + }, + "stack_create_copy_statement": { + "name": "Create a stack from existing stack", + "code": "Stack newStack = new Stack(existingStack.Reverse());" + }, + "stack_create_copy_from_list_statement": { + "name": "Create a stack from a list", + "code": "Stack newStack = new Stack(list);" + }, + "stack_destroy_statement": { + "not-implemented": true, + "name": "Destroy/delete a stack" + }, + "stack_data_structure": { + "name": "Data structure that backs the simple stack", + "code": [ + "inherits Object", + "implements IEnumerable IReadOnlyCollection ICollection IEnumerable" + ] + }, + "queue_enqueue_an_item": { + "name": "Enqueue an item (add to end)", + "code": "aQueue.Enqueue(item);" + }, + "queue_enqueue_priority_item": { + "not-implemented": true, + "name": "Enqueue a high priority item (add to end of priority queue)" + }, + "queue_enqueue_from_list": { + "not-implemented": true, + "name": "Enqueue items from a list into queue (add list to end)" + }, + "queue_enqueue_priority_from_list": { + "not-implemented": true, + "name": "Enqueue priority items from a list (add list to end of priority queue)" + }, + "queue_dequeue_return_an_item": { + "name": "Dequeue an item (remove from front, return item)", + "code": "item = aQueue.Dequeue();" + }, + "queue_dequeue_delete_an_item": { + "not-implemented": true, + "name": "Dequeue an item (remove from front, don't return)" + }, + "queue_peek_at_next_item": { + "name": "Look/peek at next available element (from front)", + "code": "nextElement = aQueue.Peek();" + }, + "queue_peek_at_last_item": { + "not-implemented": true, + "name": "Look/peek at last element (from back)" + }, + "queue_duplicate_next_item": { + "not-implemented": true, + "name": "Duplicate next item" + }, + "queue_swap_two_items": { + "not-implemented": true, + "name": "Swap two items" + }, + "queue_get_size": { + "name": "Get size (number of items) in the queue", + "code": "int size = aQueue.Count;" + }, + "queue_get_capacity": { + "not-implemented": true, + "name": "Check capacity of queue" + }, + "queue_export_to_list": { + "name": "Export a list of all queue items", + "code": "Object[] arr = aQueue.ToArray();" + }, + "queue_clear_all": { + "name": "Clear out all queue items", + "code": "aQueue.Clear();" + }, + "stack_push_item": { + "name": "Push an item (add to top)", + "code": "aStack.Push(item);" + }, + "stack_pop_return_item": { + "name": "Pop an item (remove from top, return item)", + "code": "item = aStack.Pop();" + }, + "stack_pop_delete_item": { + "not-implemented": true, + "name": "Pop an item (remove from top, don't return)" + }, + "stack_peek_at_next_item": { + "name": "Look/peek at next element (from top)", + "code": "nextElement = aStack.Peek();" + }, + "stack_peek_at_last_item": { + "not-implemented": true, + "name": "Look/peek at last element (from bottom)" + }, + "stack_duplicate_next_item": { + "not-implemented": true, + "name": "Duplicate top item" + }, + "stack_swap_two_items": { + "not-implemented": true, + "name": "Swap two items" + }, + "stack_get_size": { + "name": "Get size (number of items) on the stack", + "code": "int size = aStack.Count" + }, + "stack_get_capacity": { + "not-implemented": true, + "name": "Check capacity of stack" + }, + "stack_export_to_list": { + "name": "Export a list of all stack items", + "code": "Object[] arr = aStack.ToArray();" + }, + "stack_clear_all": { + "name": "Clear all queue items", + "code": "aStack.Clear();" + }, + "iterate_pointer_data_type": { + "not-implemented": true, + "name": "Data type of a iterator pointer" + }, + "iterate_create_pointer": { + "not-implemented": true, + "name": "Create iterator" + }, + "iterate_move_to_next_item": { + "not-implemented": true, + "name": "Move pointer to next item" + }, + "iterate_move_to_previous_item": { + "not-implemented": true, + "name": "Move pointer to previous item" + }, + "iterate_move_to_beginning": { + "not-implemented": true, + "name": "Move pointer to beginning of queue/stack" + }, + "iterate_move_to_end": { + "not-implemented": true, + "name": "Move pointer to end of queue/stack" + } + } +} \ No newline at end of file From 977868e0504a5bd58aee464b4e0c38a511532fab Mon Sep 17 00:00:00 2001 From: Sarah Withee <2601974+geekygirlsarah@users.noreply.github.com> Date: Sun, 1 Oct 2023 21:11:47 -0400 Subject: [PATCH 11/12] Replace C17 IO "commnet" with "comment" --- web/thesauruses/c/17/io.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/thesauruses/c/17/io.json b/web/thesauruses/c/17/io.json index 3eb8eb095..5a92fe15b 100644 --- a/web/thesauruses/c/17/io.json +++ b/web/thesauruses/c/17/io.json @@ -181,7 +181,7 @@ }, "database_functions_lib":{ "code":"", - "commnet":"using MySQL C API", + "comment":"using MySQL C API", "name":"Library containing database IO functions" }, "open_connection":{ From ea90a8d59a9b0c61b6d4c79941ba240cd907c851 Mon Sep 17 00:00:00 2001 From: Sarah Withee <2601974+geekygirlsarah@users.noreply.github.com> Date: Sun, 1 Oct 2023 21:19:24 -0400 Subject: [PATCH 12/12] Upgrade actions/checkout and actions/setup-python --- .github/workflows/json-validate.yml | 2 +- .github/workflows/run-unit-tests.yml | 4 ++-- .github/workflows/validate-language-info-files.yml | 4 ++-- .github/workflows/validate-meta-info-file.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/json-validate.yml b/.github/workflows/json-validate.yml index 49990102d..df32f8399 100644 --- a/.github/workflows/json-validate.yml +++ b/.github/workflows/json-validate.yml @@ -11,7 +11,7 @@ jobs: name: Check JSON Files runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: JSON Syntax Check uses: limitusus/json-syntax-check@v1 with: diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml index 32f4771ba..dd5596499 100644 --- a/.github/workflows/run-unit-tests.yml +++ b/.github/workflows/run-unit-tests.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: 3.9 cache: 'pip' diff --git a/.github/workflows/validate-language-info-files.yml b/.github/workflows/validate-language-info-files.yml index 853737ac8..00fe938b7 100644 --- a/.github/workflows/validate-language-info-files.yml +++ b/.github/workflows/validate-language-info-files.yml @@ -15,10 +15,10 @@ jobs: steps: - name: Checkout the branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: 3.9 cache: 'pip' diff --git a/.github/workflows/validate-meta-info-file.yml b/.github/workflows/validate-meta-info-file.yml index f70b31332..e8bfd44f4 100644 --- a/.github/workflows/validate-meta-info-file.yml +++ b/.github/workflows/validate-meta-info-file.yml @@ -15,10 +15,10 @@ jobs: steps: - name: Checkout the branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: 3.9 cache: 'pip'