Wikipedia:Refill/Windows

This page describes how to set up a local instance of reFill on Windows 10 or Windows 11. Once set up, the instance can be used to process bare URLs, to understand the reFill project's architecture and code, or to develop bug fixes and enhancements. reFill was developed using open source software and the Linux stack, and the instructions for building an instance for those who are comfortable with Linux, Kubernetes and Docker can be found on GitHub. The instructions below are intended primarily for those who use Microsoft Windows and do not want to go to the effort of setting up a Linux environment.

All credit goes to for writing these instructions.

Software you'll need

 * Windows 10 or Windows 11 (commands in PowerShell, so its Unix-like)
 * Optionally, Windows Terminal which provides a multi-tab interface ideal for this type of work (download here)
 * One of the following versions of Python (managed by ):
 * 3.11 (this is the latest version supported in the live environment)
 * 3.7.3-64 (currently used on the version hosted on Toolforge)
 * Node v14.16.1
 * redis-x64-3.2.100
 * TheresNoTime uses venv instead of pipenv, but either will work. She's written the below for pipenv. To install pipenv, run  or read full instructions
 * Git for Windows

Getting the code
Open a PowerShell window, and download the latest source code from GitHub as follows:

Hack around Makefile to setup
If you don't have  installed, the steps  won't work, in which case in the same PowerShell window, enter the following:

When you try to run pipenv, if you get a command not found exception, append the path of your Python installation to the Path variable in the current window by entering the following (replacing with your Windows username):

Run the 'stack'
You'll need three terminal windows running (or you could use the beautifully tabbed Windows Terminal)

Tab 1: celery
Celery receives the requests for the API and queues them to run on the backend: If celery.exe is not found, change to

Tab 2: webpack
The web front end uses Webpack.

Tab 3: flask
Flask is the web framework used to run the back end: If flask.exe is not found, change to

Testing

 * 1) The URL that the API should be running at will be shown in the PowerShell window where Flask is running, e.g. http://127.0.0.1:5000/ - open that URL in a browser to test the API.
 * 2) Expand the 'POST', click the 'Try it out' button and then click on 'Execute'. You should get a '202' response shown under 'Server response'.
 * 3) Expand the first 'GET' method, click the 'Try it out' button. Copy the taskName value (probably fixWikipage) and the taskId value (a GUID) from the response body into the two fields, then click 'Execute'. Inspect the "state" of the Celery job in the response, e.g. "PENDING".

Gotchas

 * If you're using venv, you'll need to ensure you  the virtual env prior to any python related steps (tab 1, tab 3)
 * If you're using and venv, you'll need to do   (unless that's already your default)