Skip to content

Latest commit

 

History

History
94 lines (75 loc) · 4.38 KB

CONTRIBUTING.md

File metadata and controls

94 lines (75 loc) · 4.38 KB

Contributing

Thanks for your interest in helping improve the Streamlit Navigation Bar! This guide is for people who want to contribute code to the project. There are other ways to contribute, such as reporting a bug or requesting a feature. You can also just ask a question, or join the discussions in the community forum. Note that we have a code of conduct, please follow it in all your interactions with the project.

Before starting

If your contribution is more than a few lines of code, then prior to starting to code on it please post in the respective issue saying you want to volunteer, and then wait for a positive response. If there is no issue for it yet, create it first. This helps make sure:

  • Two people aren't working on the same thing
  • This is something the project's maintainers believe should be implemented or fixed
  • Any API, UI, or deeper architectural changes that need to be implemented have been fully thought through by the project's maintainers
  • Your time is well spent!

Style guide

We use Black, with a line length of 80, to format the code. Besides that, Streamlit's oficial style guide is followed throughout the project.

Development

Ensure you have Python 3.8+, Node.js and npm installed.

  1. Fork the repository via the user interface on GitHub and then do the following:
git clone https://github.com/${YOUR_NAME}/streamlit-navigation-bar.git
cd streamlit-navigation-bar
git remote add remote https://github.com/gabrieltempass/streamlit-navigation-bar.git
git checkout develop
git submodule update --init
git checkout -b ${BRANCH_NAME}
  1. Go to the frontend directory and initialize and run the component frontend:
cd streamlit_navigation_bar/frontend
npm install
npm run dev
  1. From a separate terminal, go to the repository root directory, create a new Python virtual environment, activate it and install Streamlit, st-theme and the directory as an editable package:
cd streamlit-navigation-bar
python3 -m venv venv
. venv/bin/activate
pip install streamlit
pip install st-theme
pip install -e .

Still from the same separate terminal, run the example Streamlit app:

streamlit run streamlit_navigation_bar/example.py

If all goes well, you should see something like this:

Quickstart success

Modify the frontend code at streamlit_navigation_bar/frontend/src/StNavbar.vue. Modify the Python code at streamlit_navigation_bar/__init__.py.

  1. Submit your pull request.