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

separate doc from main repo to doc repo #4

Merged
merged 8 commits into from
Jul 12, 2021

Conversation

PaParaZz1
Copy link
Member

@PaParaZz1 PaParaZz1 commented Jul 10, 2021

P.S. unittest can be ignored now, it will be fixed in another pull request.

@PaParaZz1 PaParaZz1 added efficiency optimization Efficiency optimization (time, memory and so on) P1 Issue that should be fixed within a few weeks labels Jul 10, 2021
@PaParaZz1 PaParaZz1 requested a review from HansBug July 10, 2021 12:45
@PaParaZz1 PaParaZz1 self-assigned this Jul 10, 2021
@HansBug
Copy link
Member

HansBug commented Jul 10, 2021

Well, is the seperated repository able to build and deploy documentation properly? As I know that the build process of the documentation is based on the source code (or you can say, the pip package), but there will be no source code in doc repo. I think you have to create github action in doc repo and pip install di-engine b4 make html, however another problem is the potential conflict of the versions in source repo and doc repo. What is your plan to solve it?

make docs
mv ding/docs/build/html public
rm -rf ding/docs/build
git clone https://github.com/opendilab/DI-engine-docs.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider to make a sync with the version of doc repo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just restrict to main branch now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well if you need to edit code and doc, especially when you are using branch, this way may cause problem because the verison of doc not the same.

@PaParaZz1 PaParaZz1 closed this Jul 10, 2021
@PaParaZz1 PaParaZz1 reopened this Jul 10, 2021
@PaParaZz1
Copy link
Member Author

Well, is the seperated repository able to build and deploy documentation properly? As I know that the build process of the documentation is based on the source code (or you can say, the pip package), but there will be no source code in doc repo. I think you have to create github action in doc repo and pip install di-engine b4 make html, however another problem is the potential conflict of the versions in source repo and doc repo. What is your plan to solve it?

  • There are 2 ways to generate doc:
    1. in main repo doc workflow, first install the current source code of DI-engine, then clone doc repo, generate and deploy doc.
    2. In doc repo, the user can install doc repo and source repo from the requirements of doc repo, there is DI-engine item. that is to say, just execute the next command:
    git clone https://github.com/opendilab/DI-engine-docs
    cd DI-engine-docs
    pip install -r requirements
    make html
  1. Sync problem is indeed important, so we will prepare a mapping for main repo and doc repo(such as : 0.1.0, 0.1.1, ... , latest). And https://opendilab.github.io/DI-engine/ only shows the latest doc, other version docs will be managed in https://di-engine-docs.readthedocs.io .
  2. BTW, for the chinese-version doc, what's your advice?

@HansBug
Copy link
Member

HansBug commented Jul 11, 2021

Well, is the seperated repository able to build and deploy documentation properly? As I know that the build process of the documentation is based on the source code (or you can say, the pip package), but there will be no source code in doc repo. I think you have to create github action in doc repo and pip install di-engine b4 make html, however another problem is the potential conflict of the versions in source repo and doc repo. What is your plan to solve it?

  • There are 2 ways to generate doc:

    1. in main repo doc workflow, first install the current source code of DI-engine, then clone doc repo, generate and deploy doc.
    2. In doc repo, the user can install doc repo and source repo from the requirements of doc repo, there is DI-engine item. that is to say, just execute the next command:
    git clone https://github.com/opendilab/DI-engine-docs
    cd DI-engine-docs
    pip install -r requirements
    make html
  1. Sync problem is indeed important, so we will prepare a mapping for main repo and doc repo(such as : 0.1.0, 0.1.1, ... , latest). And https://opendilab.github.io/DI-engine/ only shows the latest doc, other version docs will be managed in https://di-engine-docs.readthedocs.io .
  2. BTW, for the chinese-version doc, what's your advice?

I have another idea, you can consider to use submodule to bind the version of source and docs together. It is a simple way to sync. (Actually as I known, some of the open source python projects' documentation is just in the source repo, with a doc or docs directory as the repo's root path. So it may not be a problem to store these together)

In the problem of chinese documentation, you can see this official doc, it is usually called 'internationalization' : https://www.sphinx-doc.org/en/master/usage/advanced/intl.html

By the way, I'm think about the support of the different versions of ding, like the python language's official documentation, 3.5 to 3.9 can be looked up on the internet. You can see this: https://stackoverflow.com/questions/28849284/how-do-i-have-multiple-versions-of-my-doc-with-sphinx

@PaParaZz1 PaParaZz1 merged commit b9d52cb into opendilab:main Jul 12, 2021
puyuan1996 pushed a commit to puyuan1996/DI-engine that referenced this pull request Dec 14, 2021
separate doc from main repo to doc repo
puyuan1996 pushed a commit to puyuan1996/DI-engine that referenced this pull request Apr 18, 2022
separate doc from main repo to doc repo
SolenoidWGT pushed a commit to SolenoidWGT/DI-engine that referenced this pull request Aug 22, 2023
doc(README.md): update AutoModelForCausalLM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
efficiency optimization Efficiency optimization (time, memory and so on) P1 Issue that should be fixed within a few weeks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants