Skip to content

Commit

Permalink
Merge branch 'main' into akkshayTandon--adding-C-language
Browse files Browse the repository at this point in the history
  • Loading branch information
geekygirlsarah authored Oct 2, 2023
2 parents 17245b8 + ea90a8d commit 7d76d00
Show file tree
Hide file tree
Showing 15 changed files with 500 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/json-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate-language-info-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate-meta-info-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 --clear --no-input && \
python manage.py runserver 0.0.0.0:8000
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -15,14 +15,14 @@ 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
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
Expand Down
2 changes: 1 addition & 1 deletion runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.10.8
python-3.11.4
9 changes: 9 additions & 0 deletions web/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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') + \
Expand Down
2 changes: 1 addition & 1 deletion web/thesauruses/c/17/io.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
},
"database_functions_lib":{
"code":"<mysql.h>",
"commnet":"using MySQL C API",
"comment":"using MySQL C API",
"name":"Library containing database IO functions"
},
"open_connection":{
Expand Down
Loading

0 comments on commit 7d76d00

Please sign in to comment.