Conversation
Contributor
|
I had some ideas on how to use the check on the original issue (#1289) - it is kind of similar to your idea but a little different |
| deprecated_vars = [] | ||
| renamed_vars = [] | ||
| deprecated_variables_file = get_path('utils/deprecated_variables.csv') | ||
| with open(deprecated_variables_file, newline='') as f: |
Member
There was a problem hiding this comment.
I am glad that you did this!
Might be easier if you just stored the deprecated var information in a dictionary keyed by the strings in the first column (old varnames).
{ "aircraft:design:thrust_takeoff_per_eng" : (removed, '#1142','1.0.0'), ...
Then you don't have to read a file, and the logic for checking it becomes
if var_name in deprecated_vars:
raise error and give new name and info
else:
raise warning that the name wasn't found.
Member
|
Here is a little migration guide I made that might help catch some more variables. I closed my PR since it is stale, and your solution is a better approach. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR targeted Issue #1289. I am sure this is not the final version but maybe a good point to start.
Related Issues
Backwards incompatibilities
None
AI Usage
None