Giter Site home page Giter Site logo

Comments (3)

joeced avatar joeced commented on August 16, 2024

Original comment by Mark Mikofski (Bitbucket: bwanamarko, GitHub: Unknown):


bug fixes to 0.2

  • rename tags from v0.1/v0.2 to matlabdomain-0.1/matlabdomain-0.2 to conform with
    guidelines of sphinxcontrib, not the only tags in repo!
  • all tests passing! refactor tests with new matlabify signature
  • fixes #11 - re.sub() to scan code for functions with ellipsis in signature, Pygments
    lexes these as Token.Error, but classdefs are OK, and everywhere else Pygments sees
    them as comments and concatenates everything afterword, which is what they are. This
    effects property defaults that are arrays and span multiple lines (issue #11) that do
    use ellipsis, if the ellipsis also had comments, then replacing ellipsis everywhere in
    code would leave uncommented text and cause Pygment lexer errors, need to replace them
    in all classdef methods (anywhere function keyword occurs), so just checking first line
    would not work
  • issues #12 & #13 - add & set MatObject class attribtutes for basedir, env, app
    & dbg so that can issue warnings for exceptions instead of causing build to fail, as
    well as verbose feedback during matlabification
  • remove basedir as arg for matlabify, remove it from docstring, and everywhere
    matlabify is called, use MatObject.basedir for fullpath in matlabify() instead of arg
  • also remove basedir from getter method of MatModule and from bases() in MatClass
  • register full module name (aka package name) in sys.modules, instead of just modname
    when MatModuleAnalyzer looks for attribute docstrings, it searches for modules using
    full namespace, not just local name - this is more robust in case folders at different
    levels have the same name
  • this last fix requires creating the full path in MatClass.bases() when searching
    matlab_src_dir for superclass modules, need their absolute path not just local path
  • fixes #7 - if retv is nothing, append the token back into the stack so that the
    function name can be retrieved (IE the retv popped from the list is the function
    name)
  • OK if function has no args, and empty parentheses, stick args back in, because it's
    closing parenthesis
  • fixes #10 - refactor keyword-end pair counter, lastkw incremented for opening
    punctuation, decremented on any closing parenthesis, combine ifs with and not lastkw,
    don't do colon/opening-parenthesis thing, because curly braces also used in indices,
    also commas, and finally nested pairs require a counter
  • move lastkw setting out of try block, only need to test pop() to determin eof
  • issue #13 - allow any subtype of Name Token to be used for property names, but issue
    debug warning
  • fixes #6 - allow empty properties block
  • strip semicolon, ";" from right side of property names and defaults
  • fixes #11 - allow defaults with brackets, parentheses or curly-braces to span multiple
    lines
  • fixes #9 - only visit attr if it actually has a docstring attribute
  • set MatObjects basedir, env, app & dbg before matlabification, don't need basedir arg
    in matlabify then
  • set MatObject.basedir in tests

from matlabdomain.

joeced avatar joeced commented on August 16, 2024

Original comment by Mark Mikofski (Bitbucket: bwanamarko, GitHub: Unknown):


bug fixes to 0.2

  • rename tags from v0.1/v0.2 to matlabdomain-0.1/matlabdomain-0.2 to conform with
    guidelines of sphinxcontrib, not the only tags in repo!
  • all tests passing! refactor tests with new matlabify signature
  • fixes #11 - re.sub() to scan code for functions with ellipsis in signature, Pygments
    lexes these as Token.Error, but classdefs are OK, and everywhere else Pygments sees
    them as comments and concatenates everything afterword, which is what they are. This
    effects property defaults that are arrays and span multiple lines (issue #11) that do
    use ellipsis, if the ellipsis also had comments, then replacing ellipsis everywhere in
    code would leave uncommented text and cause Pygment lexer errors, need to replace them
    in all classdef methods (anywhere function keyword occurs), so just checking first line
    would not work
  • issues #12 & #13 - add & set MatObject class attribtutes for basedir, env, app
    & dbg so that can issue warnings for exceptions instead of causing build to fail, as
    well as verbose feedback during matlabification
  • remove basedir as arg for matlabify, remove it from docstring, and everywhere
    matlabify is called, use MatObject.basedir for fullpath in matlabify() instead of arg
  • also remove basedir from getter method of MatModule and from bases() in MatClass
  • register full module name (aka package name) in sys.modules, instead of just modname
    when MatModuleAnalyzer looks for attribute docstrings, it searches for modules using
    full namespace, not just local name - this is more robust in case folders at different
    levels have the same name
  • this last fix requires creating the full path in MatClass.bases() when searching
    matlab_src_dir for superclass modules, need their absolute path not just local path
  • fixes #7 - if retv is nothing, append the token back into the stack so that the
    function name can be retrieved (IE the retv popped from the list is the function
    name)
  • OK if function has no args, and empty parentheses, stick args back in, because it's
    closing parenthesis
  • fixes #10 - refactor keyword-end pair counter, lastkw incremented for opening
    punctuation, decremented on any closing parenthesis, combine ifs with and not lastkw,
    don't do colon/opening-parenthesis thing, because curly braces also used in indices,
    also commas, and finally nested pairs require a counter
  • move lastkw setting out of try block, only need to test pop() to determin eof
  • issue #13 - allow any subtype of Name Token to be used for property names, but issue
    debug warning
  • fixes #6 - allow empty properties block
  • strip semicolon, ";" from right side of property names and defaults
  • fixes #11 - allow defaults with brackets, parentheses or curly-braces to span multiple
    lines
  • fixes #9 - only visit attr if it actually has a docstring attribute
  • set MatObjects basedir, env, app & dbg before matlabification, don't need basedir arg
    in matlabify then
  • set MatObject.basedir in tests

from matlabdomain.

joeced avatar joeced commented on August 16, 2024

Original comment by Mark Mikofski (Bitbucket: bwanamarko, GitHub: Unknown):


also there could be whitespace, don't add that, but need to accumulate lastkw until decremented

can brackets be used to index? no, only to make and concatenate arrays.

from matlabdomain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.