First of all, thank you for considering contributing to plotly-resampler.
It's people like you that will help make plotly-resampler a great toolkit. 🤝
As usual, contributions are managed through GitHub Issues and Pull Requests.
As usual, contributions are managed through GitHub Issues and Pull Requests.
We invite you to use GitHub's Issues to report bugs, request features, or ask questions about the project. To ask use-specific questions, please use the Discussions instead.
If you are new to GitHub, you can read more about how to contribute here.
Note: this guide is tailored to developers using linux
The following steps assume that your console is at the root folder of this repository.
It is best practice to use a new Python environment when starting on a new project.
We describe two options;
Advised option: using poetry shell
For dependency management we use poetry (read more below).Hence, we advise to use poetry shell to create a Python environment for this project.
- Install poetry: https://python-poetry.org/docs/#installation
(If necessary add poetry to the PATH) - Create & activate a new python environment:
poetry shell
After the poetry shell command your python environment is activated.
Alternative option: using python-venv
As alternative option, you can create a Python environment by using python-venv- Create a new Python environment:
python -m venv venv - Activate this environment;
source venv/bin/activate
Make sure that this environment is activated when developing (e.g., installing dependencies, running tests).
We use poetry as dependency manager for this project.
- The dependencies for installation & development are written in the
pyproject.tomlfile (which is quite similar to a requirements.txt file). - To ensure that package versions are consistent with everyone who works on this project poetry uses a
poetry.lockfile (read more here).
To install the requirements
pip install poetry # install poetry (if you do use the venv option)
poetry install --all-extras # install all the dependenciesWe use black and ruff to format the code.
To format the code, run the following command (more details in the Makefile):
make formatWe use ruff to check the linting.
To check the linting, run the following command (more details in the Makefile):
make lintYou can run the tests with the following code (more details in the Makefile):
make testTo get the selenium tests working you should have Google Chrome installed.
If you want to visually follow the selenium tests;
- change the
TESTING_LOCALvariable intests/conftest.pytoTrue
When you've added or updated a feature; it is always a good practice to alter the documentation and changelog.md.
The current listing below gives you the provided steps to regenerate the documentation.
- Make sure that your python env is active (e.g., by running
poetry shell) - Navigate to
docs/sphinxand run from that directory:
sphinx-autogen -o _autosummary && make clean htmlBonus points for contributions that include a performance analysis with a benchmark script and profiling output (please report on the GitHub issue).