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

Cleaner public API #53

Closed
lars-reimann opened this issue Feb 11, 2024 · 1 comment · Fixed by #54
Closed

Cleaner public API #53

lars-reimann opened this issue Feb 11, 2024 · 1 comment · Fixed by #54
Assignees
Labels
enhancement 💡 New feature or request released Included in a release

Comments

@lars-reimann
Copy link
Member

lars-reimann commented Feb 11, 2024

Is your feature request related to a problem?

Currently, all declarations reside in public modules (file names have no leading underscore), even though most are only needed internally. Moreover, the functions used by the DSL for code generation are nested deeply, which leads to long imports and calls and ultimately badly readable code:

f((safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], [])) < (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], [])))

Desired solution

  1. Make everything internal that does not need to be used from the outside.

  2. Simplify usages of functions that are needed from the outside:

    • safeds_runner.server.pipeline_manager.runner_memoized_function_call -> safeds_runner.memoized_call
    • safeds_runner.server.pipeline_manager.runner_save_placeholder -> safeds_runner.save_placeholder
    • safeds_runner.server.pipeline_manager.runner_filemtime -> safeds_runner.file_mtime.

    This can be done by a) renaming functions to the desired name and b) adding imports to __init__ files. The functions need not be moved.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

@lars-reimann lars-reimann added the enhancement 💡 New feature or request label Feb 11, 2024
@lars-reimann lars-reimann added this to DSL Feb 11, 2024
@github-project-automation github-project-automation bot moved this to Backlog in DSL Feb 11, 2024
@lars-reimann lars-reimann self-assigned this Feb 21, 2024
@lars-reimann lars-reimann moved this from Backlog to In Progress in DSL Feb 21, 2024
@lars-reimann lars-reimann linked a pull request Feb 21, 2024 that will close this issue
lars-reimann added a commit that referenced this issue Feb 22, 2024
Closes #53

### Summary of Changes

Define a small public interface consisting of
* `safeds_runner.file_mtime`,
* `safeds_runner.memoized_call`,
* `safeds_runner.save_placeholder`.

These are used by the code generator of the
[DSL](https://github.com/Safe-DS/DSL).
@github-project-automation github-project-automation bot moved this from In Progress to ✔️ Done in DSL Feb 22, 2024
lars-reimann pushed a commit that referenced this issue Feb 22, 2024
## [0.7.0](v0.6.0...v0.7.0) (2024-02-22)

### Features

* cleaner public api ([#54](#54)) ([6d8dde7](6d8dde7)), closes [#53](#53)
@lars-reimann
Copy link
Member Author

🎉 This issue has been resolved in version 0.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 💡 New feature or request released Included in a release
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant