JanusGraph / janusgraph-python

JanusGraph Python Gremlin Language Variant (GLV)
Other
22 stars 10 forks source link

Create automated scripts to build project and docs #7

Closed debasishdebs closed 5 years ago

debasishdebs commented 6 years ago

Currently, the library is build using static set of commands like pyb. We will need to move that to a bash script, so that the library building can happen inside a virtual env, and dependencies are isolated.

Currently, documentation are build by running a set of commands which run to be in succession.

This adds extra level of complexity, as user is not expected to be running each one at a time. To make life easier for end user, a script needs to be developed which would run all these commands one after other.

A .bat file needed to generate docs on Windows. A .sh file needed to generate docs on NIX systems.

In addition to that, extra features needs to be implemented related to Sphinx cleanup.

  1. Sphinx needs to import version, name and other Project metadata from build.py while building docs.
  2. Redundant/Optional configuration for Sphinx needs to be removed.
pluradj commented 6 years ago

I'm not clear on why Anaconda needs to be a prerequisite. I was thinking only to have these 2 lines in a shell script because they are hard to type and remember:

sphinx-apidoc -o docs/ src/main/python/janusgraph_python
pyb sphinx_generate_documentation
debasishdebs commented 6 years ago

@pluradj : The reason I moved to Anaconda today, was because I'll need to create a virtual environment, within which my PyBuilder, and Sphinx will get generated. It was only yesterday that I realized the PyBuilder depends on older version of PiP (<=10 whereas pip is currently at 18). Some users might have updated their pip, as that is recommended way for Python. That caused me build problems.

Having a virtual env, within which all dependencies gets installed then becomes easier. I can make do without Anaconda, as @sjudeng suggested that Anaconda image size would be to huge (3.5G), and rather make use of Python's Virtual env creator. (Syntax are more difficult on Python's virtual env than Anaconda's)

If I'm able to make that work, I'll update this Issue after that

debasishdebs commented 6 years ago

@pluradj : Have removed dependency on Anaconda. Have pushed a fresh commit, so this should be closed once PR is merged.