These are some very minor fixes for some errors/warnings I encountered when setting up my own environment.
Motivation and Context
When attempting to follow the existing installation guide, in which the typed_python root directory is added to PYTHONPATH, I ran into an issue where python was looking at the source files before the the built files, and throwing errors for the missing _types module. If this has been working for other people, maybe it is just my environment. Regardless, calling python setup.py install should put typed_python in the site-packages directory, which python looks at anyway.
I also cleaned up a couple warning messages I was getting with pytest, and it should now run without warnings.
Lastly, I moved all the tests to their own directory, to keep the source directory clean.
Approach
I have updated the installation README to reflect what worked for me in setting up a new development environment, and I have added a section on how to run pytest (the required packages for the tests are not all in requirements.txt)
I also added a pytest.ini file, which I'm using to suppress a spurious SyntaxWarning in operator_is_compilation_test.py. Its scope is limited so that it does not suppress other warnings. In the future, this ini file can be used to handle other similar cases.
How Has This Been Tested?
pytest
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist:
[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
These are some very minor fixes for some errors/warnings I encountered when setting up my own environment.
Motivation and Context
When attempting to follow the existing installation guide, in which the typed_python root directory is added to PYTHONPATH, I ran into an issue where python was looking at the source files before the the built files, and throwing errors for the missing _types module. If this has been working for other people, maybe it is just my environment. Regardless, calling
python setup.py install
should put typed_python in the site-packages directory, which python looks at anyway.I also cleaned up a couple warning messages I was getting with pytest, and it should now run without warnings.
Lastly, I moved all the tests to their own directory, to keep the source directory clean.
Approach
I have updated the installation README to reflect what worked for me in setting up a new development environment, and I have added a section on how to run pytest (the required packages for the tests are not all in requirements.txt)
I also added a pytest.ini file, which I'm using to suppress a spurious SyntaxWarning in operator_is_compilation_test.py. Its scope is limited so that it does not suppress other warnings. In the future, this ini file can be used to handle other similar cases.
How Has This Been Tested?
pytest
Types of changes
Checklist: