Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make some updates to the contributing sections of the docs #14161

Merged
merged 3 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Contribute
title: How to Contribute
---
cicdw marked this conversation as resolved.
Show resolved Hide resolved

Thanks for contributing to Prefect!
cicdw marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -58,7 +58,7 @@ If you intend to run a local Prefect server during development, first build the
See [UI development](#ui-development) for instructions.
</Tip>

## Developer tooling
### Developer tooling

The Prefect CLI provides several helpful commands to aid development.

Expand All @@ -74,9 +74,11 @@ Start a Prefect API that reloads on code changes:
prefect dev api
```

### UI development
## UI development

Developing the Prefect UI requires installation of [npm](https://github.com/npm/cli).
Developing the Prefect UI requires installation of [npm](https://github.com/npm/cli).
We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage Node.js versions.
Once installed, run `nvm use` from the root of the Prefect repository to initialize the proper version of `npm` and `node`.

Start a development UI that reloads on code changes:

Expand All @@ -90,57 +92,29 @@ Build the static UI (the UI served by `prefect server start`):
prefect dev build-ui
```

### Docs development
## Docs development

We use [Mintlify](https://mintlify.com/) to host and build the documentation.

The main branch of the [prefecthq/prefect](https://github.com/PrefectHQ/prefect) GitHub repository is used to build the Prefect 3.0rc docs at [docs-3.prefect.io](https://docs-3.prefect.io) temporarily.

The 2.x docs are hosted at [docs.prefect.io](https://docs.prefect.io) and built from the 2.x branch of prefecthq/prefect.

## Getting started

Make sure you have a recent version of Node.js installed. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage Node.js versions.

1. Clone this repository.
2. Run `nvm use node` to use the correct Node.js version.
3. Run `npm i -g mintlify` to install Mintlify.
4. Run `mintlify dev` to start the development server.
2. Run `cd docs` to navigate to the docs directory.
3. Run `nvm use node` to use the correct Node.js version.
4. Run `npm i -g mintlify` to install Mintlify.
5. Run `mintlify dev` to start the development server.

Your docs should now be available at `http://localhost:3000`.

See the [Mintlify documentation](https://mintlify.com/docs/development) for more information on how install Mintlify, build previews, and use Mintlify's features while writing docs.

`.mdx` files are Markdown files that can contain JavaScript and React components. They are used to create interactive documentation.

### Kubernetes development

Generate a manifest to deploy a development API to a local kubernetes cluster:

```bash
prefect dev kubernetes-manifest
```

To access the Prefect UI running in a Kubernetes cluster, use the `kubectl port-forward` command to forward a port on your local
machine to an open port within the cluster. For example:

```bash
kubectl port-forward deployment/prefect-dev 4200:4200
```

This forwards port 4200 on the default internal loop IP for localhost to the Prefect server deployment.

To tell the local `prefect` command how to communicate with the Prefect API running in Kubernetes, set the `PREFECT_API_URL`
environment variable:

```bash
export PREFECT_API_URL=http://localhost:4200/api
```

Since you previously configured port forwarding for the localhost port to the Kubernetes environment, you can interact
with the Prefect API running in Kubernetes when using local Prefect CLI commands.

### Add database migrations
## Add database migrations

To make changes to a table, first update the SQLAlchemy model in `src/prefect/server/database/orm_models.py`. For example,
to add a new column to the `flow_run` table, add a new column to the `FlowRun` model:
Expand Down
2 changes: 1 addition & 1 deletion docs/contribute/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ There are many ways to get involved with the Prefect community:

- Join over 26,000 engineers in the [Prefect Slack community](https://prefect.io/slack)
- [Give Prefect a ⭐️ on GitHub](https://github.com/PrefectHQ/prefect)
- [Contribute](/contribute/install-contribute) to Prefect's open source libraries
- [Contribute](/contribute/dev-contribute) to Prefect's open source libraries
- [Contribute integrations](/contribute/integrations) to the community

## Report an issue
Expand Down
4 changes: 2 additions & 2 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dark": "/logos/logo-word-white.svg"
},
"modeToggle": {
"default": "dark",
"default": "light",
"isHidden": false
},
"favicon": "/logos/favicon.png",
Expand Down Expand Up @@ -681,7 +681,7 @@
"group": "Contribute",
"pages": [
"contribute/index",
"contribute/install-contribute",
"contribute/dev-contribute",
"contribute/styles-practices",
"contribute/develop-a-new-worker-type",
"contribute/contribute-integrations",
Expand Down