Prelude
Taipy is a Python web framework for data-driven applications. Developers can build web applications only with Python. The simple method for building web applications is especially beneficial for Data Scientists and analytics professionals. They are gaining popularity in the field. At the time of writing this post, they have 1.9k forks and 17.6k stars.
I have been contributing to Taipy for a while now. I started because of my strong interest in data science and analytics, and I felt that my tech skills aligned well with the project. Contributing has given me practical experience solving problems for developers using this framework, and I’ve learned a lot from feedback provided by experienced maintainers. During Hacktoberfest, I found many developers struggled to test their updates on their environment. I want to share my workflow in this post. I hope this helps someone who wants to contribute to Taipy.
Setup the workflow
When you want to start contributing to a project, you will go to the CONTRIBUTING.md first. Once you read through the contribution guide. You will find Taipy is using React behind the scenes even though users don't need to touch any JavaScript.
The majority of my contributions are for the React part. To check updates, you need to build the React, install the updated Taipy to your Python environment, and run a test Tapy script. It's a bit of work to do this every time. I created a bash script for this.
taipy-build.sh
#!/bin/bash
# automate build process of Taipy repo
# Build taipy-gui
cd ~/projects/taipy/frontend/taipy-gui/dom;
npm i;
cd ..;
npm i --omit=optional;
npm run build;
# Build taipy
cd ~/projects/taipy/frontend/taipy;
npm i;
npm run build;
# install new taipy
cd ~/projects/test-taipy;
source venv/bin/activate
pip install ../taipy
After running this script, I just run taipy run --use-reloader main.py
in the virtual environment. You can see the updated behavior.
pip install ../taipy
is important you install taipy locally. Please point to the taipy in your file system.
Example PR
Let's take a look at my first PR to Taipy in 2025.
A developer found the height property is not working on the Selector component in Radio mode.
The first thing to do is to create a simple Python script to reproduce the bug. Otherwise, we cannot check if the update fixed the issue. In this issue, the maintainer provided a script, so I used his script.
Once I reproduced the bug, I started looking at the Taipy codebase. While searching "Selector", I found the file to work on for this issue "Selector.tsx". I also found the height property is not used for radio mode and check mode in the selector component. I need to pass the height property somehow. Following other styling property handling, it's better to use useMemo and create heights.
Initially, I passed the Sx to the parent element(FormControl), it worked fine as expected but the maintainer gave me feedback that it's better to control styling from RadioGroup/FormGroup level as the label remains visible on the Taipy app. This gave me a challenge because the styling didn't work as expected in this way.
While playing with the styling on the browser developer tools, I found that flexFlow: column wrap
was the reason for this behavior. I added flexFlow: 'column nowrap
to the heightSx. I validated this work as expected with the test script after installing the updated taipy.
After implementing it, I need to create unit tests. Adding a new test case is not so bad as I can see many examples from the existing tests. I added new tests for radio and check mode height styling.
It looks straightforward but it took me lots of tries and errors. After refining a PR with the maintainers' feedback, it's getting approved and merged.🎉🎉
Pick the right issue for you
I know the feeling that you want to do impressive work, however, it's not sustainable for you and the maintainers if you take too difficult issues for your level. Easier issues will get you familiar with the project and you also learn something new. I usually research the issue a bit before asking for the assignment to ensure I can handle it.
As Tomo Fujita says
Don't Worry
Don't Compare
Don't expect too fast
Be kind to yourself
If contributing to Taipy repo is too much, you can also take a look at taipy-doc. Documentation matters for libraries.
Conclusion
Contributing to Taipy has been a rewarding journey. Whether you’re fixing bugs, enhancing features, or improving documentation, every contribution matters. Don’t hesitate to start small—your efforts could help the next developer struggling with the same issue!
Top comments (0)