Skip to content

fritsvt/wikiracer

Repository files navigation

WikiRacer

WikiRacer inspired by the wikiracer.io game.

Please note: this project was quickly written and uses web crawling to find a link between pages. DO NOT use extensively or try to find deep links as heavy scraping is against Wikipedia's policy.

A more efficient implementation could use the pagelinks dump provided by Wikipedia.

Requirements

  • Python 3.11
  • Poetry 1.4.0

Installation

To install the project use the following steps.

  1. Clone the repo
git clone https://github.com/fritsvt/wikiracer.git
  1. Navigate in the project directory
cd wikiracer
  1. Create a virtual environment
pyenv virtualenv 3.11.2 wikiracer
  1. Install poetry dependencies
poetry install
  1. Load .envrc file
source .envrc
  1. Run the app
python src/wikiracer.py FIRST_TITLE SECOND_TITLE     

Running tests

Make sure you've loaded the .envrc file to configure PYTHON_PATH and then run:

make tests

Code quality

To ensure code quality, type checking and linting tools have been configured.

Although before every commit make should be run to ensure the tests are green and the linters are happy it's also possible to only run the linters using:

make nice

This will run: black, mypy, ruff and vulture

Additionally tooling like mypy, black can also be run individually using make toolname or make format to run all formatting except mypy

Technologies

Poetry

Pytest

Beautiful Soup

Typer

Rich

Mypy

Black

Ruff

Vulture

License

MIT

About

Find the path between two wikipedia titles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published