Skip to content

feat: Safe-DS stubs also contain docstring information.#78

Merged
lars-reimann merged 20 commits intomainfrom
numpy-to-safeds-docstrings
Mar 22, 2024
Merged

feat: Safe-DS stubs also contain docstring information.#78
lars-reimann merged 20 commits intomainfrom
numpy-to-safeds-docstrings

Conversation

@Masara
Copy link
Copy Markdown
Contributor

@Masara Masara commented Mar 15, 2024

Summary of Changes

Added docstring information support for all docstring types, excluding attribute information for Epydoc docstrings.

The following is included:

  • Module docstring
  • Class parameter docstrings
  • Class attribute docstrings
  • docstrings for @property methods
  • Function parameter docstrings
  • Function result docstrings

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 15, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 10 0 0 0.99s
✅ PYTHON mypy 10 0 5.57s
✅ PYTHON ruff 10 0 0 0.04s
✅ REPOSITORY git_diff yes no 0.03s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@Masara
Copy link
Copy Markdown
Contributor Author

Masara commented Mar 16, 2024

@lars-reimann I don't understand why the tests fail here. The tests run without fail on my Windows machine (Python3.12.0) and on an Ubuntu VM (Python3.11.0rc1 & Python3.12.2). I didn't change anything important connected to the test__get_api that fails, since I mainly worked in the stub generator and the docstring test files and not the API part. I only changed one line in the test itself after it started failing here on github, hoping this line would fix it, but it was sadly to no avail.

@lars-reimann lars-reimann force-pushed the numpy-to-safeds-docstrings branch from a95175e to 29f0bd3 Compare March 18, 2024 11:53
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.24%. Comparing base (97b0ab3) to head (c0fdcd8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
+ Coverage   99.21%   99.24%   +0.02%     
==========================================
  Files          25       25              
  Lines        2176     2238      +62     
==========================================
+ Hits         2159     2221      +62     
  Misses         17       17              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lars-reimann
Copy link
Copy Markdown
Member

@Masara It should work now. Test IDs were not unique, which seems to lead to non-deterministic behavior for the snapshot tests.

@Masara Masara marked this pull request as ready for review March 20, 2024 09:30
@Masara Masara requested a review from a team as a code owner March 20, 2024 09:30
Copy link
Copy Markdown
Member

@lars-reimann lars-reimann left a comment

Choose a reason for hiding this comment

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

Thanks a lot.

@lars-reimann lars-reimann merged commit bdb43bd into main Mar 22, 2024
@lars-reimann lars-reimann deleted the numpy-to-safeds-docstrings branch March 22, 2024 12:07
lars-reimann pushed a commit that referenced this pull request Mar 29, 2024
## [0.2.0](v0.1.0...v0.2.0) (2024-03-29)

### Features

* Added generation for Safe-DS stubs files ([#33](#33)) ([ab45b45](ab45b45))
* Correct stubs for TypeVars ([#67](#67)) ([df8c5c9](df8c5c9)), closes [#63](#63)
* Create stubs for public methods of inherited internal classes ([#69](#69)) ([71b38d7](71b38d7)), closes [#64](#64)
* Rework import generation for stubs. ([#50](#50)) ([216e179](216e179)), closes [#38](#38) [#24](#24) [#38](#38) [#24](#24)
* Safe-DS stubs also contain docstring information. ([#78](#78)) ([bdb43bd](bdb43bd))
* Stubs are created for referenced declarations in other packages ([#70](#70)) ([522f38d](522f38d)), closes [#66](#66)

### Bug Fixes

* Some packages couldn't be analyzed ([#51](#51)) ([fa3d020](fa3d020)), closes [#48](#48)
* Stub generation testing and fixing of miscellaneous bugs ([#76](#76)) ([97b0ab3](97b0ab3))
@lars-reimann
Copy link
Copy Markdown
Member

🎉 This PR is included in version 0.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Included in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants