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.
- Python 3.11
- Poetry 1.4.0
To install the project use the following steps.
- Clone the repo
git clone https://github.com/fritsvt/wikiracer.git
- Navigate in the project directory
cd wikiracer
- Create a virtual environment
pyenv virtualenv 3.11.2 wikiracer
- Install poetry dependencies
poetry install
- Load
.envrc
file
source .envrc
- Run the app
python src/wikiracer.py FIRST_TITLE SECOND_TITLE
Make sure you've loaded the .envrc
file to configure PYTHON_PATH and then run:
make tests
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