Skip to content

Commit

Permalink
docs(framework) Move framework docs to framework/docs (#4655)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel J. Beutel <[email protected]>
  • Loading branch information
charlesbvll and danieljanes authored Dec 9, 2024
1 parent 396a68c commit 069c186
Show file tree
Hide file tree
Showing 145 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets. AWS_SECRET_ACCESS_KEY }}
DOCS_BUCKET: flower.ai
run: |
aws s3 sync --delete --exclude ".*" --exclude "v/*" --cache-control "no-cache" ./doc/build/html/ s3://${{ env.DOCS_BUCKET }}/docs/framework
aws s3 sync --delete --exclude ".*" --exclude "v/*" --cache-control "no-cache" ./framework/docs/build/html/ s3://${{ env.DOCS_BUCKET }}/docs/framework
aws s3 sync --delete --exclude ".*" --exclude "v/*" --cache-control "no-cache" ./baselines/doc/build/html/ s3://${{ env.DOCS_BUCKET }}/docs/baselines
aws s3 sync --delete --exclude ".*" --exclude "v/*" --cache-control "no-cache" ./examples/doc/build/html/ s3://${{ env.DOCS_BUCKET }}/docs/examples
aws s3 sync --delete --exclude ".*" --exclude "v/*" --cache-control "no-cache" ./datasets/doc/build/html/ s3://${{ env.DOCS_BUCKET }}/docs/datasets
4 changes: 2 additions & 2 deletions .github/workflows/update_translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: Update text and translations for all locales
run: |
cd doc
cd framework/docs
make update-text
for langDir in locales/*; do
if [ -d "$langDir" ]; then
Expand All @@ -52,7 +52,7 @@ jobs:
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add doc/locales
git add framework/docs/locales
git commit -m "Update text and language files"
continue-on-error: true

Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Flower
.flower_ops
data/
doc/source/api_documentation
doc/source/_build
doc/source/dataset/
framework/docs/source/api_documentation
framework/docs/source/_build
framework/docs/source/dataset/
flwr_logs
.cache

Expand Down
2 changes: 1 addition & 1 deletion dev/build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cd $ROOT
./datasets/dev/build-flwr-datasets-docs.sh

cd $ROOT
cd doc
cd framework/docs

if [ "$1" = true ]; then
./build-versioned-docs.sh
Expand Down
8 changes: 4 additions & 4 deletions dev/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ python -m black -q e2e
python -m docformatter -i -r e2e

# Notebooks
python -m black --ipynb -q doc/source/*.ipynb
python -m black --ipynb -q framework/docs/source/*.ipynb
KEYS="metadata.celltoolbar metadata.language_info metadata.toc metadata.notify_time metadata.varInspector metadata.accelerator metadata.vscode cell.metadata.id cell.metadata.heading_collapsed cell.metadata.hidden cell.metadata.code_folding cell.metadata.tags cell.metadata.init_cell cell.metadata.vscode cell.metadata.pycharm"
python -m nbstripout doc/source/*.ipynb --extra-keys "$KEYS"
python -m nbstripout framework/docs/source/*.ipynb --extra-keys "$KEYS"
python -m nbstripout examples/*/*.ipynb --extra-keys "$KEYS"

# Markdown
python -m mdformat --number doc/source examples
python -m mdformat --number framework/docs/source examples

# RST
docstrfmt doc/source
docstrfmt framework/docs/source
2 changes: 1 addition & 1 deletion dev/get-latest-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tags=$(git tag --sort=-v:refname)
new_version=$(echo "$tags" | sed -n '1p')
old_version=$(echo "$tags" | sed -n '2p')

awk '{sub(/<!--.*-->/, ""); print}' doc/source/ref-changelog.md | awk -v start="$new_version" -v end="$old_version" '
awk '{sub(/<!--.*-->/, ""); print}' framework/docs/source/ref-changelog.md | awk -v start="$new_version" -v end="$old_version" '
$0 ~ start {flag=1; next}
$0 ~ end {flag=0}
flag && !printed && /^$/ {next} # skip the first blank line
Expand Down
2 changes: 1 addition & 1 deletion dev/rm-caches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ find src -type d -name __pycache__ -exec rm -r {} \+
rm -rf .mypy_cache
rm -rf .pytest_cache
rm -rf .cache
rm -rf doc/build
rm -rf framework/docs/build
4 changes: 2 additions & 2 deletions dev/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ echo "- All Python checks passed"
echo "- Start Markdown checks"

echo "- mdformat: start"
python -m mdformat --check --number doc/source examples
python -m mdformat --check --number framework/docs/source examples
echo "- mdformat: done"

echo "- All Markdown checks passed"
Expand All @@ -71,7 +71,7 @@ echo "- All TOML checks passed"
echo "- Start rST checks"

echo "- docstrfmt: start"
docstrfmt --check doc/source
docstrfmt --check framework/docs/source
echo "- docstrfmt: done"

echo "- All rST checks passed"
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
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.
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.
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.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ docsig = "==0.64.0"

[tool.docstrfmt]
extend_exclude = [
"doc/source/conf.py",
"doc/source/tutorial-quickstart-huggingface.rst",
"doc/source/_templates/autosummary/*",
"doc/source/ref-api/*",
"framework/docs/source/conf.py",
"framework/docs/source/tutorial-quickstart-huggingface.rst",
"framework/docs/source/_templates/autosummary/*",
"framework/docs/source/ref-api/*",
]

[tool.isort]
Expand Down

0 comments on commit 069c186

Please sign in to comment.