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

Organize docs directory #988

Merged
merged 5 commits into from
Feb 5, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
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
4 changes: 2 additions & 2 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
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,docker_deploy,docs,public,scripts,src,user_guide/docs}/**/*.{js,jsx,ts,tsx,json,md,yml}\"",
"fmt-frontend-check": "prettier --check \"./{.github,.vscode,certmgr,docker_deploy,docs,public,scripts,src,user_guide/docs}/**/*.{js,jsx,ts,tsx,json,md,yml}\"",
"fmt-frontend": "prettier --write \"./{.github,.vscode,certmgr,docker_deploy,docs,public,scripts,src,docs/user_guide/docs}/**/*.{js,jsx,ts,tsx,json,md,yml}\"",
"fmt-frontend-check": "prettier --check \"./{.github,.vscode,certmgr,docker_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