Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
# Created by https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks
# Edit at https://www.toptal.com/developers/gitignore?templates=python,jupyternotebooks

### Mac OS ###
*.DS_Store

### JupyterNotebooks ###
# gitignore template for Jupyter Notebooks
# website: http://jupyter.org/
Expand Down
3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"lextudio.restructuredtext",
"lextudio.restructuredtext-pack",
"trond-snekvik.simple-rst",
"ms-python.python",
"swyddfa.esbonio"
"ms-python.python"
]
}
60 changes: 55 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,63 @@
*FIRST* Tech Challenge Documentation Project
==========================================

![Build](https://readthedocs.com/projects/first-tech-challenge-ftcdocs/badge/?version=latest) ![Link-Check](https://github.com/FIRST-Tech-Challenge/ftcdocs/actions/workflows/link-check.yaml/badge.svg)

This GitHub project is a work-in-progress for FTC documentation.

The website is available at https://ftc-docs.firstinspires.org

# Contributing

We are always looking for help improving FTC Docs. For more infomration on contributing
consult the [contributing section](https://ftc-docs.firstinspires.org/contrib/index.html) in FTC Docs.
## Prerequisites

- GitHub Account
- Git Installed on Local Machine (for local method)

### Windows software dependencies (typically preinstalled on a Linux distro)

- GitForWindows: https://gitforwindows.org/
- Chocolatey for installing make: https://chocolatey.org/install#individual
- make: https://community.chocolatey.org/packages/make

## Local Method

1. Create fork of FtcDocs Project as shown [here](https://docs.github.com/en/get-started/quickstart/fork-a-repo) keeping the name of the repo the same
2. Clone fork of project replacing `<NAME>` with your username

`git clone https://github.com/<NAME>/ftcdocs.git`
3. Install Python from [here](https://www.python.org/downloads/)
4. Install Pip following [these](https://pip.pypa.io/en/stable/installation/) instructions
5. Change directory to root project and install dependencies
- `cd ftcdocs`
- `pip install -r docs/requirements.txt`
6. Make desired changes to project. Remember to follow style guide shown [here](https://docs.wpilib.org/en/stable/docs/contributing/frc-docs/style-guide.html)
7. Install dependencies for PDF
- Ubuntu/Debian: `xargs -a dependencies sudo apt install -y`
- Windows: Install MiKTeX from [here](https://miktex.org/download)
8. Build project by executing following commands in `docs\` folder of project
- HTML: `make html`
- Autobuild HTML: `make autobuild`
- PDF: `make latexpdf`
- Link: `make linkcheck`
9. View Result (html)
- Open `docs\build\html\index.html` in a browser of your choice
- To create local http server execute `python3 -m http.server 7350` in `docs\build\html\index.html` and view result [here](http://localhost:7350). If you are using the Autobuild option this server will be automatically created and updated with most changes to rst files. Some changes will not be transferred like images and will require a `make clean`.
10. Commit changes and push after desired result has been achieved
- `git commit -a -m <MESSAGE>` replace <MESSAGE> with your commit message
- `git push`
11. [Create](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) a Pull Request to upstream repository. Make sure to be concise in your PR title and description.

## Cloud Method


1. Create fork of FtcDocs Project as shown [here](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
2. Ideally you should follow a feature based branch system. This means that you should create a new branch every time you are thinking of adding a new feature. This will insure that the main branch stays identical to upstream.
1. Click the drop down menu that says the branch you are currently working on (default is main) towards the top but slightly to the left
2. Type in what you wish to name your branch. It should be short and concise while also being able to convey to others what feature this branch has
3. Next click `Create branch: [name of branch] from ‘main’`
3. Although you can view changes made in the Github preview this can be incorrect and is often incomplete. To give an accurate view of what your changes look like you will want to make your own Read The Docs site to preview your changes. To do this follow the instructions given [here](https://docs.readthedocs.io/en/stable/tutorial/index.html) forgoing the "Preparing your project on GitHub" and not going beyond "Checking the first build". Name your site `<USERNAME>-ftcdocs`
4. To change the branch that RTD builds on do the following
1. Go to `https://readthedocs.org/dashboard/<USERNAME>-ftcdocs/advanced/` after replacing `<USERNAME>` with your username
2. Click your user in the top right corner
3. Change Default branch to the branch you want to build off of
![demo](https://media.discordapp.net/attachments/836704905364373547/992042745952751626/unknown.png)
5. Make desired changes to forked project via Github Web Editor. This is as simple as clicking edit icon after viewing any given file. Remember to follow style guide shown [here](https://docs.wpilib.org/en/stable/docs/contributing/frc-docs/style-guide.html)
6. View Changes on created RTD site by visiting `https://<USERNAME>-ftcdocs.readthedocs.io/en/latest/` after replacing `<USERNAME>` with your username
2 changes: 2 additions & 0 deletions dependencies
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
texlive-xetex
latexmk
jq
unzip
fonts-roboto
3 changes: 1 addition & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ git+https://github.com/FIRST-Tech-Challenge/ftcdocs-helper@main#subdirectory=coo
sphinx-sitemap==2.3.0
python-git-info==0.8.3
sphinxcontrib-mermaid==0.9.2
sphinx-hoverxref==1.3.0
sphinxext-rediraffe==0.2.7
git+https://github.com/FIRST-Tech-Challenge/ftcdocs-helper@main#subdirectory=linkcheckdiff
git+https://github.com/FIRST-Tech-Challenge/ftcdocs-helper@main#subdirectory=linkcheckdiff
6 changes: 0 additions & 6 deletions docs/source/common/mission.rst

This file was deleted.

13 changes: 4 additions & 9 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
author = 'FIRST Tech Challenge'
license = 'BSD 3-Clause'

release = '0.3'
version = '0.3.0'
release = '0.2'
version = '0.2.0'
# -- General configuration

extensions = [
Expand All @@ -29,15 +29,10 @@
'sphinxcontrib.googleanalytics',
'sphinxcontrib.cookiebanner',
'sphinxcontrib.mermaid',
'hoverxref.extension',
"sphinxext.rediraffe",
"ftcdocs_linkcheckdiff",
]

# Options for HoverXRef extension

hoverxref_roles = ['term']

autosectionlabel_prefix_document = True
default_dark_mode = False
todo_include_todos = False
Expand Down Expand Up @@ -289,7 +284,6 @@
# GitHub links with Javascript Anchors cannot be detected by linkcheck
# Solidworks returns 403 errors on too many web pages. Thanks, buddy.
# As of 7/13/23, april.eecs.umich.edu has an expired certificate

linkcheck_ignore = [
r'https://my.firstinspires.org/Dashboard/',
"https://ftc-ml.firstinspires.org",
Expand All @@ -316,7 +310,7 @@
if(os.environ.get("BOOKLETS_BUILD") == "true"):
print('Building booklets')
latex_documents = [
('contrib/index', "contrib.tex", "Contributing to FTC Docs", author, "manual"), # Contributing
('ftc_ml/index', "ftc_ml.tex", "FTC Machine Learning", author, "manual"), # FTC ML
('programming_resources/index', "prgrm_res.tex", "FTC Programming Resources", author, "manual"), # Programming Resources
('programming_resources/android_studio_java/Android-Studio-Tutorial', 'android_studios.tex', 'Android Studio Guide', author, "manual"), # Android Studio
('programming_resources/onbot_java/OnBot-Java-Tutorial', "onbot_java.tex", 'OnBot Java Guide', author, "manual"), # OnBot Java
Expand All @@ -329,6 +323,7 @@
('manufacturing/3d_printing/index', '3d_printing.tex', '3D Printing Guide', author, "manual"), # 3D Printing
('hardware_and_software_configuration/configuring/managing_esd/managing-esd', 'esd.tex', 'Managing Electrostatic Discharge', author, "manual"), # ESD
]


def setup(app):
app.add_css_file("css/ftc-rtd.css")
Expand Down
51 changes: 0 additions & 51 deletions docs/source/contrib/guidelines/guidelines.rst

This file was deleted.

33 changes: 0 additions & 33 deletions docs/source/contrib/index.rst

This file was deleted.

Loading
Loading