Follow these steps to set up and run the project.
First, create a virtual environment for your Python in the project directory. This isolates your project dependencies.
python3 -m venv myenv
Activate the virtual environment:
- On Unix/Linux/macOS:
source myenv/bin/activate
- On Windows:
myenv\Scripts\activate
Install the project dependencies from the requirements.txt
file:
pip install -r requirements.txt
Streamlit expects a hidden directory named .streamlit
at the top level of your project. Create this directory if it doesn't already exist:
mkdir -p .streamlit
Inside the .streamlit
directory, create a file named secrets.toml
and add your Lichess API token:
cd .streamlit && touch secrets.toml
Add this line to your toml file, replacing "your_api_token"
with your actual API token.
LICHESS_API_TOKEN = "your_api_token"
With all requirements set up, run the Streamlit app from the top directory using the following command:
streamlit run main.py
Ensure pytest
is installed:
pip install pytest
Install the Project in Editable Mode:
pip install -e .
From the root project directory, run tests with:
pytest
- Ensure you have Python 3.6 or newer installed.
- Install Sphinx:
pip install sphinx
To build the documentation, run the following command in the project root:
sphinx-build -b html docs/source docs/build
This will generate HTML documentation in the docs/build directory.
Open docs/build/index.html in your web browser to view the documentation.