Skip to content
This repository has been archived by the owner on Feb 14, 2025. It is now read-only.

Latest commit

 

History

History
83 lines (57 loc) · 4.62 KB

CONTRIBUTING.md

File metadata and controls

83 lines (57 loc) · 4.62 KB

Feedback and Contribution

We welcome any input, feedback, bug reports, and contributions via ThoughtSpot TML's GitHub Repository.

All contributions, suggestions, and feedback you submitted are accepted under the Project's license. You represent that if you do not own copyright in the code that you have the authority to submit it under the Project's license. All feedback, suggestions, or contributions are not confidential.

Setting Up Your Environment

Fork the ThoughtSpot TML repository on GitHub and then clone the fork to you local machine. For more details on forking see the GitHub Documentation.

git clone https://github.com/YOUR-USERNAME/thoughtspot_tml.git

To keep your fork up to date with changes in this repo, you can use the fetch upstream button on GitHub.

ThoughtSpot TML uses uv (docs) to manage its dependencies. Once you have cloned the repository, run the following command from the root of the repository to setup your development environment:

cd thoughtspot_tml/
uv pip install -e ".[dev]"
uv run hatch run dev:setup

Now you can install the latest version of ThoughtSpot TML locally using pip. The -e flag indicates that your local changes will be reflected every time you open a new Python interpreter (instead of having to reinstall the package each time).

[dev] indicates that pip should also install the development and documentation requirements which you can find in pyproject.toml ([project.optional-dependencies]/dev)

ThoughtSpot TML also uses Hatch to group together commands (hatch run dev:setup) for simpler maintenance of irregular contributors. You can observe the individual commands that are run within each named script under [tool.hatch.envs.dev.scripts].

Creating a Branch

Once your local environment is up-to-date, you can create a new git branch which will contain your contribution (always create a new branch instead of making changes to the main branch):

git switch -c <your-branch-name> dev

With this branch checked-out, make the desired changes to the package.

Creating a Pull Request

When you are happy with your changes, you can commit them to your branch by running

git add <modified-file>
git commit -m "Some descriptive message about your change"
git push origin <your-branch-name>

You will then need to submit a pull request (PR) on GitHub asking to merge your example branch into the main ThoughtSpot TML repository. For details on creating a PR see GitHub documentation Creating a pull request.

You can add more details about your example in the PR such as motivation for the example or why you thought it would be a good addition. You will get feedback in the PR discussion if anything needs to be changed. To make changes continue to push commits made in your local example branch to origin and they will be automatically shown in the PR.

Hopefully your PR will be answered in a timely manner and your contribution will help others in the future.

Important

If you're writing support for a new version of ThoughtSpot

this step requires you to download scriptability's EDoc protocol buffer specification from ThoughtSpot's internal version control.

Building from source protos will require you to install the Protobuf compiler (protoc).

  • MacOS users can brew install protobuf
  • Windows users can choco install protobuf
  • or .. manually download, unzip, and add to your PATH variable.

From here, you can run the following command to generate the _scriptability.py python module.

uv run hatch run dev:compile

If the edoc spec has significantly changed since the last built version, you may need to investigate fixes. A good place to start is _generate/__main__.py, where the code has been heavily commented.


Readying a Release

The ThoughtSpot TML's release process is managed by Github Actions!

Simply publish a new release here on Github with the appropriate next-version tag, and Github will take care of publishing it to PyPI.