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

Fix up/update CONTRIBUTING #2201

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sauclovian-g
Copy link
Contributor

No description provided.

Add doc/internal/developer.md as a general spill area for things we
might put in CONTRIBUTING but that a new developer doesn't actually
need to see right away.

Also move the issue label documentation to its own file as it turns
out it's rather large (about a quarter of the total line count in
these files...)

This adds a bunch of stuff from our processes and practices
discussions last summer, but not really everything yet; there'll want
to be another go, and possibly another reorganization first.  We
should see how we feel about the way this is laid out in another
couple months.

Some things to specifically note:
   - I updated the repository layout summary; it was quite out of date;
   - Mention a bunch more tools you want if you're developing;
   - Mention what4-solvers;
   - Mention that on MacOS you need a real JDK and not the placeholder
     the system ships with;
   - Say not to do git submodule --init --recursive;
   - Link to a bunch of the open issues related to these topics.
@sauclovian-g sauclovian-g added type: enhancement Issues describing an improvement to an existing feature or capability documentation Issues involving documentation tooling: test infrastructure Issues involving test infrastructure or test execution, or making SAW more testable subsystem: saw-remote-api Issues related to the SAW server and its RPC bindings tooling: build system Issues involving SAW's build system tooling: CI Issues involving CI/CD scripts or processes tooling: release engineering Issues involving releases, release processes, or other release engineering concerns subsystem: saw-python Related to the Python bindings for the RPC SAW server labels Jan 28, 2025
Comment on lines +228 to +232
# Documentation

So far there is nothing that needs to be said here that isn't in
[../../CONTRIBUTING.md](CONTRIBUTING).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

N.b. If we merge this before #2202 (likely), I'll update this section with a link to the doc/README.

Comment on lines +35 to +37
Currently to build the manual you need `pandoc`.
This is expected to change as we migrate the manual to Sphinx.
See issue [#2197](https://github.com/GaloisInc/saw-script/issues/2197).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another comment mostly for my own benefit, so I remember to adjust this as we merge this and #2202.

Comment on lines +246 to +414
much easier for someone who is a writer, but doesn't really understand
what you're doing, to tidy up such text than to write the whole thing
from scratch.
If you would like help with writing, say so when you file a pull
request or ask out-of-band.

## Documentation Tools

The miscellaneous documentation files scattered around the tree
(e.g. all the various READMEs) are written in Markdown.
Markdown is more of a concept than a standard; the condition of
satisfaction for changes is that these files render acceptably
in GitHub's Markdown viewer.
Note that when reviewing a pull request you can open a file in that
viewer via the "..." menu in the top right corner of each file's
diffs; choose "View File" there.

The larger documents are currently written either in Markdown and
built with `pandoc`, or written in ReStructured Text and built with
Sphinx.
Updates should render correctly in the built version.
Ideally updates should also render correctly on GitHub, but this may
not always be feasible.
The various documentation builds are orchestrated with (GNU) make.

The source format for all of these tools is plain text.
This allows managing the documentation source files with git.

## Writing Documentation

There are several practices that we attempt to follow with
documentation sources.
These are intended to help restrict diffs to the text actually
changed, which make diffs smaller and easier to read, which in turn
makes changes easier to review (and easier to merge) and considerably
reduces development friction.

1. Don't generate long lines.
Have your text editor word-wrap at somewhere between 60 and 70 columns.

2. New sentence, new line.
When starting a new sentence, begin it on a new line.
Don't reflow whole paragraphs; reflow only single sentences.

3. Avoid making changes to lines you aren't actually making substantive
edits to.
Sometimes this means introducing an extra line break or two where
you otherwise might reflow.

4. Commit whitespace and formatting (source formatting/layout) changes
separately from content changes.
(Thus, if you end up with too many extra line breaks or the like,
such that things get ugly or unreadable, fix it up as a separate
commit.)
Document such changes in their commit messages to help reviewers
skip over them.

## Using Mergify
5. Embedded links can be long and not play nicely with word-wrap; if
one gets ugly, put it on its own line.

If you find that your editor is violating these principles for you
(e.g. refusing to let you have reasonable-length lines, or reflowing
text without being asked) and you can't figure out how to stop it, ask
for help.

A couple tips for writing effective Markdown:

- You need a blank line before the first entry of a list, and between
entries.
If you leave the initial blank line off, strange things happen.

- The whole of each list item should be indented past the bullet point.
This normally doesn't matter if you have a single paragraph, but if
you want multiple paragraphs or have other markup it can be important.

## Updating Prebuilt Copies

For some of the large documents (currently without much intentionality
or pattern) a prebuilt PDF file is included in the repository.
This is for the use of people browsing in their local checked-out
clones of the tree, or on GitHub, who may not want to (or be able to,
respectively) build the documentation themselves.
These copies should be updated whenever any of their sources change,
using the following procedure:

1. Commit all the sources.

2. When necessary (for changes that affect text that propagates via
the SAW executable, such as the doc strings for the SAW intrinsics),
rebuild SAW itself.

3. Rebuild the PDF.

4. Commit the updated PDF with a commit message along the lines of
"Regenerate the prebuilt manual".

This makes sure that all the ingredients are fully up to date and that
any and all metadata built into the PDF reflects the commit that
changed the text.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much for writing up this detailed section about documentation! I will be sure this gets appropriately updated (like earlier comments, likely as part of / after #2202).

Copy link
Member

@ChrisEPhifer ChrisEPhifer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I certainly think others should take a look at the content changed/added here, since it covers practices that we all ought to be aligned on, but I am personally on board with adopting these changes.

@sauclovian-g
Copy link
Contributor Author

I think we should land yours first, partly because this is vague on some of the stuff in there (because it hadn't appeared yet when I wrote it), plus there are a couple things they should align on (e.g. the eventual name of doc/internal) ... and there's not really any rush.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues involving documentation subsystem: saw-python Related to the Python bindings for the RPC SAW server subsystem: saw-remote-api Issues related to the SAW server and its RPC bindings tooling: build system Issues involving SAW's build system tooling: CI Issues involving CI/CD scripts or processes tooling: release engineering Issues involving releases, release processes, or other release engineering concerns tooling: test infrastructure Issues involving test infrastructure or test execution, or making SAW more testable type: enhancement Issues describing an improvement to an existing feature or capability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants