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

Reconcile _some_ conflicting/implicit knowledge about 'program' names during generation of various artifacts #3665

Merged
merged 6 commits into from
Nov 11, 2023

Conversation

balacij
Copy link
Collaborator

@balacij balacij commented Sep 17, 2023

Closes #3565
Builds on #3667

Instead of writing a description, I will annotate the code through a review. This PR is largely a follow-up to PR #3550 / Issue #3545.

@balacij balacij changed the title Reconcile _some_ implicit knowledge about 'program' names during generation of various artifacts Reconcile _some_ conflicting/implicit knowledge about 'program' names during generation of various artifacts Sep 17, 2023
code/Makefile Show resolved Hide resolved
code/Makefile Show resolved Hide resolved
code/Makefile Show resolved Hide resolved
code/drasil-website/lib/Drasil/Website/CaseStudy.hs Outdated Show resolved Hide resolved
</li>
<li>
Generated Code:
<ul class="list">
<li>
PD_Controller <a href="https://github.com/JacquesCarette/Drasil/tree/master/code/stable/pd_controller/src/python">[Python]</a> <a href="https://github.com/JacquesCarette/Drasil/tree/master/code/stable/pd_controller/src/csharp">[C Sharp]</a> <a href="https://github.com/JacquesCarette/Drasil/tree/master/code/stable/pd_controller/src/java">[Java]</a> <a href="https://github.com/JacquesCarette/Drasil/tree/master/code/stable/pd_controller/src/cpp">[C++]</a>
PDController <a href="https://github.com/JacquesCarette/Drasil/tree/master/code/stable/pdcontroller/src/python">[Python]</a> <a href="https://github.com/JacquesCarette/Drasil/tree/master/code/stable/pdcontroller/src/csharp">[C Sharp]</a> <a href="https://github.com/JacquesCarette/Drasil/tree/master/code/stable/pdcontroller/src/java">[Java]</a> <a href="https://github.com/JacquesCarette/Drasil/tree/master/code/stable/pdcontroller/src/cpp">[C++]</a>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here is the resultant 'actual' fix. Note that the name shown here doesn't align with the name shown on line 239!

Why? Well, the top-level <li> nodes show the main abbreviation, but this is the name of the final 'executable program/project/case study, taking into consideration the choices'. Following in line with how the other projects (including the multi-src Projectile case study in mind), we use the name of the 'executable program', left uppercase.

If we wanted to make this name lowercase, we can, similar to how this name is done everywhere else. If we wanted to avoid putting the name of the case study here again, we can (I would prefer this, but I thought I was pushing the boundary of this PR too much now). If we want to include the space, we can. Ultimately, I didn't quite know what name we wanted here, but finally, it notes the 'real' issue here:

We have impromptu naming and calculation of things everywhere. This PR is specifically about the name of PD Controller and how we propagate it, but us having the freedom of Haskell is a bit of a double-edged sword here, whereby we can have impromptu temporary code placed anywhere that breaks uniformity and actual knowledge captured for a specific 'fix'.

code/stable/pdcontroller/src/cpp/Makefile Show resolved Hide resolved
@balacij balacij marked this pull request as ready for review September 17, 2023 00:44
@balacij
Copy link
Collaborator Author

balacij commented Sep 17, 2023

Ultimately, the solution isn't complex, but it does rely on how we want to format the abbreviations of our case studies in different scenarios.

Copy link
Owner

@JacquesCarette JacquesCarette left a comment

Choose a reason for hiding this comment

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

Please disentangle these two PRs.

code/drasil-gen/lib/Language/Drasil/Dump.hs Outdated Show resolved Hide resolved
@balacij balacij marked this pull request as draft October 5, 2023 21:44
@balacij balacij marked this pull request as ready for review October 6, 2023 17:34
@JacquesCarette JacquesCarette merged commit 60c680d into master Nov 11, 2023
5 checks passed
@JacquesCarette JacquesCarette deleted the fixPDControllerNameWebsite branch November 11, 2023 18:19
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 this pull request may close these issues.

PD Controller example is labelled as "PD_Controller" instead of "PDController" on website
3 participants