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

Re-write CMD2MD.java class in python #44

Closed
ajbaird opened this issue Jun 2, 2020 · 3 comments
Closed

Re-write CMD2MD.java class in python #44

ajbaird opened this issue Jun 2, 2020 · 3 comments
Assignees
Labels
summer of code work done via summer of code

Comments

@ajbaird
Copy link
Contributor

ajbaird commented Jun 2, 2020

  • Create a python class that matches the functionality in the java class
  • update cmake files to call the python file
  • demonstrate that the website gets generated and is equivalent to the java functionality
@ajbaird ajbaird added the summer of code work done via summer of code label Jun 2, 2020
@Shashankjain12
Copy link
Contributor

Shashankjain12 commented Jul 1, 2020

@ajbaird @StevenAWhite @LucasJMO I have replaced the Java Files with the files implemented in python for the process I have created

  1. XSDToDoxygen.py - This file generates the schema of the whole defgroups and store all the schema in file xsd.ixx.This can be executed as:-
    python XSDToDoxgen.py -p <Path to BioGearsDataModel.xsd file> -f <xsd.ixx path>
  2. CDM2MD.py - This file generates all of the corresponding tables according to all of the specific Property names,Types and their corresponding definition. This can be executed as:-
    python CDM2MD.py -p <Path to BioGearsDataModel.xsd file> -f <Path to CDMTables.md>
  3. DoxygenPreprocessor.py - This file generates all of the corresponding .md files under processed_md folder inside docs/doxygen by replacing all of the corresponding @ insert statements by the corresponding files this file can be executed using
    python DoxygenPreprocessor.py -p <path to markdown or methodology> -f <path to processed_md>

All files can be seen here
https://github.com/Shashankjain12/core/tree/master/projects/python/cdm/src/mil/tatrc/physiology/datamodel/doxygen

@Shashankjain12
Copy link
Contributor

I have updated CMakeFiles as well to suppport Python as well and thereby added targets

  1. docs-prepare-py - To prepare the documentation that is to create a processed_md directory and thereby placing all of the required executions of python files namely XSDToDoxygen.py, CDM2MD.py and DoxygenPreprocessor.py files are executing by running this target which is the first step to generate and populate the processed_md directory.
  2. docs-doxygen-py - To execute the Doxygen file which is used to generate the documentation website which can be seen by executing all of the md files under processed_md directory.
  3. docs-stage-py - To save the documentation in the form of zip file as well as output files which can be viewed using doc/output/documentation directory inside build.

And to execute those targets we need to first create a build directory then we need to run this command to generate targets
cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX=/opt/biogears/usr -DBiogears_Python_BUILD_WEBSITE=ON -DBiogears_BUILD_HOWTOS=OFF -DBiogears_WEBSITE_TOOLS=ON ..

@StevenAWhite
Copy link
Contributor

-- Pull Request Accepted and Ready for Merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
summer of code work done via summer of code
Projects
None yet
Development

No branches or pull requests

4 participants