djLint icon indicating copy to clipboard operation
djLint copied to clipboard

Started docstring and test coverage on Tag class

Open sveetch opened this issue 2 years ago • 3 comments

Pull Request Check List

Resolves: #168

  • [x] Added tests for changed code.
  • [x] Updated documentation for changed code.

This is and attempt to improve quality. I've started it from beast_mode as a draft. I made some tests to understand the project code and it leaded to documentation and reference tests so i would be able to know how to contribute to the new parser refactoring.

sveetch avatar Aug 08 '22 16:08 sveetch

@sveetch nice, thanks! What purpose does the makefile serve? Faster for you to get the project installed? I would personally add it to the gitignore.

The fixtures are looking good too. I'm still now completely satisfied with the html statements split into a list of strings, with the big print statement following, but we can revisit it.

Are you continuing to work this pr, or can I start merging it in?

Thanks!

christopherpickering avatar Aug 16 '22 12:08 christopherpickering

@christopherpickering yeah the Makefile is an easy entrypoint to install and performing some tasks around project. I tend to think this is commonly easier for people to quickly manipulate a project, instead of learning poetry or to learn other commands that poetry can not manage.

Whatever, i will remove it if you are not confident with it.

About the stage of this PR, it is not totally finished, i had some few method to cover for Tag, so don't merge it now, i will see when i can finish it this week, i will get back to you on discord to talk about all of this soon.

sveetch avatar Aug 16 '22 14:08 sveetch

@christopherpickering Ok i've finished the docstring and test coverage on Tag class.

Note than:

  • The tests i've done is in "reference_tests" directory since they are totally different of your ones from tests/ dir. In the end it should be merged in test/ dir but for now they should live appart;
  • There is many of "TODO" line which are notices about some incongruities and weird behaviors i found during coverage;
  • poetry.lock and pyproject.toml have been automatically updated by poetry because of the development environment enabled, i don't know enough poetry to avoid this, whatever you can omit these file changes;

Edit: Oh yeah also, i've squash my many commits to one (for history consistency) and push forced, so you better be to remove the branch locally, fetch it and create it again.

sveetch avatar Aug 21 '22 16:08 sveetch