Skip to content

Commit

Permalink
Update docs and examples (modular#1373)
Browse files Browse the repository at this point in the history
Changes as of modular/mojo@f2279f7

Co-authored-by: modularbot <[email protected]>
  • Loading branch information
scottamain and modularbot authored Dec 4, 2023
1 parent 0a2fa32 commit eaa387a
Show file tree
Hide file tree
Showing 54 changed files with 18,107 additions and 3,772 deletions.
71 changes: 71 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 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
our community a harassment-free experience for everyone, regardless of age,
body size, disability, ethnicity, gender identity and expression, level of
experience, nationality, personal appearance, race, religion, or sexual
identity and orientation.

## Our Standards

All community forums and spaces are meant for professional interactions that
are friendly, inclusive, helpful, and collaborative. Examples of behavior that
contributes to creating a positive environment include:

- Using welcoming and inclusive language.
- Being respectful of differing viewpoints and experiences.
- Gracefully accepting constructive criticism.
- Focusing on what is best for the community.
- Showing empathy towards other community members.

Any behavior that could reasonably be considered inappropriate in a
professional setting is unacceptable. Examples of unacceptable behavior by
participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances.
- Trolling, insulting/derogatory comments, and personal or political attacks.
- Public or private harassment.
- Publishing others' private information, such as a physical or electronic
address, without explicit permission.
- Conduct which could reasonably be considered inappropriate for the forum in
which it occurs.

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies to all project content and public spaces on the
Mojo GitHub repo, the rest of Modular’s GitHub organization, and all other
official Mojo community spaces and communication mediums, whether offline or
online.

## Enforcement

Instances of abusive, harassment, or otherwise unacceptable behavior should be
reported to the project team at <[email protected]>. All complaints will
be reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances. The project team is obligated
to maintain confidentiality with regard to the reporter of an incident. Further
details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
available at <https://contributor-covenant.org/version/1/4>, and includes some
aspects of the Geek Feminism Code of Conduct and the Drupal Code of Conduct.
113 changes: 113 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# 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
process, we’ve put together this contributor guide.

## 1. 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

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.

If your change is any one of the following, please create a pull request and we
will happily accept it as quickly as possible:

- Code improvement:
- Bug fix
- Performance improvement
- Code readability improvement
- Conformity to style improvement (TODO: publish code style guide)
- Documentation improvement:
- Typo fix
- Markup/rendering fix
- Factual information fix
- New factual information for an existing page

Before embarking on any major change, please **create an issue** or **start a
discussion**, so we can collaborate and agree on a solution.

For example, refactoring an entire code example or adding an entire new page to
the documentation is a lot of work and it might conflict with other work that’s
already in progress. We don’t want you to spend time on something that might
require difficult reviews and rework, or that might get rejected.

## 3. 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 `main` branch and include the following:

- A short commit message.

- A detailed commit description that includes rationalization for the change
and/or explanation of the problem that it solves, with a link to any relevant
GitHub issues.

- A `Signed-off-by` line, as per the [Developer Certificate of
Origin](#signing-your-work).

**Note:** Documentation changes might not be visible on the website until the
next Mojo release.

Thank you for your contributions! ❤️

### Signing your work

For each pull request, we require that you certify that you wrote the change or
otherwise have the right to pass it on as an open-source patch by adding a line
at the end of your commit description message in the form of:

`Signed-off-by: Jamie Smith <[email protected]>`

You must use your real name to contribute (no pseudonyms or anonymous
contributions). If you set your `user.name` and `user.email` git configs, you
can sign your commit automatically with `git commit -s`.

Doing so serves as a digital signature in agreement to the following Developer
Certificate of Origin (DCO):

```text
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```
50 changes: 3 additions & 47 deletions examples/LICENSE → LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
==============================================================================================
The Mojo examples repository is licensed under the Apache License v2.0 with LLVM Exceptions:
The Mojo repository is licensed under the Apache License v2.0 with LLVM Exceptions:
==============================================================================================

Apache License
Expand Down Expand Up @@ -204,7 +204,6 @@ The Mojo examples repository is licensed under the Apache License v2.0 with LLVM
See the License for the specific language governing permissions and
limitations under the License.


---- LLVM Exceptions to the Apache 2.0 License ----

As an exception, if, as a result of your compiling your source code, portions
Expand All @@ -224,56 +223,13 @@ Software.
==============================================================================
Software from third parties included in the LLVM Project:
==============================================================================

The LLVM Project contains third party software which is under different license
terms. All such code will be identified clearly using at least one of two
mechanisms:

1) It will be in a separate directory tree with its own `LICENSE.txt` or
`LICENSE` file at the top containing the specific license and restrictions
which apply to that software, or
2) It will contain specific license and restriction terms at the top of every
file.

==============================================================================
Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy):
==============================================================================
University of Illinois/NCSA
Open Source License

Copyright (c) 2003-2019 University of Illinois at Urbana-Champaign.
All rights reserved.

Developed by:

LLVM Team

University of Illinois at Urbana-Champaign

http://llvm.org

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal with
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimers.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimers in the
documentation and/or other materials provided with the distribution.

* Neither the names of the LLVM Team, University of Illinois at
Urbana-Champaign, nor the names of its contributors may be used to
endorse or promote products derived from this Software without specific
prior written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
SOFTWARE.

23 changes: 23 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Mojo documentation

This directory includes most of the documentation at
[docs.modular.com/mojo](https://docs.modular.com/mojo).

The only things not here are the Jupyter notebooks, which are instead in the
[`examples/notebooks/`](../examples/notebooks/) directory, the `mojo` CLI pages,
and the Mojo Standard Library reference. The reference docs are generated from
source files, which are currently not open-sourced.

## Contributing

If you see something in the docs that is wrong or could be improved, we'd love
to accept your contributions.

Be aware that we don't provide tools to generate a preview of the website,
because the Mojo docs are built along with other content that's not included in
this repo. As such, we recommend you preview your edits in an IDE that can
render markdown and Jupyter notebook files, such as VS Code, including the [VS
Code environment in GitHub](https://github.dev/modularml/mojo/blob/main/).

For more information about how to contribute, see the [Contributor
Guide](../CONTRIBUTING.md)
Loading

0 comments on commit eaa387a

Please sign in to comment.