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

PERLMOD_PYTHON to use python in perlmod (it generates simple document for class / member functions as example) #10782

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

cheoljoo
Copy link
Contributor

@cheoljoo cheoljoo commented Apr 5, 2024

PERLMOD_PYTHON is added in config.xml because of supporting python from perl output.

  • perlmod makes DoxyDocs.pm. PERLMOD_PYTHON will make DoxyDocs.py.
  • it will import DoxyDocs to use parsing data.
  • doxygen_perlmod_python examples

modified files

  • config.xml : add PERLMOD_PYTHON
  • perlmodgen.cpp : add more generated file when PERLMOD_PYTHON is YES.
    • Makefile(changed) put2cpp.py(added) README.md(added) sample.py(added) in perlmod directory

PERLMOD_PYTHON

  • developers want to use parsing data from doxygen.
  • they want to do something with python.
  • set GENERATE_PERLMOD = YES and PERLMOD_PYTHON = YES

make python_doc in output/perlmod

  • doxy2py.pl : DoxyDocs.pm converts to DoxyDocs.py.
    • DoxyDocs.py is loaded in python program.
  • sample.py makes markdown (output.md) file as final output.
    • output.md includes table for classes and member functions.
    • if doxygen comments include plantuml , output.md includes plantuml if you set PLANTUML_JAR_PATH = ./plantuml.jar and this file exists.
  • output
    • output.md : show markdown including plantuml with vscode (useful extension : markdown preview enhanced)

make code2cpp in output/perlmod

  • i made to put basic code files in perlmodgen.cpp conveniently.
  • all codes with related to PERLMOD_PYTHON are created by perlmodgen.cpp.
  • put2cpp.py insert converted c++ code into perlmodgen.cpp from files in input_perlmodgen_files directory.
  • --perlmodgen option : location of perlmodgen.cpp. python codes in inputdir will be updated.
  • generated code will be inserted between // perlmodPython PerlModGenerator [key] and // perlmodPython PerlModGenerator [key]
  • output ( --perlmodgen=../../../../src/perlmodgen.cpp )
    • ../../../../src/perlmodgen.cpp.mod : you can replace perlmodgen.cpp with it.

- out.cpp has adding code.
- check the point with // perlmodPython PerlModGenerator  [key...] <start>
PERLMOD_PYHON is YES (depends on GENERATE_PERLMOD = YES option)

- config.xml
    - add PERLMOD_PYTHON with description
        - it is option to make python program with perlmod result
- put2cpp.py
    - change/insert the code in perlmodgen.cpp between // perlmodPython PerlModGenerator ... <start> ~ <end>
- perlmodgen.cpp
    - includes put2cpp.py
    - change Makefile to support many example
    - I will add more python file
- make code2cpp
    - doxy2py.pl / sample.py / put2cpp.py
    - generate new perlmodgen.cpp.mod.  you need to copy it to perlmodgen.cpp.
- make python
    - run doxy2py.pl -> make DoxyDocs.py from Doxydocs.pm
    - run sample.py  -> print something from DoxyDocs.py
…ython'

- make python
    - run doxy2py.pl -> make DoxyDocs.py from Doxydocs.pm
    - run sample.py --outfile=output.md  -> output.md makes documents for classes and their member functions
        - you can see the result with markdown viwer.
- problems
    - python : show member function 6 times. so you need to change it in case of python. I can not find which is python.
@cheoljoo cheoljoo mentioned this pull request Apr 5, 2024
Copy link

sonarcloud bot commented Apr 5, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
13.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@doxygen
Copy link
Owner

doxygen commented Apr 6, 2024

@cheoljoo Thanks for your interest in Doxygen and for creating the pull request.

I see this basically adds a couple of static files to the output, and these then use the output of Doxygen as input. I think this can better be hosted as a separate project on GitHub. By including it in Doxygen, the maintenance burden moves to us, and we are already stretched supporting the current output formats.

Did you know, Doxygen has a doxmlparser addon that provides a Python interface to the XML output produced by doxygen? I would expect/hope it offers a better way to interface with the doxygen output from Python than using the Perl module.

@cheoljoo
Copy link
Contributor Author

cheoljoo commented Apr 8, 2024

@doxygen , I will check doxmlparser.

  • I made separate github to support PYTHON with PERLMOD.
  • DoxyDocs.py (python) supports simpler parsing database like DoxyDocs.pm (perl).
  • it supports plantuml server instead of png. (it will have less running time.)
    thanks for your advice.

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.

None yet

2 participants