-
Notifications
You must be signed in to change notification settings - Fork 126
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
Fixes #173: script added to generate documentation from multiple repository #174
Conversation
@imujjwal96 @pri22296 I have the script. please give your suggestion |
Can you please show a demo deployment with Travis? |
|
||
rm index.rst | ||
|
||
python $BASE/modules/scripts/genindex.py ./ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The index generated by genindex.py differs from what is needed as the index for a master project. For now assume that the user provides a suitable index and proceed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right now build dir will look like this
Project1
Project2
all the files will be removed and docs/ folder files will be copied to specific project folder. Then I'm generating index.rst from the root.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last issue, what about the README's of the sub-projects. since they won't be in subproject/docs, they won't be included in the build. How about, if we copy the entire repo inside BUILD_DIR and visit subproject/docs and generate index if needed for each subproject and then, for the main index, we just add a toctree with links to all sub-indices? views @Sch00lb0y @imujjwal96
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it is a good idea. Should I work on this now? or to raise a new issue after the merge. Cause meanwhile I can work on WEBUI and you guys can work on travis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool. Just create a new issue and this PR should be good to go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b6bdb8d
to
a9f7f14
Compare
@imujjwal96 here is the generated doc. https://sch00lb0y.github.io/tempCheck/ and travis build https://travis-ci.org/sch00lb0y/tempCheck/builds/246716829 |
multiple_generate.sh
Outdated
fi | ||
|
||
|
||
IFS=', ' read -r -a SUBPROJECTS <<< "$SUBPROJECT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restore previous value of IFS after reading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pri22296 How do you expect url's to be filled?
", " of ","?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the best way would be that we split with a ',' and then strip whitespaces from both ends.
From where have you generated the start page? |
@Sch00lb0y could you make configuration vars in your test repo public? No need to encrypt them. would help a lot in reviewing! and please set DEBUG="true". I would like to see the generated index in this case! |
multiple_generate.sh
Outdated
|
||
cp -a ${BASE}/fossasia_theme $BUILD_DIR/_themes/ | ||
|
||
URL_SPLIT=(${SUBPROJECTS[0]//// }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I understand, you are using the first entry of subproject as the parent right? could you change that? subprojects are meant to be child projects. Use the current project as the parent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember having a discussion over this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I made this script by having web UI on the mind. Once it gets merged. we'll raise a separate issue for Travis and anyone one of you work on Travis by that time I'll work on #169. That's why I didn't touch generate_ci.sh
. if you want me to make changes for Travis in this PR also no problem. I'll make necessary changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I can see that in the PR for webUI, you are taking a list of urls as input. Instead take GITURL as a single url like before and then take SUBPROJECTS as a list of urls. If SUBPROJECT would be empty, it would reduce to the single repo model like we have setup for now. Better to make the change now than later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pri22296 check once. this way of implementation okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, this seems good for now. please look at my other comments too!
0258dd7
to
00a0b84
Compare
generate.sh
Outdated
echo -e "Cloning Repository...\n" | ||
git clone -q ${GITURL} "$UNIQUEID" && cd $_ | ||
echo -e "Repository Cloned Successfully!\n" | ||
if ! [ "${SUBPROJECT:-nothing}" == "nothing" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why nothing
? use a empty string instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have resolved
multiple_generate.sh
Outdated
mv ${UNIQUEID} ${UNIQUEID}_preview | ||
zip -r -q ${UNIQUEID}.zip ${UNIQUEID}_preview | ||
else | ||
source <(curl -s https://raw.githubusercontent.com/sch00lb0y/yaydoc/script/publish_docs.sh) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix this link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have resolved
@imujjwal96 Please check |
From where have you generated the start page? |
@imujjwal96 start page is created by using |
Description
I have added bash script which generate documentation from serveral git urls
Related Issue
close #173
Motivation and Context
this script allow us to implement the multiple repository documentation in travis and WEBUI
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Fixes #<number> commit message