sphinx-contrib / matlabdomain

A Sphinx extension for documenting Matlab code
http://sphinxcontrib-matlabdomain.readthedocs.io/
Other
70 stars 45 forks source link

Bug fix for issue #58, when a Matlab-file has some comment lines at the top. #59

Closed Ganimed closed 6 years ago

Ganimed commented 6 years ago

I have added a simple function that removes any comment lines at the begin of current read code string.

joeced commented 6 years ago

You must add a test, that shows that this works as expected. Place at least one .m file in tests/test_data/ with a comment header. Add a test in tests/test_parse_mfile.py to show that a function can be parsed.

You'll also have to update tests/test_matlabify.py::test_module.

To run the tests, first do the following:

python3 -m venv .venv
.venv/Scripts/activate
pip install pytest
pip install -e .

Now you have a work environment. Run the tests with

pytest tests
Ganimed commented 6 years ago

Sorry for my late response. I will do that as soon as possible.

joeced commented 6 years ago

No problem. I'm glad you will contribute. I haven't had much time either to work this project.

Ganimed commented 6 years ago

Thank's for your hints. I have created some new test files in the folder test_data and I have also added some new test cases in tests/test_parse_mfile.py. After stepping through your instructions, I got the result that all 32 tests are passed successfully!

joeced commented 6 years ago

I would like to add your name to list contributors. Is your real name "Neururer Martin"?

Ganimed commented 6 years ago

Thank's. Yes, "Martin Neururer" is my real name.