Skip to content

Commit eaa387a

Browse files
Update docs and examples (modular#1373)
Changes as of modular/max@f2279f7 Co-authored-by: modularbot <[email protected]>
1 parent 0a2fa32 commit eaa387a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+18107
-3772
lines changed

CODE_OF_CONDUCT.md

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Code of Conduct
2+
3+
In the interest of fostering an open and welcoming environment, we as
4+
contributors and maintainers pledge to make participation in our project and
5+
our community a harassment-free experience for everyone, regardless of age,
6+
body size, disability, ethnicity, gender identity and expression, level of
7+
experience, nationality, personal appearance, race, religion, or sexual
8+
identity and orientation.
9+
10+
## Our Standards
11+
12+
All community forums and spaces are meant for professional interactions that
13+
are friendly, inclusive, helpful, and collaborative. Examples of behavior that
14+
contributes to creating a positive environment include:
15+
16+
- Using welcoming and inclusive language.
17+
- Being respectful of differing viewpoints and experiences.
18+
- Gracefully accepting constructive criticism.
19+
- Focusing on what is best for the community.
20+
- Showing empathy towards other community members.
21+
22+
Any behavior that could reasonably be considered inappropriate in a
23+
professional setting is unacceptable. Examples of unacceptable behavior by
24+
participants include:
25+
26+
- The use of sexualized language or imagery and unwelcome sexual attention or
27+
advances.
28+
- Trolling, insulting/derogatory comments, and personal or political attacks.
29+
- Public or private harassment.
30+
- Publishing others' private information, such as a physical or electronic
31+
address, without explicit permission.
32+
- Conduct which could reasonably be considered inappropriate for the forum in
33+
which it occurs.
34+
35+
## Our Responsibilities
36+
37+
Project maintainers are responsible for clarifying the standards of acceptable
38+
behavior and are expected to take appropriate and fair corrective action in
39+
response to any instances of unacceptable behavior.
40+
41+
Project maintainers have the right and responsibility to remove, edit, or
42+
reject comments, commits, code, wiki edits, issues, and other contributions
43+
that are not aligned to this Code of Conduct, or to ban temporarily or
44+
permanently any contributor for other behaviors that they deem inappropriate,
45+
threatening, offensive, or harmful.
46+
47+
## Scope
48+
49+
This Code of Conduct applies to all project content and public spaces on the
50+
Mojo GitHub repo, the rest of Modular’s GitHub organization, and all other
51+
official Mojo community spaces and communication mediums, whether offline or
52+
online.
53+
54+
## Enforcement
55+
56+
Instances of abusive, harassment, or otherwise unacceptable behavior should be
57+
reported to the project team at <[email protected]>. All complaints will
58+
be reviewed and investigated and will result in a response that is deemed
59+
necessary and appropriate to the circumstances. The project team is obligated
60+
to maintain confidentiality with regard to the reporter of an incident. Further
61+
details of specific enforcement policies may be posted separately.
62+
63+
Project maintainers who do not follow or enforce the Code of Conduct in good
64+
faith may face temporary or permanent repercussions as determined by other
65+
members of the project's leadership.
66+
67+
## Attribution
68+
69+
This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
70+
available at <https://contributor-covenant.org/version/1/4>, and includes some
71+
aspects of the Geek Feminism Code of Conduct and the Drupal Code of Conduct.

CONTRIBUTING.md

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Mojo Contributor Guide
2+
3+
Welcome to the Mojo community! 🔥 We’re very excited that you’re interested in
4+
contributing to the project. To help you get started and ensure a smooth
5+
process, we’ve put together this contributor guide.
6+
7+
## 1. First-time checklist
8+
9+
Before you start your first pull request, please complete this checklist:
10+
11+
- Read this entire contributor guide.
12+
- Read the [Code of Conduct](CODE_OF_CONDUCT.md).
13+
14+
## 2. Evaluate and get buy-in on the change
15+
16+
We want to be sure that you spend your time efficiently and prepare changes
17+
that aren’t controversial and get stuck in long rounds of reviews.
18+
19+
If your change is any one of the following, please create a pull request and we
20+
will happily accept it as quickly as possible:
21+
22+
- Code improvement:
23+
- Bug fix
24+
- Performance improvement
25+
- Code readability improvement
26+
- Conformity to style improvement (TODO: publish code style guide)
27+
- Documentation improvement:
28+
- Typo fix
29+
- Markup/rendering fix
30+
- Factual information fix
31+
- New factual information for an existing page
32+
33+
Before embarking on any major change, please **create an issue** or **start a
34+
discussion**, so we can collaborate and agree on a solution.
35+
36+
For example, refactoring an entire code example or adding an entire new page to
37+
the documentation is a lot of work and it might conflict with other work that’s
38+
already in progress. We don’t want you to spend time on something that might
39+
require difficult reviews and rework, or that might get rejected.
40+
41+
## 3. Create a pull request
42+
43+
If your change is one of the improvements described above or it has been
44+
discussed and agreed upon by the project maintainers, please create a pull
45+
request into the `main` branch and include the following:
46+
47+
- A short commit message.
48+
49+
- A detailed commit description that includes rationalization for the change
50+
and/or explanation of the problem that it solves, with a link to any relevant
51+
GitHub issues.
52+
53+
- A `Signed-off-by` line, as per the [Developer Certificate of
54+
Origin](#signing-your-work).
55+
56+
**Note:** Documentation changes might not be visible on the website until the
57+
next Mojo release.
58+
59+
Thank you for your contributions! ❤️
60+
61+
### Signing your work
62+
63+
For each pull request, we require that you certify that you wrote the change or
64+
otherwise have the right to pass it on as an open-source patch by adding a line
65+
at the end of your commit description message in the form of:
66+
67+
`Signed-off-by: Jamie Smith <[email protected]>`
68+
69+
You must use your real name to contribute (no pseudonyms or anonymous
70+
contributions). If you set your `user.name` and `user.email` git configs, you
71+
can sign your commit automatically with `git commit -s`.
72+
73+
Doing so serves as a digital signature in agreement to the following Developer
74+
Certificate of Origin (DCO):
75+
76+
```text
77+
Developer Certificate of Origin
78+
Version 1.1
79+
80+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
81+
1 Letterman Drive
82+
Suite D4700
83+
San Francisco, CA, 94129
84+
85+
Everyone is permitted to copy and distribute verbatim copies of this
86+
license document, but changing it is not allowed.
87+
88+
Developer's Certificate of Origin 1.1
89+
90+
By making a contribution to this project, I certify that:
91+
92+
(a) The contribution was created in whole or in part by me and I
93+
have the right to submit it under the open source license
94+
indicated in the file; or
95+
96+
(b) The contribution is based upon previous work that, to the best
97+
of my knowledge, is covered under an appropriate open source
98+
license and I have the right under that license to submit that
99+
work with modifications, whether created in whole or in part
100+
by me, under the same open source license (unless I am
101+
permitted to submit under a different license), as indicated
102+
in the file; or
103+
104+
(c) The contribution was provided directly to me by some other
105+
person who certified (a), (b) or (c) and I have not modified
106+
it.
107+
108+
(d) I understand and agree that this project and the contribution
109+
are public and that a record of the contribution (including all
110+
personal information I submit with it, including my sign-off) is
111+
maintained indefinitely and may be redistributed consistent with
112+
this project or the open source license(s) involved.
113+
```

examples/LICENSE LICENSE

+3-47
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
==============================================================================================
2-
The Mojo examples repository is licensed under the Apache License v2.0 with LLVM Exceptions:
2+
The Mojo repository is licensed under the Apache License v2.0 with LLVM Exceptions:
33
==============================================================================================
44

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

207-
208207
---- LLVM Exceptions to the Apache 2.0 License ----
209208

210209
As an exception, if, as a result of your compiling your source code, portions
@@ -224,56 +223,13 @@ Software.
224223
==============================================================================
225224
Software from third parties included in the LLVM Project:
226225
==============================================================================
226+
227227
The LLVM Project contains third party software which is under different license
228228
terms. All such code will be identified clearly using at least one of two
229229
mechanisms:
230+
230231
1) It will be in a separate directory tree with its own `LICENSE.txt` or
231232
`LICENSE` file at the top containing the specific license and restrictions
232233
which apply to that software, or
233234
2) It will contain specific license and restriction terms at the top of every
234235
file.
235-
236-
==============================================================================
237-
Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy):
238-
==============================================================================
239-
University of Illinois/NCSA
240-
Open Source License
241-
242-
Copyright (c) 2003-2019 University of Illinois at Urbana-Champaign.
243-
All rights reserved.
244-
245-
Developed by:
246-
247-
LLVM Team
248-
249-
University of Illinois at Urbana-Champaign
250-
251-
http://llvm.org
252-
253-
Permission is hereby granted, free of charge, to any person obtaining a copy of
254-
this software and associated documentation files (the "Software"), to deal with
255-
the Software without restriction, including without limitation the rights to
256-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
257-
of the Software, and to permit persons to whom the Software is furnished to do
258-
so, subject to the following conditions:
259-
260-
* Redistributions of source code must retain the above copyright notice,
261-
this list of conditions and the following disclaimers.
262-
263-
* Redistributions in binary form must reproduce the above copyright notice,
264-
this list of conditions and the following disclaimers in the
265-
documentation and/or other materials provided with the distribution.
266-
267-
* Neither the names of the LLVM Team, University of Illinois at
268-
Urbana-Champaign, nor the names of its contributors may be used to
269-
endorse or promote products derived from this Software without specific
270-
prior written permission.
271-
272-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
273-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
274-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
275-
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
276-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
277-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
278-
SOFTWARE.
279-

docs/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Mojo documentation
2+
3+
This directory includes most of the documentation at
4+
[docs.modular.com/mojo](https://docs.modular.com/mojo).
5+
6+
The only things not here are the Jupyter notebooks, which are instead in the
7+
[`examples/notebooks/`](../examples/notebooks/) directory, the `mojo` CLI pages,
8+
and the Mojo Standard Library reference. The reference docs are generated from
9+
source files, which are currently not open-sourced.
10+
11+
## Contributing
12+
13+
If you see something in the docs that is wrong or could be improved, we'd love
14+
to accept your contributions.
15+
16+
Be aware that we don't provide tools to generate a preview of the website,
17+
because the Mojo docs are built along with other content that's not included in
18+
this repo. As such, we recommend you preview your edits in an IDE that can
19+
render markdown and Jupyter notebook files, such as VS Code, including the [VS
20+
Code environment in GitHub](https://github.dev/modularml/mojo/blob/main/).
21+
22+
For more information about how to contribute, see the [Contributor
23+
Guide](../CONTRIBUTING.md)

0 commit comments

Comments
 (0)