Skip to content

Commit

Permalink
Create a friendlier system of project documentation (nvaccess#15337)
Browse files Browse the repository at this point in the history
There are a few issues with the current project documentation:

The README is quite long, and focused largely on configuring the developer environment.
Instead, it should be a homepage for the various aspects of the project. Detailed information should be split into their own documents.
contributing.md is quite long and should be split similarly into the ways one can contribute to NVDA.
There is a lot of missing information in terms of how to get started with various ways of contributing.
Description of user facing changes
README.md is now split into

Community information
support / getting help
getting add-ons
Issue reporting
General community information
Contributing.md is now split into

testing
translating
Issue triage
Development
Design
add-on dev
add-on distribution
Guides have been updated or added when missing
  • Loading branch information
seanbudd authored Sep 3, 2023
1 parent 404e316 commit 59d59bb
Show file tree
Hide file tree
Showing 16 changed files with 541 additions and 400 deletions.
98 changes: 11 additions & 87 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,91 +1,15 @@
# Contributing to NVDA
There are several ways in which you can contribute to the NVDA project:
- By testing NVDA
- Issue triage and investigation
- Code or documentation contributions

## Testing

Testing alpha / beta / and release candidates help to ensure the quality of the NVDA.
User / community testing is particularly important for languages other than English.
There are several approaches you may take for this:
- Unfocused usage: Just use NVDA as you normally would, and try to complete everyday tasks.
- Recent change focused testing: By following the changes that are being made to NVDA and purposefully testing these changes and looking for edge-cases.
- Regression testing: Testing older features and behavior to look for unintended regressions in behavior that don't seem related to recent changes.

Forming a group can help you to get good coverage, brainstorm on what should be tested, and perhaps learn new ways to use NVDA.

## Issue triage and investigation:
You can also make non-code contributions by helping process incoming GitHub issues.
For information on this please see the [triage process](../projectDocs/issues/triage.md).

## Code/Docs contributions

If you are new to the project, or looking for some way to help take a look at:
- [label:"good first issue"](https://github.com/nvaccess/nvda/issues?q=label%3A%22good+first+issue%22)
- [label:component/documentation](https://github.com/nvaccess/nvda/issues?q=label%3Acomponent%2Fdocumentation)
- [label:closed/needs-new-author](https://github.com/nvaccess/nvda/issues?q=label%3Aclosed%2Fneeds-new-author)
- [label:Abandoned](https://github.com/nvaccess/nvda/issues?q=label%3AAbandoned)

### Guidelines:
- For anything other than minor bug fixes, please comment on an existing issue or create a new issue providing details about your proposed change.
- Unrelated changes should be addressed in separate issues.
- Include information about use cases, design, user experience, etc.
- This allows us to discuss these aspects and any other concerns that might arise, thus potentially avoiding a great deal of wasted time.
- It is recommended to wait for acceptance of your proposal before you start coding.
- A `triaged` label is an indicator that an issue is ready for a fix.
- Please understand that we very likely will not accept changes that are not discussed first.
- Consider starting a [GitHub discussion](https://github.com/nvaccess/nvda/discussions) or [mailing list topic](https://groups.io/g/nvda-devel/topics) to see if there is interest.
- A minor/trivial change which definitely wouldn't require design, user experience or implementation discussion, you can just create a pull request rather than using an issue first.
- e.g. a fix for a typo/obvious coding error or a simple synthesizer/braille display driver
- This should be fairly rare.
- If in doubt, use an issue first. Use this issue to discuss the alternatives you have considered in regards to implementation, design, and user experience. Then give people time to offer feedback.

Please note: the NVDA project has a [Citizen and Contributor Code of Conduct](./CODE_OF_CONDUCT.md).
NV Access expects that all contributors and other community members will read and abide by the rules set out in this document while participating or contributing to this project.

### GitHub process:
#### 1. "fork" the NVDA repository on GitHub
When you fork the repository, GitHub will create a copy of the master branch.
However, this branch will not be updated when the official master branch is updated.
To ensure your work is always based on the latest commit in the official master branch, it is recommended that your master branch be linked to the official master branch, rather than the master branch in your GitHub fork.
If you have cloned your GitHub fork, you can do this from the command line as follows:
```sh
# Add a remote for the NV Access repository.
git remote add nvaccess https://github.com/nvaccess/nvda.git
# Fetch the nvaccess branches.
git fetch nvaccess
# Switch to the local master branch.
git checkout master
# Set the local master to use the nvaccess master as its upstream.
git branch -u nvaccess/master
# Update the local master.
git pull
```
The NVDA project is guided by a [product vision statement and set of principles](./projectDocs/product_vision.md).
The vision and principles should be always considered when planning features and prioritizing work.

#### 2. Use a separate "topic" branch for each contribution
All code should usually be based on the latest commit in the official master branch at the time you start the work unless the code is entirely dependent on the code for another issue.
If you are adding a feature or changing something that will be noticeable to the user, you should update the User Guide accordingly.

#### 3. Run unit tests and lint check
- Run `rununittests` (`rununittests.bat`) before you open your Pull Request, and make sure all the unit tests pass.
- If possible for your PR, please consider creating a set of unit tests to test your changes.
- The lint check ensures your changes comply with our code style expectations. Use `runlint nvaccess/master` (`runlint.bat`)

#### 4. Create a Pull Request (PR)
When you think a contribution is ready, or you would like feedback, open a draft pull request.
Please fill out the Pull Request Template, including the checklist of considerations.
The checklist asks you to confirm that you have thought about each of the items, if any of the items are missing it is helpful to explain elsewhere in the PR why it has been left out.
When you would like a review, mark the PR as "ready for review".

#### 5. Participate in the code review process
This process requires core NVDA developers to understand the intent of the change, read the code changes, asking questions or suggesting changes.
Please participate in this process, answering questions, and discussing the changes.
Being proactive will really help to speed up the process of code review.
When the PR is approved it will be merged, and the change will be active in the next alpha build.

#### 6. Feedback from alpha users
After a PR is merged, watch for feedback from alpha users / testers.
You may have to follow up to address bugs or missed use-cases.

## Code Style

Refer to [our coding standards document](../projectDocs/dev/codingStandards.md)
There are several ways in which you can contribute to the NVDA project:
- [Reporting issues](../projectDocs/issues/readme.md)
- [Issue triage and investigation](../projectDocs/issues/triage.md)
- [Testing](../projectDocs/testing/contributing.md)
- [Translating NVDA](https://github.com/nvaccess/nvda/wiki/Translating)
- [Code or documentation contributions](../projectDocs/dev/contributing.md)
- [Creating add-ons](../projectDocs/dev/addons.md)
32 changes: 31 additions & 1 deletion nvdaHelper/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,36 @@ You should still build on the command line to verify errors.
- includes directories beginning with `/I`
- Additional options like `/std:c++20`

### Compiling NVDAHelper with Debugging Options
Among other things, preparing the source tree builds the NVDAHelper libraries.
If trying to debug nvdaHelper, you can control various debugging options by building with the `nvdaHelperDebugFlags` and `nvdaHelperLogLevel` command line variables.

The `nvdaHelperLogLevel` variable specifies the level of logging (0-59) you wish to see, lower is more verbose. The default is 15.

The `nvdaHelperDebugFlags` variable takes one or more of the following flags:

* debugCRT: the libraries will be linked against the debug C runtime and assertions will be enabled. (By default, the normal CRT is used and assertions are disabled.)
* RTC: runtime checks (stack corruption, uninitialized variables, etc.) will be enabled. (The default is no runtime checks.)
* analyze: runs MSVC code analysis on all nvdaHelper code, halting on any warning. (default is no analysis).

The special keywords none and all can also be used in place of the individual flags.

An example follows that enables debug CRT and runtime checks

```cmd
scons source nvdaHelperDebugFlags=debugCRT,RTC
```

Symbol pdb files are always produced when building, regardless of the debug flags.
However, they are not included in the NVDA distribution.
Instead, `scons symbolsArchive` will package them as a separate archive.

By default, builds also do not use any compiler optimizations.
Please see the `release` keyword argument for what compiler optimizations it will enable.

### Building nvdaHelper developer documentation
[Refer to this section](../projectDocs/dev/buildingDevDocumentation.md#building-nvdahelper-developer-documentation)

### Virtual Buffer Backends

This code runs within the target applications process, it is responsible for building the virtual buffer.
Expand Down Expand Up @@ -138,4 +168,4 @@ This code is responsible for interacting with the IA2 accessibility API, these c
#### Build notes
IDL/ACF files are input to MSRPCStubs to generate headers in `build/<arch>`
- See `MSRPCStubs` in `*scons*` files.
- Note these set a prefix, making whole word searches for methods difficult.
- Note these set a prefix, making whole word searches for methods difficult.
36 changes: 36 additions & 0 deletions projectDocs/community/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Get support
Whether you are a beginner, an advanced user, a new or a long time developer; or if you represent an organization wishing to know more or to contribute to NVDA: you can get support through the included documentation as well as several communication channels dedicated to the NVDA screen reader. Here is an overview of the most important support sources.

### Important links
* You can find information on user support on the [NV Access website](https://www.nvaccess.org/get-help/).
* [Reporting issues on GitHub](../issues/readme.md)
* [NVDA on GitHub](https://github.com/nvaccess/nvda)
* [Contributing to NVDA](../../.github/CONTRIBUTING.md).
This includes information on reporting issues, triaging issues, testing, translating, contributing code/documentation and creating add-ons.
* The NVDA repository [Wiki](https://github.com/nvaccess/nvda/wiki) contains more guides and documentation.
* [NVDA development snapshots](https://www.nvaccess.org/files/nvda/snapshots/): Automatically generated builds of the project in its current state of development
* [Translating NVDA](https://github.com/nvaccess/nvda/wiki/Translating): Information about how to translate NVDA into another language

### Documentation
* [NVDA User Guide](https://www.nvaccess.org/files/nvda/documentation/userGuide.html)
* [NVDA Developer Guide](https://www.nvaccess.org/files/nvda/documentation/developerGuide.html)
* [Key Commands](https://www.nvaccess.org/files/nvda/documentation/keyCommands.html)
* [Changes in the latest release](https://www.nvaccess.org/files/nvda/documentation/changes.html)

### Add-ons
* [The NVDA Add-on store](https://www.nvaccess.org/files/nvda/documentation/userGuide.html#AddonsManager)
* [Community add-ons website](https://addons.nvda-project.org/).
This website is considered legacy software, using the NVDA Add-on Store instead is encouraged.

### Communication channels
#### NV Access
* See the [NV Access](https://www.nvaccess.org/contact-us/) website for our social media accounts and other contact information.
* [NVDA Add-on API Mailing List](https://groups.google.com/a/nvaccess.org/g/nvda-api)

#### NVDA Community
* [NVDA Users Mailing List](https://nvda.groups.io/g/nvda)
* [NVDA Developers Mailing List](https://groups.io/g/nvda-devel)
* [NVDA Translators list](https://groups.io/g/nvda-translations)
* [NVDA Add-ons Mailing List](https://groups.io/g/nvda-addons)
* [NVDA Community Gitter channel](https://gitter.im/nvaccess/NVDA) (Instant Messaging)
* [Other sources including groups and profiles on social media channels, language-specific websites and mailing lists etc.](https://github.com/nvaccess/nvda/wiki/Connect)
32 changes: 32 additions & 0 deletions projectDocs/dev/addons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
### Important links
* [Changes in the latest release](https://www.nvaccess.org/files/nvda/documentation/changes.html)
* [NVDA Add-on API Mailing List](https://groups.google.com/a/nvaccess.org/g/nvda-api)
* [The NVDA Add-on Store](https://www.nvaccess.org/files/nvda/documentation/userGuide.html#AddonsManager)
* [Submitting to the NVDA Add-on Store](https://github.com/nvaccess/addon-datastore/blob/master/docs/submitters/submissionGuide.md)
* [Community add-ons website](https://addons.nvda-project.org/).
This website is considered legacy software, using the NVDA Add-on Store instead is encouraged.
* [NVDA add-ons community coordination and support center](https://github.com/nvdaaddons): all about NVDA's add-ons environment
* [NVDA add-ons community template](https://github.com/nvdaaddons/AddonTemplate): A repository for generating add-ons using a template
* The NVDA repository [Wiki](https://github.com/nvaccess/nvda/wiki) contains more guides and documentation.

### Documentation
* [NVDA Developer Guide](https://www.nvaccess.org/files/nvda/documentation/developerGuide.html)
* [Technical design overview](../design/technicalDesignOverview.md)
* [NVDA Add-on Development Community Guide](https://github.com/nvdaaddons/DevGuide/wiki/NVDA-Add-on-Development-Guide)
* [NVDA ControllerClient manual (NVDA API for external applications to directly speak or braille messages, etc.)](../../extras/controllerClient)

### Communication channels
#### NV Access
* [GitHub discussions](https://github.com/nvaccess/nvda/discussions)
* [NVDA Add-on API Mailing List](https://groups.google.com/a/nvaccess.org/g/nvda-api)

#### NVDA Community
* [NVDA Developers Mailing List](https://groups.io/g/nvda-devel)
* [NVDA Add-ons Mailing List](https://groups.io/g/nvda-addons)
* [NVDA Community Gitter channel](https://gitter.im/nvaccess/NVDA) (Instant Messaging)
* [Other sources including groups and profiles on social media channels, language-specific websites and mailing lists etc.](https://github.com/nvaccess/nvda/wiki/Connect)

## NVDA project links
* [NVDA on GitHub](https://github.com/nvaccess/nvda)
* [Reporting issues on GitHub](../issues/readme.md)
* [NVDA development snapshots](https://www.nvaccess.org/files/nvda/snapshots/): Automatically generated builds of the project in its current state of development
30 changes: 30 additions & 0 deletions projectDocs/dev/buildingDevDocumentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Before building developer documentation, [create your developer environment](./createDevEnvironment.md).

### Building developer documentation

To generate the NVDA developer guide, type:

```cmd
scons developerGuide
```

The developer guide will be placed in the `devDocs` folder in the output directory.

To generate the HTML-based source code documentation, type:

```cmd
scons devDocs
```

The documentation will be placed in the `NVDA` folder in the output directory.

### Building nvdaHelper developer documentation

To generate developer documentation for nvdaHelper (not included in the devDocs target):

```
scons devDocs_nvdaHelper
```

The documentation will be placed in the folder `<projectRoot>\output\devDocs\nvdaHelper`.
This requires having Doxygen installed.
90 changes: 90 additions & 0 deletions projectDocs/dev/buildingNVDA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
Before building NVDA, [create your developer environment](./createDevEnvironment.md).

## Preparing the Source Tree
Before you can run the NVDA source code, you must prepare the source tree.
You do this by opening a command prompt, changing to the root of the NVDA source distribution and typing:

```cmd
scons source
```

You should do this again whenever the version of comtypes changes or language files are added or changed.
Note that if you want to access user documentation from the help menu while running the source version, you will also need to add `user_docs` to the command line like so:

```cmd
scons source user_docs
```

While simply testing or committing changes, it may be faster usually just doing `scons source` as user documentation will change each time the revision number changes.

## Running the Source Code
It is possible to run NVDA directly from source without having to build the full binary package and launcher.
To launch NVDA from source, using `cmd.exe`, execute `runnvda.bat` in the root of the repository.

To view help on the arguments that NVDA will accept, use the `-h` or `--help` option.
These arguments are also documented in the [user guide](https://www.nvaccess.org/files/nvda/documentation/userGuide.html#CommandLineOptions).

## Building NVDA
A binary build of NVDA can be run on a system without Python and all of NVDA's other dependencies installed (as we do for snapshots and releases).

Binary archives and bundles can be created using scons from the root of the NVDA source distribution. To build any of the following, open a command prompt and change to that directory.

To make a non-archived binary build (equivalent to an extracted portable archive), type:

```cmd
scons dist
```

The build will be created in the dist directory.

### Building the installer

To create a launcher archive (one executable allowing for installation or portable dist generation), type:

```cmd
scons launcher
```

The archive will be placed in the output directory.

### Building developer documentation
Refer to [building developer documentation](./buildingDevDocumentation.md).

### Generate debug symbols archive
To generate an archive of debug symbols for the various dll/exe binaries, type:

```cmd
scons symbolsArchive
```

The archive will be placed in the output directory.

### Generate translation template
To generate a gettext translation template (for translators), type:

```cmd
scons pot
```

### Customising the build
Optionally, the build can be customised by providing variables on the command line.
This is useful when [creating a self signed build](./selfSignedBuild.md).

* version: The version of this build.
* release: Whether this is a release version.
* This enables various C++ compiler optimizations such as /O2 and whole-program optimization.
* It also instructs Python to generate optimized byte code.
* publisher: The publisher of this build.
* certFile: The certificate file with which to sign executables. The certificate must be in pfx format and contain the private key.
* certPassword: The password for the private key in the signing certificate. If omitted, no password will be assumed.
* certTimestampServer: The URL of the timestamping server to use to timestamp authenticode signatures. If omitted, signatures will not be timestamped.
* outputDir: The directory where the final built archives and such will be placed.
* targetArchitectures: The target architectures that NVDA should support. Possible values are all, x86 and x86_64. This should generally be left as the default.

For example, to build a launcher with a specific version, you might type:

```cmd
scons launcher version=test1
```

For more see the [sconstruct file](../../sconstruct).
Loading

0 comments on commit 59d59bb

Please sign in to comment.