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

Add windows darglint test batch file #544

Merged
merged 3 commits into from Feb 20, 2023

Conversation

PeterYusuke
Copy link
Contributor

@PeterYusuke PeterYusuke commented Feb 15, 2023

All Submissions:

Type of change

Please delete options that are not relevant.

Description

For windows contributers, checking poetry run darglint command is hard to execute.
We manually check each changed file.
I want add this batch file, so that windows users easily execute test command.

Usage

Execute darglint_test.bat file or export to text. (ie. darglint_test.bat > darglint_test.txt)

About test result

The batch always complete test and export log, regardless darglint has any error.
To check errors, please see the log like below.

Successful tests
It will show pc.py twice but ignore them because it is skipped.

"start darglint"
"pynecone folder"
Your\project\directory\pynecone\app.py
Your\project\directory\pynecone\base.py
...
Your\project\directory\pynecone\middleware\middleware.py
Your\project\directory\pynecone\middleware\__init__.py
"tests folder"
Your\project\directory\tests\middleware\conftest.py
Your\project\directory\tests\middleware\test_app.py
...
Your\project\directory\tests\middleware\tests\components\graphing\test_victory_data.py
Your\project\directory\tests\middleware\tests\components\layout\test_cond.py
"darglint finished"

Failed test
When there is error, it will show error messages and new line like below.

"start darglint"
"pynecone folder"
...
Your\project\directory\pynecone\utils.py
Your\project\directory\pynecone\var.py
Your\project\directory\pynecone\var.py:__ror__:581: DAR101: - other     <- here is error
                                                                        <- and new line
Your\project\directory\pynecone\__init__.py
...

Copy link
Contributor

@picklelo picklelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding - can we make a scripts/ directory and put this file in there to keep the project root clean?

@PeterYusuke
Copy link
Contributor Author

Thanks for adding - can we make a scripts/ directory and put this file in there to keep the project root clean?

Sure!
Let me check where you put it.
I will change the path and check if works.

├─pynecone
│  ├─.templates
│  │  └─...
│  ├─compiler
│  │  └─...
│  └─...
├─scripts
│  └─darglint_test.bat     <- here?
└─tests
   ├─compiler
   │  └─...
   └─...

@picklelo
Copy link
Contributor

Yup that works great - I'm guessing we will have more scripts over time

@picklelo picklelo merged commit a0967fc into reflex-dev:main Feb 20, 2023
@PeterYusuke PeterYusuke deleted the windows-test branch February 20, 2023 07:01
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