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

SE: Add type hints throughout #349

Closed
ashiklom opened this issue Jun 6, 2024 · 0 comments · Fixed by #417
Closed

SE: Add type hints throughout #349

ashiklom opened this issue Jun 6, 2024 · 0 comments · Fixed by #417
Assignees

Comments

@ashiklom
Copy link
Collaborator

ashiklom commented Jun 6, 2024

https://docs.python.org/3/library/typing.html

Not strictly necessary, but these should help make the SWELL source code a bit easier to reason about, especially for new SWELL developers. Using more specific types (possibly defined strictly via something like Pydantic) would make this even more useful.

@ashiklom ashiklom self-assigned this Jun 6, 2024
mranst added a commit to mranst/swell that referenced this issue Sep 11, 2024
mranst added a commit to mranst/swell that referenced this issue Sep 11, 2024
@Dooruk Dooruk linked a pull request Sep 13, 2024 that will close this issue
ashiklom added a commit that referenced this issue Sep 17, 2024
* sles15 is now default platform, added to docs reflecting this and other additions (#407)

* swell_static_files_user in config now used in appropriate tasks (#360)

* addressed potential error on abort caused by undefined logger call

* renamed datetime utility to avoid hinting confusion with base package, added type hinting (#349)

* type hinting for all python methods (#349)

* removed unnecessary pass of logger to functions copy_platform_files and copy_eva_files

* type hinting in run_geos_executable uses Optional

* Hinting changes, Logger properly type hinted, pd.DataFrame now used, typing.Optional used where appropriate

* Update docs/configuring_cylc.md

Co-authored-by: Alexey Shiklomanov <[email protected]>

* added proper hinting for SilentUndefined instance in jinja2.py

* proper syntax for linking docs

* direct type hinting for FileHandler objects

* added Optional typing where appropriate

* added missing type hint in run_jedi_hofx_executable.py, fixed missing typing functions

* more types in hint

* more precise type hinting

* Resolved code test error

* more specific type hinting per mypy

* corrected logger instance in type hint

* Revised type hinting

* Revised datetime typing, other refinements

* Further revised type hinting

* Update src/swell/utilities/render_jedi_interface_files.py

Updated type hint to optional for consistency

Co-authored-by: Alexey Shiklomanov <[email protected]>

---------

Co-authored-by: Alexey Shiklomanov <[email protected]>
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 a pull request may close this issue.

1 participant