https://github.com/alan-turing-institute/clioguesser_backend

Back end repo for the Clioguesser historical geography game

https://github.com/alan-turing-institute/clioguesser_backend

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Back end repo for the Clioguesser historical geography game

Basic Info
  • Host: GitHub
  • Owner: alan-turing-institute
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 59.6 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Created about 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

clioguesser_backend

Back end repo for the Clioguesser historical geography game

Installation

  1. Clone the repository: git clone --recurse-submodules <repository-url> cd clioguesser_backend

Docker

You can run the docker container containing the backend by running: docker compose up -d

API calls

Get the polity data for a given year:

GET /api/polities/?year=2000

Test with curl: curl -X GET "http://localhost:8000/api/polities/?year=2000"

Get the current leaderboard:

GET /api/leaderboard/

Test with curl: curl -X GET "http://localhost:8000/api/leaderboard/"

Update the leaderboard

Update the leaderboard with a new score: ``` POST /api/leaderboard/update/ Content-Type: application/x-www-form-urlencoded

initials=ABC&score=1234 ```

Test with curl: curl -X POST -d "initials=ABC&score=123" http://localhost:8000/api/leaderboard/update/

Calculate a score

Calculate a score based on year range, true year, and guess: GET /api/score/?min_year=1000&max_year=2000&true_year=1500&guess_year=1400&multiplier=365

Test with curl: curl -X GET "http://localhost:8000/api/score/?min_year=1000&max_year=2000&true_year=1500&guess_year=1400&multiplier=365"

Django notes

If you add a new model, you need to create a migration file: cd clioguesser_backend python manage.py makemigrations

Then apply the migration: python manage.py migrate

Owner

  • Name: The Alan Turing Institute
  • Login: alan-turing-institute
  • Kind: organization
  • Email: info@turing.ac.uk

The UK's national institute for data science and artificial intelligence.

GitHub Events

Total
  • Issues event: 1
  • Delete event: 2
  • Member event: 2
  • Push event: 28
  • Pull request event: 2
  • Create event: 3
Last Year
  • Issues event: 1
  • Delete event: 2
  • Member event: 2
  • Push event: 28
  • Pull request event: 2
  • Create event: 3

Dependencies

requirements.txt pypi
  • Django ==4.0.3
  • MarkupSafe ==2.1.1
  • PyJWT ==2.5.0
  • Shapely ==1.8.2
  • asgiref ==3.5.0
  • backports.zoneinfo ==0.2.1
  • beautifulsoup4 ==4.12.3
  • bibtexparser ==1.3.0
  • certifi ==2021.10.8
  • cffi ==1.15.1
  • charset-normalizer ==2.0.12
  • cryptography ==38.0.1
  • defusedxml ==0.7.1
  • distinctipy ==1.2.3
  • dj-database-url ==0.5.0
  • django-allauth ==0.51.0
  • django-cors-headers ==3.11.0
  • django-crispy-forms ==1.14.0
  • django-debug-toolbar ==3.2.4
  • django-easy-audit ==1.3.6
  • django-environ ==0.11.2
  • django-filter ==21.1
  • django-heroku ==0.3.1
  • django-mathfilters ==1.0.0
  • django-recaptcha ==4.0.0
  • django_geojson ==4.0.0
  • djangorestframework ==3.13.1
  • djangorestframework-gis ==1.0
  • feedparser ==6.0.10
  • geopandas ==0.13.2
  • gunicorn ==20.1.0
  • idna ==3.3
  • matplotlib ==3.7.4
  • oauthlib ==3.2.1
  • psycopg2 ==2.9.3
  • psycopg2-binary ==2.9.3
  • pycparser ==2.21
  • pyparsing ==3.0.9
  • python-decouple ==3.6
  • python-dotenv ==0.20.0
  • python3-openid ==3.2.0
  • pytz ==2022.1
  • pyzotero ==1.5.5
  • requests ==2.27.1
  • requests-oauthlib ==1.3.1
  • sentry-sdk ==1.5.10
  • sgmllib3k ==1.0.0
  • six ==1.16.0
  • soupsieve ==2.5
  • sqlparse ==0.4.2
  • types-cryptography ==3.3.23
  • urllib3 ==1.26.9
  • whitenoise ==6.0.0