Skip to content

Commit

Permalink
[docs] Cherrypick latest docs for docs/oss-materials/ (#35953)
Browse files Browse the repository at this point in the history
These are all the changes to the open-source Mojo docs intended for the
release with 24.2.

---------

Co-authored-by: Joe Loser <joe@modular.com>
Co-authored-by: Jack Clayton <jack@modular.com>
Co-authored-by: ematejska <ewa@modular.com>
Co-authored-by: Arthur Evans <arthur@modular.com>

modular-orig-commit: 64924205cdb683fe2083a5814bc3455047739e4f
  • Loading branch information
scottamain committed Mar 27, 2024
1 parent 01ec9ce commit ff0bbfc
Show file tree
Hide file tree
Showing 13 changed files with 584 additions and 239 deletions.
130 changes: 112 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Mojo Contributor Guide
# Mojo contributor guide

Welcome to the Mojo community! 🔥 We’re very excited that you’re interested in
contributing to the project. To help you get started and ensure a smooth
Expand All @@ -8,7 +8,7 @@ There are many ways to contribute to the project, from joining the
[Discord community](https://www.discord.gg/modular), to filing bugs, to
contributing documentation, examples, or code.

## Submitting Bugs
## Submitting bugs

Reporting issues is a great way to contribute to the project. Mojo uses GitHub
Issues for tracking bugs.
Expand All @@ -21,25 +21,25 @@ Also, before opening a new issue, take a moment to search through the already
submitted issues to avoid creating duplicate issues for the maintainers to
address.

### Writing High-Quality Bugs
### Writing high-quality bugs

We encourage you to provide as much information about the issue as practical.
The more details you provide, the faster we can resolve the issue. The following
is a template of the information that should accompany every submitted issue.

#### Issue Template
#### Issue template

- **Summary.** A descriptive summary of the issue.
- **Description.** A detailed account of the bug, including what was expected
and what occurred.
- **Environment Details.**
- **Environment details.**
- Mojo Compiler Version
- Operating System version
- Hardware Specifications
- **Severity/Frequency.** An assessment of the impact ranging from inconvenience
- **Severity/frequency.** An assessment of the impact ranging from inconvenience
to a blocker.

## Contributing to Docs and Examples
## Contributing to docs and examples

We’re happy to accept pull requests for the docs and examples.
If your change is any one of the following, please create a pull request and we
Expand Down Expand Up @@ -67,7 +67,7 @@ require difficult reviews and rework, or that might get rejected.
See [Pull Requests](#pull-requests) for information on creating your first pull
request.

## Contributing to the Standard Library
## Contributing to the standard library

The standard library team is dedicated to creating a vibrant technical community
around the Mojo programming language. Our vision includes a diverse and
Expand All @@ -84,12 +84,12 @@ For more information on our priorities, see the following documents:
For technical details on developing for the standard library, see the following
documents:

- [Developing the Standard Library](./stdlib/docs/development.md) covers building,
- [Developing the standard library](./stdlib/docs/development.md) covers building,
testing, and other information you’ll need to work in the standard library.
- [Coding Standards and Style Guide](./stdlib/docs/style-guide.md) provides
guidelines for writing code for the standard library.

### Accepting Open Source PRs
### Accepting open source PRs

To ensure a streamlined process, contributors are encouraged to focus on
enhancements, bug fixes, and optimizations aligned with the library's
Expand Down Expand Up @@ -153,7 +153,7 @@ This process is heavily inspired by the process used by several other
open-source projects. We’ll add more documentation in the future as we gain
experience with the process.

## Pull Requests
## Pull requests

You can use a pull request to propose a change or bug fix to the Mojo Standard
Library, Mojo examples, or Mojo documentation. This page gives an overview of
Expand All @@ -162,28 +162,122 @@ the process, especially for first-time contributors.
**Note:** Pull requests should be submitted against the `nightly` branch,
which represents the most recent nightly build.

### Pull Request Process
### Pull request process

#### 1. First-time checklist
#### First-time checklist

Before you start your first pull request, please complete this checklist:

- Read this entire contributor guide.
- Read the [Code of Conduct](./CODE_OF_CONDUCT.md).

#### 2. Evaluate and get buy-in on the change
#### Evaluate and get buy-in on the change

We want to be sure that you spend your time efficiently and prepare changes that
aren’t controversial and get stuck in long rounds of reviews. See the sections
on [Contributing to Docs and Examples](#contributing-to-docs-and-examples) and
[Contributing to the Standard Library](#contributing-to-the-standard-library)
[Contributing to the standard library](#contributing-to-the-standard-library)
for more details.

#### 3. Create a pull request
#### Fork and clone the repo

Go to the [Mojo repo](https://github.com/modularml/mojo) and click the fork
button:

![Create Fork](./images/create-fork.png)

Clone your forked repo locally with the command:

```bash
git clone git@github.com:[your-username]/mojo.git
cd mojo
```

Add the upstream remote and fetch it:

```bash
git remote add upstream git@github.com:modularml/mojo.git
git fetch upstream
```

#### Branching off nightly

Make sure to branch off `nightly` to work on your PR:

```bash
git checkout upstream/nightly
git checkout -b my-fix-pr
```

You should periodically make sure you've synced the latest changes, especially
before raising a PR:

```bash
git fetch upstream
git rebase upstream/nightly
```

#### Getting the nightly Mojo compiler

Now that you're on the nightly branch, you need to install the latest nightly
Mojo compiler:

```bash
curl https://get.modular.com | sh -

modular auth

modular install nightly/mojo
```

If you already have an older `nightly/mojo` compiler, replace
`modular install nightly/mojo` with `modular update nightly/mojo`.

Then, follow the instructions from the `modular` tool in adding the `mojo`
compiler to your `PATH` such as:

```bash
echo export MODULAR_HOME="$HOME/.modular" >> ~/.zshrc
echo 'export PATH="$HOME/.modular/pkg/packages.modular.com_nightly_mojo/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
```

If you're using bash, replace the three `~/.zshrc` above with `~/.bashrc`.

#### Mojo nightly vscode extension

Install the [Mojo nightly VS Code
extension](https://marketplace.visualstudio.com/items?itemName=modular-mojotools.vscode-mojo-nightly):

<img src="./images/nightly-extension.png" width=350 />

You can only have one Mojo extension enabled at a time, remember to switch back
when using the stable release!

#### Create a pull request

If your change is one of the improvements described above or it has been
discussed and agreed upon by the project maintainers, please create a pull
request into the `nightly` branch and include the following:
request into the `nightly` branch.

First push your changes:

```bash
git push -u [your-username] my-fix-pr
```

You'll see a link to create a PR:

```plaintext
remote: Create a pull request for 'my-fix-pr' on GitHub by visiting:
remote: https://github.com/jackos/mojo/pull/new/my-fix-pr
```

Make sure you point it to the `nightly` branch:

![Base Branch](images/base-branch.png)

Now fill out the details:

- A short commit title describing the change.
- A detailed commit description that includes rationalization for the change
Expand Down Expand Up @@ -251,7 +345,7 @@ By making a contribution to this project, I certify that:
this project or the open source license(s) involved.
```

### Review Time SLA
### Review time SLA

The team commits to reviewing submitted pull requests within a week of
submission.
64 changes: 39 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@ and production by combining Python syntax and ecosystem with systems
programming and metaprogramming features. Mojo is still young, but it is designed
to become a superset of Python over time.

To use Mojo, you can install the MAX SDK or the standalone Mojo SDK:

- [Get the MAX SDK.](https://docs.modular.com/engine/get-started)
- [Get the Mojo SDK.](https://docs.modular.com/mojo/manual/get-started/)

Then follow the docs to [write your first Mojo
program](https://https://docs.modular.com/mojo/manual/get-started/hello-world).
When you want to report issues or request features, [please create a GitHub
issue here](https://github.com/modularml/mojo/issues). See the [Mojo
Contributor Guide](https://www.notion.so/f527254bc46b4cd3ba4b34bd949d4e57?pvs=21)
for guidelines on filing good bugs.

This repo includes source code for:

- Mojo examples
Expand All @@ -30,30 +18,56 @@ This repo includes source code for:
This repo has two primary branches:

- The [`main`](https://github.com/modularml/mojo/tree/main) branch, which is in
sync with the last released version of Mojo. Use the examples here if you’re
using a release build of Mojo.
sync with the last stable released version of Mojo. Use the examples here if you’re
using a [release build of Mojo](#latest-released).

- The [`nightly`](https://github.com/modularml/mojo/tree/nightly) branch, which
is in sync with the Mojo nightly build and subject to breakage. Use this branch
for [contributions](./CONTRIBUTING.md).
for [contributions](./CONTRIBUTING.md), or if you're using the latest
[nightly build of Mojo](#latest-nightly).

To learn more about Mojo, see the
[Mojo Manual](https://docs.modular.com/mojo/manual/).

## Installing Mojo

### Latest Released

To install the last released build of Mojo, you can install the MAX SDK
or the standalone Mojo SDK:

This repo represents the Mojo open source effort. We are continuing to open
parts of the Mojo codebase. The challenge is that we use Mojo pervasively
inside Modular and we need to make sure that community contributions can
proceed smoothly with good build and testing tools that will allow this repo to
become the source of truth (right now it is not). We'll progressively improve
the tools and add more source code over time.
- [Get the MAX SDK](https://docs.modular.com/engine/get-started)
- [Get the Mojo SDK](https://docs.modular.com/mojo/manual/get-started/)

If you’d like to contribute to Mojo, please first read our [Contributor
Then follow the docs to [write your first Mojo
program](https://https://docs.modular.com/mojo/manual/get-started/hello-world).

### Latest Nightly

The nightly Mojo builds are subject to breakage and provide an inside
view of how the development of Mojo is progressing. Use at your own risk
and be patient! Intall them using the instructions [here](./CONTRIBUTING.md).

## Contributing

When you want to report issues or request features, [please create a GitHub
issue here](https://github.com/modularml/mojo/issues).
See [here](./CONTRIBUTING.md) for guidelines on filing good bugs.

We welcome contributions to this repo on the
[`nightly`](https://github.com/modularml/mojo/tree/nightly)
branch. If you’d like to contribute to Mojo, please first read our [Contributor
Guide](https://github.com/modularml/mojo/blob/main/CONTRIBUTING.md).

For more general questions or to chat with other Mojo developers, check out our
[Discord](https://discord.gg/modular).

To learn more about Mojo, see the
[Mojo Manual](https://docs.modular.com/mojo/manual/).
## License

This repository is licensed under the Apache License v2.0 with LLVM Exceptions
(see the LLVM [License](https://llvm.org/LICENSE.txt)).

## Thanks To Our Contributors
## Thanks to our contributors

<a href="https://github.com/modularml/mojo/graphs/contributors">
<img src="https://contrib.rocks/image?repo=modularml/mojo" />
Expand Down
6 changes: 3 additions & 3 deletions docs/oss-material/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Code of Conduct
# Code of conduct

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
Expand All @@ -7,7 +7,7 @@ body size, disability, ethnicity, gender identity and expression, level of
experience, nationality, personal appearance, race, religion, or sexual
identity and orientation.

## Our Standards
## Our standards

All community forums and spaces are meant for professional interactions that
are friendly, inclusive, helpful, and collaborative. Examples of behavior that
Expand All @@ -32,7 +32,7 @@ participants include:
- Conduct which could reasonably be considered inappropriate for the forum in
which it occurs.

## Our Responsibilities
## Our responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
Expand Down
Binary file added docs/oss-material/images/base-branch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/oss-material/images/create-fork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/oss-material/images/nightly-extension.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 12 additions & 12 deletions stdlib/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Welcome to the Mojo Standard Library
# Welcome to the Mojo standard library

This folder contains the open-source Mojo Standard Library! 🔥
This folder contains the open-source Mojo standard library! 🔥

We're thrilled to have you join our community of developers eager to build a
vibrant and supportive ecosystem. If you just want to *use* the Mojo Standard
Expand All @@ -10,7 +10,7 @@ standalone Mojo SDK:
- [Get the MAX SDK.](https://docs.modular.com/engine/get-started)
- [Get the Mojo SDK.](https://docs.modular.com/mojo/manual/get-started/)

## Vision and Roadmap
## Vision and roadmap

We have written down the principles that inform our decisions about what
features we work on and what bugs we prioritize. Before you consider making
Expand All @@ -22,28 +22,28 @@ guide our development efforts.
- Our [Roadmap](./docs/roadmap.md) identifies concrete development goals as we
work towards an even more robust and feature-rich standard library.

## Contributing to the Mojo Standard Library
## Contributing to the Mojo standard library

As a contributor, your efforts and expertise are invaluable in driving the
evolution of the Mojo Standard Library. The [Mojo Contributor
Guide](../CONTRIBUTING.md) provides all the information necessary to make
evolution of the Mojo standard library. The [Mojo contributor
guide](../CONTRIBUTING.md) provides all the information necessary to make
meaningful contributions—from understanding the submission process to
adhering to best practices:

- [Mojo Contributor Guide](../CONTRIBUTING.md)
- [Mojo contributor guide](../CONTRIBUTING.md)

## Getting Started
## Getting started

Follow our provided documentation to prepare your environment for building the
standard library, and then test your setup with our automated testing suite.
For additional information, the FAQ page is your go-to resource.

- [Mojo Standard Library Development](./docs/development.md)
- [Mojo standard library development](./docs/development.md)
- [FAQ](./docs/faq.md)

## Code of Conduct
## Code of conduct

[Code of Conduct](../CODE_OF_CONDUCT.md)
[Code of conduct](../CODE_OF_CONDUCT.md)

## License

Expand All @@ -55,5 +55,5 @@ See the license file in the repository for more details.

For any inquiries, bug reports, or feature requests, please [open an
issue](https://github.com/modularml/mojo/issues) on the GitHub repository. See
the [Mojo Contributor Guide](../CONTRIBUTING.md) for guidelines on filing good
the [Mojo contributor guide](../CONTRIBUTING.md) for guidelines on filing good
bugs.
Loading

0 comments on commit ff0bbfc

Please sign in to comment.