Contributing

Developing the website

Building the website locally

For building the website locally, you’ll need the following dependencies installed:

  • Python >= 3.9

  • git

Then follow the steps below:

Unix like systems (macOS, Linux)

Clone the repository:

$ git clone https://github.com/jvcarli/scientific-programming-for-acoustics

Go to the cloned repository directory:

$ cd scientific-programming-for-acoustics

It is strongly recommended to create a virtual environment for installing the dependencies.

First, check your Python version and make sure that it is the correct one:

$ python --version

It must output at least Python 3.9.0.

Then create the virtual environment using:

$ python -m venv venv

Activate the virtual environment:

$ source venv/bin/activate

Then install the website dependencies using:

$ pip install -r dev_requirements.txt

Install the project git hooks using pre-commit:

Security Disclaimer

pre-commit tool was installed in the step above with pip install -r dev_requirements.txt.

Please note that when we run pre-commit install we are installing custom git hooks defined in .pre-commit-config.yaml.

These scripts are safe. You can read their execution entrypoint by checking the file. Example.

Local git hooks scripts are in tools/bin/git_hooks directory.

$ pre-commit install

Finally, build the website locally using:

$ make html

The website will be located in the build directory.

You can view it in your browser by serving it locally with:

$ python -m http.server --directory build/html

Then open the link: http://localhost:8000