Git Product home page Git Product logo

statick-tex's People

Contributors

tdenewiler avatar xydesa avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

creffett xydesa

statick-tex's Issues

Add statick-md

Check all the markdown files with the statick-md tools.

Unit testing with statick

I'm using this repo in part to address sscpac/statick#70. @creffett, I was hoping to get a bit of help from you in order to get the unit tests working. I borrowed some concepts for these plugins from soartech/statick-fortify. My latest work is in the chktex-tool branch -- I will likely merge that into master soon since the plugins work but the unit tests do not.

The issue I am having is running tox locally, where I get several errors similar to:

=========================================================================================== ERRORS ===========================================================================================
__________________________________________________________ ERROR collecting statick_tool/plugins/discovery/tex_discovery_plugin.py ___________________________________________________________
../statick_tool/plugins/discovery/tex_discovery_plugin.py:10: in <module>
    from statick_tool.discovery_plugin import DiscoveryPlugin
E   ImportError: No module named 'statick_tool.discovery_plugin'
______________________________________________________________ ERROR collecting statick_tool/plugins/tool/chktex_tool_plugin.py ______________________________________________________________
../statick_tool/plugins/tool/chktex_tool_plugin.py:8: in <module>
    from statick_tool.issue import Issue
E   ImportError: No module named 'statick_tool.issue'
_____________________________________________________________ ERROR collecting statick_tool/plugins/tool/lacheck_tool_plugin.py ______________________________________________________________
../statick_tool/plugins/tool/lacheck_tool_plugin.py:8: in <module>
    from statick_tool.issue import Issue
E   ImportError: No module named 'statick_tool.issue'
_________________________________________________ ERROR collecting tests/plugins/discovery/tex_discovery_plugin/test_tex_discovery_plugin.py _________________________________________________
../tests/plugins/discovery/tex_discovery_plugin/test_tex_discovery_plugin.py:5: in <module>
    from statick_tool.discovery_plugin import DiscoveryPlugin
E   ImportError: No module named 'statick_tool.discovery_plugin'
_________________________________________________ ERROR collecting tests/plugins/discovery/tex_discovery_plugin/test_tex_discovery_plugin.py _________________________________________________
ImportError while importing test module '/home/thomas/src/statick/statick-tex/tests/plugins/discovery/tex_discovery_plugin/test_tex_discovery_plugin.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../tests/plugins/discovery/tex_discovery_plugin/test_tex_discovery_plugin.py:5: in <module>
    from statick_tool.discovery_plugin import DiscoveryPlugin
E   ImportError: No module named 'statick_tool.discovery_plugin'

When I run this through Travis I get other errors. Examples of the tox output and self check errors are at:

https://travis-ci.org/tdenewiler/statick-tex/jobs/512740453
https://travis-ci.org/tdenewiler/statick-tex/jobs/512740458

Did you come up with a solution to running tox locally and in Travis when writing plugins in a separate repository?

P.S. I will work on expanding the README a lot to help others make plugins in the future, much like what is discussed in sscpac/statick#70.

Fix codecov

The output from Travis builds to codecov.io is not working. No test results are showing up at codecov. My suspicion is that it has to do with paths of files, as that is one of the things codecov says can go wrong: https://docs.codecov.io/docs/fixing-paths.

This seems to be backed up by Travis output:

../setup.py ...                                                          [  6%]
../plugins/__init__.py ...                                               [ 13%]
../plugins/tex_discovery_plugin/__init__.py ...                          [ 20%]
../plugins/tex_discovery_plugin/tex_discovery_plugin.py ...              [ 27%]
../plugins/tex_tool_plugins/__init__.py ...                              [ 34%]
../plugins/tex_tool_plugins/chktex_tool_plugin.py ...                    [ 41%]
../plugins/tex_tool_plugins/lacheck_tool_plugin.py ...                   [ 48%]
../tests/chktex_tool_plugin/test_chktex_tool_plugin.py ........          [ 67%]
../tests/lacheck_tool_plugin/test_lacheck_tool_plugin.py ........        [ 86%]
../tests/tex_discovery_plugin/test_tex_discovery_plugin.py ......        [100%]

That shows the path to the files relative to the repository structure. However, when determining line coverage the output is:

/home/travis/build/tdenewiler/statick-tex/.tox/py27/lib/python2.7/site-packages/statick_tool/plugins/discovery/tex_discovery_plugin.py      38      1    97%   27
/home/travis/build/tdenewiler/statick-tex/.tox/py27/lib/python2.7/site-packages/statick_tool/plugins/tool/chktex_tool_plugin.py             54      0   100%
/home/travis/build/tdenewiler/statick-tex/.tox/py27/lib/python2.7/site-packages/statick_tool/plugins/tool/lacheck_tool_plugin.py            53      0   100%

For some reason the line coverage is being determined relative to the .tox directory. This might have something to do with the remapping done to the files in setup.py.

I tried creating a .codecov.yml file that has mappings to fix the paths. The few patterns I tried did not work.

Sphinx documentation

Create documentation and build using sphinx. Publish that documentation to readthedocs and/or Github Pages. Do this as an Action on new tags, similar to how tags are packaged and published to PyPI.

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.