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

[RFR] Docs restructured #53

Merged
merged 5 commits into from
Oct 4, 2018
Merged

[RFR] Docs restructured #53

merged 5 commits into from
Oct 4, 2018

Conversation

jan-zmeskal
Copy link
Collaborator

@jan-zmeskal jan-zmeskal commented Jul 20, 2018

So what's the point of this PR? Let's go through it:

  • Documentation is now split between source and build, build is ignored by version control
  • I disabled generation of API docs, I don't believe we're there yet
  • Usage information is generated automatically based on disruption_generator --help output
  • Fake logger dev utility is documented

I generally think that the current structure is cleaner and it is easier for future contributors to just jump in and extend the documentation. Let me know what do you think.

@@ -63,7 +63,8 @@ instance/
.scrapy

# Sphinx documentation
docs/_build/
docs/build/
docs/source/usage/help_output.inc
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is generated dynamically

docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/disruption_generator.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ disruption_generator
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think we are ready to have auto-generated API docs. They actually look like mess and there's not much of them anyway. We can easily re-activate this later once we actually have some docstrings.

:param experiments_path: Path to directory with definitions of experiments.
:return: 0 on success, else 1.
:rtype: int
"""
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is just an example of how docstring should look like for autodoc make proper use of it.

%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't believe we really support Windows setup at this moment, so why even have this?

@@ -1,38 +1,45 @@
#!/usr/bin/env python
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This has been built automatically by sphinx-quickstart, but I believe all the params are correct there.

@jan-zmeskal jan-zmeskal changed the title [WIP] Docs restructured [RFR] Docs restructured Jul 20, 2018
Copy link
Collaborator

@rhrazdil rhrazdil left a comment

Choose a reason for hiding this comment

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

Nice.

CONTRIBUTING.rst Outdated
$ make docs

You can also let the docs be built dynamically while working on them.
You can see sphinx output in console and you can see your changes straing away in browser (that is after you hit refresh
Copy link
Collaborator

Choose a reason for hiding this comment

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

straight

@grafuls
Copy link
Owner

grafuls commented Jul 30, 2018

Try to build the docs from RTD first.

@jan-zmeskal jan-zmeskal changed the title [RFR] Docs restructured [WIP] Docs restructured Jul 30, 2018
@jan-zmeskal jan-zmeskal changed the title [WIP] Docs restructured [RFR] Docs restructured Jul 31, 2018
@jan-zmeskal
Copy link
Collaborator Author

Okay, so based on suggestion of @grafuls, I tried building this docs on RTD. I've had some problems but now it finally builds. You can check it if you visit our documentation website and switch to version docs_restructured.

Unfortunately, Travis has some problem now. It seems that one of our packages in Pipfile has problem with dependencies. I'll try looking into it, but you're more than welcome to help me. :-)

@jan-zmeskal
Copy link
Collaborator Author

The error message is quite funny:

Could not find a version that matches pluggy<0.7,<1.0,>=0.3.0,>=0.5,>=0.7

Well, pluggy probably won't be <0.7 and >=0.7 at the same time. :-) The wierd thing is that I cannot reproduce this locally. Any idea on this, @grafuls ?

@jan-zmeskal
Copy link
Collaborator Author

Hint by @grafuls: pipenv graph. I will look into this as soon as I clear some bugs out of my todo list.

@jan-zmeskal jan-zmeskal changed the title [RFR] Docs restructured [WIP] Docs restructured Aug 6, 2018
@jan-zmeskal
Copy link
Collaborator Author

Okay, so I also fixed the problem with installing sub-dependencies. TL;DR it is pipenv's problem that must be worked around a little bit until it is properly solved. You can read about it here. If you want to see just the solution, check this comment and let's say the next five comments.

The work-around is here: e8a4eee

@jan-zmeskal jan-zmeskal changed the title [WIP] Docs restructured [RFR] Docs restructured Aug 13, 2018
@grafuls grafuls merged commit 1937d4b into grafuls:master Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants