Skip to content

Commit

Permalink
Merge pull request #42 from riscv/dev/kbroch/sync-with-docs-spec-temp…
Browse files Browse the repository at this point in the history
…late

update to use doc build workflow in docs-spec-template
  • Loading branch information
kbroch-rivosinc authored Jun 13, 2024
2 parents dc8520f + 4d7f813 commit 90b89a9
Show file tree
Hide file tree
Showing 16 changed files with 196 additions and 235 deletions.
2 changes: 2 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# RISC-V Code of Conduct
All RISC-V International projects are governed by the RISC-V Code of Conduct found at https://riscv.org/community/community-code-of-conduct/.
58 changes: 58 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Contribution Guidelines

As an open-source project, we appreciate and encourage community members to submit patches directly to the project. To maintain a well-organized development environment, we have established standards and methods for submitting changes. This document outlines the process for submitting patches to the project, ensuring that your contribution is swiftly incorporated into the codebase.

# Licensing

Licensing is crucial for open-source projects, as it guarantees that the software remains available under the conditions specified by the author.

This project employs the Creative Commons Attribution 4.0 International license, which can be found in the LICENSE file within the project's repository.

Licensing defines the rights granted to you as an author by the copyright holder. It is essential for contributors to fully understand and accept these licensing rights. In some cases, the copyright holder may not be the contributor, such as when the contributor is working on behalf of a company.

# Developer Certificate of Origin (DCO)
To uphold licensing criteria and demonstrate good faith, this project mandates adherence to the Developer Certificate of Origin (DCO) process.

The DCO is an attestation appended to every contribution from each author. In the commit message of the contribution (explained in greater detail later in this document), the author adds a Signed-off-by statement, thereby accepting the DCO.

When an author submits a patch, they affirm that they possess the right to submit the patch under the designated license. The DCO agreement is displayed below and at https://developercertificate.org.


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.

# DCO Sign-Off Methods
The DCO necessitates the inclusion of a sign-off message in the following format for each commit within the pull request:

Signed-off-by: Stephano Cetola <[email protected]>

Please use your real name in the sign-off message.

You can manually add the DCO text to your commit body or include either -s or --signoff in your standard Git commit commands. If you forget to incorporate the sign-off, you can also amend a previous commit with the sign-off by executing git commit --amend -s. If you have already pushed your changes to GitHub, you will need to force push your branch afterward using git push -f.

Note:

Ensure that the name and email address associated with your GitHub account match the name and email address in the Signed-off-by line of your commit message.
8 changes: 8 additions & 0 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Governance
This project for the template specification is governed by the Documentation SIG.

The group can be joined by RISC-V members at: https://lists.riscv.org/g/sig-documentation.

Mailing list archives are available at: https://lists.riscv.org/g/sig-documentation/topics.

**_NOTE:_** PROJECTS BUILT USING THE TEMPLATE SHOULD UPDATE THE ABOVE TEXT AS-NEEDED.
5 changes: 5 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Maintainers

This project is maintained by the following people:

-
111 changes: 111 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
= RISC-V Documentation Developer Guide

This repo contains useful information for using AsciiDoc to write RISC-V specifications.

A simple template for beginning a RISC-V specification can be found here: https://github.com/riscv/docs-spec-template

== License

This work is licensed under a Creative Commons Attribution 4.0 International License (CC-BY-4.0). For details, see the link:LICENSE[LICENSE] file.

== Maintainers

The list of maintainers of this repo is maintained in the link:MAINTAINERS.md[MAINTAINERS] file.

== Contributors

The list of contributors to this document is maintained in the link:src/contributors.adoc[contributors] file.

For guidelines on how to contribute, refer to the link:CONTRIBUTING.md[CONTRIBUTING] file.

== Governance

The governance for this project is defined in the link:GOVERNANCE.md[GOVERNANCE] file.

Community information, including meeting (if held) and mailing lists are detailed in this file.

== Building the Document

=== Directory Structure

The following directories are used to organize the contents of this repo:

* `dependencies/`: software dependencies needed to build the specification
* `docs-resources/`: resources for all specifications sourced from link:.gitmodules[git submodule]
* `src/`: source files for the specification
* `build/`: default directory where the build artifacts are generated

=== Prerequisites

To build the document, you'll need the following tools installed on your system:

* Make
* asciiDoctor-pdf, asciidoctor-bibtex, asciidoctor-diagram, and asciidoctor-mathematical
* Docker

=== Cloning the Repository

```shell
git clone --recurse-submodules https://github.com/riscv/docs-spec-template.git
```

All in one single line:

```shell
git clone --recurse-submodules https://github.com/riscv/docs-spec-template.git && cd docs-spec-template && git submodule update --init --recursive

```

=== Building the Documentation

To start the build process, run:

```shell
cd ./docs-spec-template && make build
```

The link:Makefile[] script will check the availability of Docker on your system:

* If Docker is available, the documentation will be built inside a Docker container using the image riscvintl/riscv-docs-base-container-image:latest. This ensures a consistent build environment across different systems.
* If Docker is not available, the documentation will be built directly on your system using the installed tools.

The documentation is generated from the AsciiDoctor source files in your project. The primary source file is specified by the `HEADER_SOURCE` variable in the Makefile.

The build process utilizes several options, including theming and font settings, and generates a PDF document as output.

=== Cleaning up

To clean up the generated files, run:

```shell
make clean
```

== Enabling pre-commit checks locally

The repository has some basic commit checks set up with https://pre-commit.com/[pre-commit] that will be enforced by the GitHub CI.
To ensure these checks are also run in the local repository while making changes the following can be done:

.Installing pre-commit tool
[source,shell]
----
# Do once on your system
pip3 install pre-commit
----

.Installing pre-commit git hook in repo
[source,shell]
----
# Do once in local repo
pre-commit install
----

Rather than doing the above `pre-commit install` in every repo that uses it, you can do it https://pre-commit.com/#automatically-enabling-pre-commit-on-repositories[once on your system.]

When enabling additional checks https://pre-commit.com/#plugins[by editing .pre-commit-config.yaml], it is recommended running the newly added check on all files in the repository. This can be done with the following command:

.Running all pre-commit hooks on all files
[source,shell]
----
pre-commit run --all-files
----
90 changes: 0 additions & 90 deletions images/ethane.svg

This file was deleted.

Binary file removed images/litmus_sample.png
Binary file not shown.
77 changes: 0 additions & 77 deletions images/test-diagram.svg

This file was deleted.

1 change: 0 additions & 1 deletion images/z-type.svg

This file was deleted.

Loading

0 comments on commit 90b89a9

Please sign in to comment.