Welcome to Latitude's open source community! We're thrilled you're considering joining us. Whether you're here to add your coding skills or to offer suggestions and insights, we cherish every contribution. Don't worry if it's your first time diving into an open source project—our community is here to support and guide you every step of the way!
To ensure your work has the best chance of being accepted, please read this before contributing anything!
The Open Source Guides website has a collection of resources for individuals, communities, and companies. These resources help people who want to learn how to run and contribute to open source projects. Contributors and people new to open source alike will find the following guides especially useful:
Thank you for your contribution to Latitude!
Issues can include bugs, feature ideas, docs improvements, database connector requests, and any other suggestions or ideas you have for improving Latitude.
- Ensure you review existing documentation and issues prior to submission to avoid duplicates.
- Contribute to existing issues by providing your input and signify its relevance with a thumbs-up reaction.
- Select the appropriate issue template for your submission: Bug Report, Documentation Request, Feature Request, or Source Connector Request.
- Craft a concise and informative title for your issue.
- Provide detailed information in your issue report, including system specifications, error logs, and reproducible steps, to facilitate efficient assistance.
If you create a new issue, someone from the Latitude team will respond within 24 hours.
If you have a solution for an issue someone else posted, please comment on that issue with the solution.
If your problem relates to sensitive or private information, please don't post any of your data in an issue. We suggest creating a small test dataset that can reproduce the problem without revealing any private info, and posting that data in the issue. If that's not possible, please reach out to support@latitude.so.
Follow these steps to test your changes, once you've started the example project (per steps below),
you should be able to open the Latitude Development Workspace on localhost:3000. Any subsequent changes you make will be reflected on the website.
Open a terminal and make sure pnpm is installed with:
npm i -g pnpmIn the project root folder, run:
pnpm installAfter executing the commands above, you should have the project setup in place. Our project is structured as a monorepo, which includes an apps/server directory where the main Latitude application resides. This is the application that users will interact with. Additionally, we have a packages directory that contains various packages used by the app.
When developing a new feature or fixing an issue, it is recommended to use the Latitude CLI in development mode. For this purpose, you can create a new Latitude data project within the ./sites directory. Please note that all files within this folder are configured to be ignored by Git.
The first step in your development process should be to build the Latitude CLI in development mode. This can be achieved by running the appropriate command:
cd ./packages/cli
pnpm run devOnce the CLI is running you can create your development project by running:
cd ./sites
pnpm run latitude-dev startNow you can start developing your feature or fix in the project you just created.
cd ./sites/your-project
pnpm run latitude-dev devNow start dev mode in the packages you want to change. To do that go to the repo root and start the packages you want to refresh:
Add the --filter=./packages/PACKAGE_YOU_WANT_TO_REFRESH for each package you want to refresh.
Example:
pnpm dev --filter=./packages/client/core --filter=./packages/client/react --filter=./packages/embeddingThe automated test suite should run upon PR creation via Github actions.
You can also run the tests locally via pnpm test or with watch mode via pnpm test:watch. To do that enter in the package you want to test and run the command.
Pull requests are welcome! We review pull requests as they are submitted and will reach out to you with any questions or comments.
Follow these steps to submit a pull request for your changes:
- Create a fork of the latitude repo
- Commit your changes to your fork
- Test your changes to make sure all results are as expected
- Format your code to prevent linting errors
pnpm run format - Add a changeset
- Open a pull request against the
mainbranch of the latitude repo
Changesets ensure that package versions are updated correctly before releasing onto NPM.
cdto the root of the monorepopnpm changeset- Follow the steps in the CLI to add some change notes:
- Bump the packages that have changed (use space bar to select/deselect packages)
- Most things are patch changes, not major or minor patch bumps
- Unless you're making changes that will break someone's project, or change it in a really unexpected way, just do a patch release
- Commit the release notes to your branch so they'll be included as part of the PR
- the file will be called three random words like
wild-eggs-drive.md
- the file will be called three random words like
We publish Latitude packages on npmjs.com and GitHub, using semantic versioning to manage our package versions.
There are two types of publications: latest, representing stable versions, and next, for pre-release versions.
Our pre-release.yml CI workflow automatically publishes to the next distribution tag on npmjs.com when changes are merged into the next branch.
To make a pre-release, follow these steps:
- Switch to the
nextbranch and rungit rebase mainto ensure it's up to date with the latest package versions. - Branch off
nextfor your changes. - Enter the pre release mode by running
pnpm changeset pre enter next. - Create a changeset for your modifications using
pnpm changeset. - Open a pull request on GitHub targeting the
nextbranch.
Once the pull request is merged, the CI will generate a PR with the changesets. Eventually, someone with permissions will merge this PR into next, triggering the publication of a pre-release.
Our release.yml CI workflow publishes to the latest distribution tag on npmjs.com (the default) when changes are merged into the main branch.
To make a release, you should:
- Create a new branch from
mainfor your updates. - Generate a changeset for your changes using
pnpm changeset add. - Submit a pull request on GitHub directed at the
mainbranch.
Following the merge of your pull request, the CI workflow will produce a PR containing the changesets. Eventually, an authorized individual will merge this PR into main, resulting in the release being published.
Again, thank you for your contribution to Latitude! ❤️