Skip to content

Commit

Permalink
Organize docs directory (#988)
Browse files Browse the repository at this point in the history
* Organize docs directory

* Migrate user_guide into docs folder
  • Loading branch information
johnthagen authored Feb 5, 2021
1 parent 88d4572 commit 68f6c5e
Show file tree
Hide file tree
Showing 36 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
!nginx
!public
!src
!user_guide
!docs/user_guide
!.env
!dev-requirements.txt
!package*.json
!tsconfig.json
!tox.ini

# Ignore user guide build directory.
user_guide/site
docs/user_guide/site
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Backend.Tests/bin/Avatars/*
mongo_database

# User Guide
user_guide/site
docs/user_guide/site

# Vagrant instances
.vagrant/
Expand Down
8 changes: 4 additions & 4 deletions Backend/Services/WordApiServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public async Task<List<Word>> Merge(string projectId, MergeWords mergeWords)
addParent.History = new List<string>();
addParent.Audio = new List<string>();

// Generate new child words form child word field
// Generate new child words from ChildrenWords.
foreach (var newChildWordState in mergeWords.ChildrenWords)
{
// Get child word
Expand All @@ -145,16 +145,16 @@ public async Task<List<Word>> Merge(string projectId, MergeWords mergeWords)
throw new KeyNotFoundException($"Unable to locate word: ${newChildWordState.SrcWordId}");
}

// Copy over audio if child doesn't have own surviving entry
// Copy over audio if child doesn't have own surviving entry.
if (!newChildWordState.SenseStates.Exists(x => x == State.Separate))
{
addParent.Audio.AddRange(currentChildWord.Audio);
}

// Remove child from frontier
// Remove child from frontier.
await _repo.DeleteFrontier(projectId, currentChildWord.Id);

// Iterate through senses of that word and change to corresponding state in mergewords
// Iterate through senses of that word and change to corresponding state in mergewords.
if (currentChildWord.Senses.Count != newChildWordState.SenseStates.Count)
{
throw new FormatException("Sense counts don't match");
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN pip install --upgrade pip && \
pip install tox

COPY dev-requirements.txt tox.ini ./
COPY user_guide user_guide
COPY docs/user_guide docs/user_guide

RUN tox -e user-guide

Expand Down Expand Up @@ -41,7 +41,7 @@ RUN mkdir ${FRONTEND_HOST_DIR}/nuc
RUN mkdir ${FRONTEND_HOST_DIR}/url_moved

# Setup web content
COPY --from=user_guide_builder /app/user_guide/site ${USER_GUIDE_HOST_DIR}
COPY --from=user_guide_builder /app/docs/user_guide/site ${USER_GUIDE_HOST_DIR}
COPY --from=frontend_builder /app/build ${FRONTEND_HOST_DIR}
COPY nginx/pages/nuc_home.html ${FRONTEND_HOST_DIR}/nuc/index.html
COPY nginx/pages/url_moved_home.html /etc/nginx/page_templates/url_moved_home.html
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ A rapid word collection tool.

6. Run `npm start` from the project directory to install dependencies and start the project.

7. Consult our [C#](docs/c_sharp_style_guide.md) and [JavaScript/TypeScript](docs/ts_style_guide.md) style guides for
best coding practices in this project.
7. Consult our [C#](docs/style_guide/c_sharp_style_guide.md) and [TypeScript](docs/style_guide/ts_style_guide.md)
style guides for best coding practices in this project.

[chocolatey]: https://chocolatey.org/

Expand Down Expand Up @@ -391,7 +391,7 @@ To build the user guide and serve it dynamically (automatically reloading on cha
(venv) $ tox -e user-guide-serve
```

To build the user guide statically into `user-guide/site`:
To build the user guide statically into `docs/user-guide/site`:

```bash
(venv) $ tox -e user-guide
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"eject": "react-scripts eject",
"fmt-backend": "dotnet-format",
"fmt-backend-check": "dotnet-format --check",
"fmt-frontend": "prettier --write \"./{.github,.vscode,certmgr,deploy,docs,public,scripts,src,user_guide/docs}/**/*.{js,jsx,ts,tsx,json,md,yml}\"",
"fmt-frontend-check": "prettier --check \"./{.github,.vscode,certmgr,deploy,docs,public,scripts,src,user_guide/docs}/**/*.{js,jsx,ts,tsx,json,md,yml}\"",
"fmt-frontend": "prettier --write \"./{.github,.vscode,certmgr,deploy,docs,public,scripts,src,docs/user_guide/docs}/**/*.{js,jsx,ts,tsx,json,md,yml}\"",
"fmt-frontend-check": "prettier --check \"./{.github,.vscode,certmgr,deploy,docs,public,scripts,src,docs/user_guide/docs}/**/*.{js,jsx,ts,tsx,json,md,yml}\"",
"frontend": "react-scripts start",
"gen-backend-coverage-report": "tsc scripts/genBackendCoverageReport.ts && node scripts/genBackendCoverageReport.js",
"import-sem-doms": "tsc scripts/importSemanticDomains.ts && node scripts/importSemanticDomains.js",
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ commands =
[testenv:user-guide]
deps =
-r{toxinidir}/dev-requirements.txt
changedir = {toxinidir}/user_guide
changedir = {toxinidir}/docs/user_guide
commands =
mkdocs build

[testenv:user-guide-serve]
deps =
-r{toxinidir}/dev-requirements.txt
changedir = {toxinidir}/user_guide
changedir = {toxinidir}/docs/user_guide
commands =
mkdocs serve

0 comments on commit 68f6c5e

Please sign in to comment.