-
Notifications
You must be signed in to change notification settings - Fork 4
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
Major overhaul with cleanup and addition of type hints #13
Conversation
* Use display_error_dialog() instead of repeatedly calling wx.MessageDialog() * Fixup UI exception handling * Changed methods to snake_case
* Rename functions from CamelCase to snake_case * Restructure functions in node.py to be staticmethods in Node * Clean up confetest for pytest
* Restrict line length to 120. Break up long lines * Formatting changes * Add function docs * Change wx Dialogs to with contexts * Minor code changes
* Refactored conftest.py. Add new fixtures * Refactored test_odcompare.py * Change to dynamically compare py2 with py3 runtime during testing. Remove legacy_compare. * Updated lots of ODs * Improved profile loading * Load profile from env var ODG_PROFILE_PATH and support multiple entries * Fix import ordering (with isort) * Added loading name, description and type from EDS * Change profile default in Node to "None" * Migrate to use pathlib.Path (more remains) * Add '*' Mult to evaluate_node, which is used by certain profiles. Updated tests * Cleanup nosis. Remove unused deepcopy * Fix missing number (float) in JSON schema * Minor cleanups
* Fix encoding issues for OD files with unicode * Fix nosis quoting * Simplify stream handling in nosis. Add support for bytestream * Add --extra to pytest to test additional ODs * Add test fixture `py2_pickle` to read the verbatim OD data from py2 * Minor fixes
* Rename `Node.string_format()` to `Node.eval_name()` * Rename `Node.CompileValue` to `Node.eval_value()` * Add more py syntax support in `Node.evaulate_expression`
* Fix bugs in JSON OD * Remove wheel as requirement for GH actions * Move pytest and mypy config to pyproject.toml * Remove flake8
* Add type hints * Remove methods and merge functionality into existing * Remove the unused "extra"and "family" feature
* Added typing support
* Simplify Find* methods
* Nearly full typing coverage * Refactored methods for cleaner types * Node methods renamed, some deleted * Many Node methods rewritten as a result of typing uncovering bugs * NodeManager use .current as property to conditionally acces the current node * Many superflous methods removed from NodeManager
* Add support for legacy gen_cfiles in Node * Add to NodeProtocol
* Reduced min version to py 3.10
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
* Fix failure on reading the "need" field from node * Increase the viewport size of the index parts in GUI * Add error message if entering invalid data in GUI table editor * Fix bug where UI changes in the table didn't update the data * Added in-line documentation in ODStructTypes * Fix incorrect ValueError when having arrays * FIxed Node.DumpFile not guessing the filetype correctly * Fix handling of DOMAIN, which address #10 Testing * Add new "equiv_files" fixture to test equivalent files * Add test for testing `odg compare` * Added OD-file for DOMAIN and updated OD-files for consistency
Yocto receipe is failing....
|
@paletteguy This is because the python build system has changed. It has replaced PS! It seems you're tracking tip of main in the yocto build. That's cool for the latest and the greatest. main is development, but breakage like this might happen. For production use the latest release (e.g. from pypi) should be used. PPS! For further discissions, please post a new issue, as this PR is closed. |
This is a major change of objdictgen. After the removal of py2 support, it primary objective was to add full type hint support. However, the process of adding typing revealed many unfortunate coding patterns which have been cleaned up. This PR has become a large step towards modernizing objdictgen.
The object model, i.e. what the class contain and how the data is store have not been changed in this fixup.
Unit testing, through pytest have been implemented. Now, the test suite is not complete, especially for the UI parts, but it has been used to ensure that the file type handling and code generating parts remains intact.
The objdictgen version after this merge will be 3.4