Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

[FEATURE]Add new command for building website locally #1198

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

chenw23
Copy link
Member

@chenw23 chenw23 commented Apr 7, 2020

Description

Currently, the L62 to L81 in the old Makefile is preventing users from building the website locally. It gives the following errors:


for f in docs/examples/word_embedding/word_embedding_training.md docs/examples/word_embedding/word_embedding.md docs/examples/machine_translation/transformer.md docs/examples/machine_translation/gnmt.md docs/examples/sentence_embedding/elmo_sentence_representation.md docs/examples/sentence_embedding/bert.md docs/examples/language_model/train_language_model.md docs/examples/language_model/use_pretrained_lm.md docs/examples/sentiment_analysis/sentiment_analysis.md docs/examples/sentiment_analysis/self_attentive_sentence_embedding.md docs/examples/sequence_sampling/sequence_sampling.md ; do \
                FILE=`echo $f | sed 's/docs\///g'` ; \
                DIR=`dirname $FILE` ; \
                BASENAME=`basename $FILE` ; \
                HTML_BASENAME=`echo $BASENAME | sed 's/md/html/'` ; \
                IPYNB_BASENAME=`echo $BASENAME | sed 's/md/ipynb/'` ; \
                TARGET_HTML="docs/_build/html/$DIR/$HTML_BASENAME" ; \
                echo "processing" $BASENAME ; \
                sed -i "s/$IPYNB_BASENAME/$BASENAME/g" $TARGET_HTML; \
        done;
processing word_embedding_training.md
sed: 1: "docs/_build/html/exampl ...": extra characters at the end of d command
processing word_embedding.md
sed: 1: "docs/_build/html/exampl ...": extra characters at the end of d command
processing transformer.md
sed: 1: "docs/_build/html/exampl ...": extra characters at the end of d command
processing gnmt.md
sed: 1: "docs/_build/html/exampl ...": extra characters at the end of d command
processing elmo_sentence_representation.md
sed: 1: "docs/_build/html/exampl ...": extra characters at the end of d command
processing bert.md
sed: 1: "docs/_build/html/exampl ...": extra characters at the end of d command
processing train_language_model.md
sed: 1: "docs/_build/html/exampl ...": extra characters at the end of d command
processing use_pretrained_lm.md
sed: 1: "docs/_build/html/exampl ...": extra characters at the end of d command
processing sentiment_analysis.md
sed: 1: "docs/_build/html/exampl ...": extra characters at the end of d command
processing self_attentive_sentence_embedding.md
sed: 1: "docs/_build/html/exampl ...": extra characters at the end of d command
processing sequence_sampling.md
sed: 1: "docs/_build/html/exampl ...": extra characters at the end of d command
make: *** [docs] Error 1

These errors are unfriendly to users who want to build the website locally. So I invented a new command to circumvent such codes with the most concise way.

It doesn't affect all the existing command and CI.

Checklist

Essentials

  • PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented

Changes

  • Feature1, tests, (and when applicable, API doc)
  • Feature2, tests, (and when applicable, API doc)

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

cc @dmlc/gluon-nlp-team

@chenw23 chenw23 requested a review from a team as a code owner April 7, 2020 08:48
@codecov
Copy link

codecov bot commented Apr 7, 2020

Codecov Report

❗ No coverage uploaded for pull request head (patch-4@e1846f8). Click here to learn what that means.
The diff coverage is n/a.

@mli
Copy link
Member

mli commented Apr 7, 2020

Job PR-1198/1 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-1198/1/index.html

@eric-haibin-lin eric-haibin-lin merged commit f294769 into dmlc:master Apr 8, 2020
chenw23 pushed a commit to chenw23/gluon-nlp that referenced this pull request Apr 15, 2020
Now adopts the great new enhancements from dmlc#1191 , dmlc#1192 , dmlc#1193 , dmlc#1194 , dmlc#1195 , dmlc#1196 , dmlc#1197 , dmlc#1198 and dmlc#1120 .
The pull requests above fixed various errors in the previous make docs command and added new switch options. Now the commands mentioned in this documentation are strictly error-free.
chenw23 pushed a commit to chenw23/gluon-nlp that referenced this pull request Apr 15, 2020
Now adopts the great new enhancements from dmlc#1191 , dmlc#1192 , dmlc#1193 , dmlc#1195 , dmlc#1196 , dmlc#1197 , dmlc#1198 and dmlc#1200 .
The pull requests above fixed various errors in the previous make docs command and added new switch options. Now the commands mentioned in this documentation are strictly error-free.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants