|
| 1 | +# Contributing |
| 2 | + |
| 3 | +This project welcomes contributions and suggestions. Most contributions require you to agree to a |
| 4 | +Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us |
| 5 | +the rights to use your contribution. For details, visit <https://cla.opensource.microsoft.com>. |
| 6 | + |
| 7 | +When you submit a pull request, a CLA bot will automatically determine whether you need to provide |
| 8 | +a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions |
| 9 | +provided by the bot. You will only need to do this once across all repos using our CLA. |
| 10 | + |
| 11 | +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). |
| 12 | +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or |
| 13 | +contact [[email protected]](mailto:[email protected]) with any additional questions or comments. |
| 14 | + |
| 15 | +- [Submitting a Pull Request (PR)](#submitting-a-pull-request-pr) |
| 16 | +- [Setting up the development environment](#setting-up-the-development-environment) |
| 17 | +- [Submission Guidelines](#submit) |
| 18 | + - [Submit an Issue](#submit-issue) |
| 19 | +- [Running unit tests](#running-unit-tests) |
| 20 | +- [Code style](#code-style) |
| 21 | +- [Adding new azd environment variables](#adding-new-azd-environment-variables) |
| 22 | + |
| 23 | +## Submitting a Pull Request (PR) |
| 24 | + |
| 25 | +Before you submit your Pull Request (PR) consider the following guidelines: |
| 26 | + |
| 27 | +- Search the repository (<https://github.com/Azure-Samples>]/[repository-name]/pulls) for an open or closed PR |
| 28 | + that relates to your submission. You don't want to duplicate effort. |
| 29 | +- Make your changes in a new git fork |
| 30 | +- Follow [Code style conventions](#code-style) |
| 31 | +- [Run the tests](#running-unit-tests) (and write new ones, if needed) |
| 32 | +- Commit your changes using a descriptive commit message |
| 33 | +- Push your fork to GitHub |
| 34 | +- In GitHub, create a pull request to the `main` branch of the repository |
| 35 | +- Ask a maintainer to review your PR and address any comments they might have |
| 36 | + |
| 37 | +## <a name="submit"></a> Submission Guidelines |
| 38 | + |
| 39 | +### <a name="submit-issue"></a> Submitting an Issue |
| 40 | +Before you submit an issue, search the archive, maybe your question was already answered. |
| 41 | + |
| 42 | +If your issue appears to be a bug, and hasn't been reported, open a new issue. |
| 43 | +Help us to maximize the effort we can spend fixing issues and adding new |
| 44 | +features, by not reporting duplicate issues. Providing the following information will increase the |
| 45 | +chances of your issue being dealt with quickly: |
| 46 | + |
| 47 | +* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps |
| 48 | +* **Version** - what version is affected (e.g. 0.1.2) |
| 49 | +* **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you |
| 50 | +* **Browsers and Operating System** - is this a problem with all browsers? |
| 51 | +* **Reproduce the Error** - provide a live example or a unambiguous set of steps |
| 52 | +* **Related Issues** - has a similar issue been reported before? |
| 53 | +* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be |
| 54 | + causing the problem (line of code or commit) |
| 55 | + |
| 56 | +You can file new issues by providing the above information at the corresponding repository's issues link: https://github.com/Azure-Samples/llamaindex-search-javascript/issues/new]. |
| 57 | + |
| 58 | +## Setting up the development environment |
| 59 | + |
| 60 | +Install the development dependencies: |
| 61 | + |
| 62 | +```shell |
| 63 | +pnpm install |
| 64 | +``` |
| 65 | + |
| 66 | +Run the development server: |
| 67 | + |
| 68 | +```shell |
| 69 | +pnpm dev |
| 70 | +``` |
| 71 | + |
| 72 | +Build the project: |
| 73 | + |
| 74 | +```shell |
| 75 | +pnpm build |
| 76 | +``` |
| 77 | + |
| 78 | +## Running unit tests |
| 79 | + |
| 80 | +Run the tests: |
| 81 | + |
| 82 | +```shell |
| 83 | +pnpm test |
| 84 | +``` |
| 85 | + |
| 86 | +## Code style |
| 87 | + |
| 88 | +Run the linter for code style checks: |
| 89 | + |
| 90 | +```shell |
| 91 | +pnpm lint |
| 92 | +``` |
| 93 | + |
| 94 | +## Adding new azd environment variables |
| 95 | + |
| 96 | +When adding new azd environment variables, please remember to update: |
| 97 | + |
| 98 | +1. App Service's [azure.yaml](./azure.yaml) |
| 99 | +1. [ADO pipeline](.azdo/pipelines/azure-dev.yml). |
| 100 | +1. [Github workflows](.github/workflows/azure-dev.yml) |
| 101 | + |
| 102 | +That's it! Thank you for your contribution! |
0 commit comments