Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 1.43 KB

CONTRIBUTING.md

File metadata and controls

42 lines (25 loc) · 1.43 KB

Contributing to locator-tool

Obtain the source code

git clone https://github.com/simon04/locator-tool.git

Code style

Please make your code comply with PEP 8, the .eslint and .editorconfig files.

Running a development instance

The locator-tool relies on OAuth for editing files on Wikimedia Commons, which is challenging to setup for local development.

Read-only frontend development

For improving the frontend of the web application without requiring save operations (i.e., "Add {{Location}}"), a very simple setup suffices. Follow the instructions from src/

Read-write frontend development

When also want to test/improve the interaction with the Python backend, you can run a local webserver for https://locator-tool.toolforge.org/ which serves the local frontend code and proxies all requests to the actual server:

cd dev/

# generate TLS keys for CN=locator-tool.toolforge.org
openssl req -new -x509 -nodes -newkey rsa:4096 -keyout server.key -out server.crt

# add locator-tool.toolforge.org entry to hosts file
echo 127.0.0.1 locator-tool.toolforge.org | sudo tee -a /etc/hosts

# run server for locator-tool.toolforge.org on port 443
sudo caddy

Afterwards, open https://locator-tool.toolforge.org/ in the browser.

Local backend development

See INSTALLING.md and figure something out …