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.toml
file (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.lock
file (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 dependencies
We use black
and ruff
to format the code.
To format the code, run the following command (more details in the Makefile
):
make format
We use ruff
to check the linting.
To check the linting, run the following command (more details in the Makefile
):
make lint
You can run the tests with the following code (more details in the Makefile
):
make test
To get the selenium tests working you should have Google Chrome installed.
If you want to visually follow the selenium tests;
- change the
TESTING_LOCAL
variable intests/conftest.py
toTrue
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/sphinx
and run from that directory:
sphinx-autogen -o _autosummary && make clean html
Bonus points for contributions that include a performance analysis with a benchmark script and profiling output (please report on the GitHub issue).