-
Notifications
You must be signed in to change notification settings - Fork 2
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
GlassBR: Minor technicality in comment in param.py #68
Comments
@samm82, please go ahead and make the proposed change to both param.py files. Is the same problem in the generated code for GlassBR? I'm not sure if we have comments in the generated code, but, I haven't looked. What are your thoughts on the two implementations: Python and Python_Simplified. Based on the names, it is tempting to remove Python and just focus on the simplified code. What is the difference between the two? |
Note: in future, should work in the caseStudies repo be done on branches? I forgot to for my current changes. It looks like focusing on the Python_Simplified code is a good idea, as discussed in JacquesCarette/Drasil#262 . Python_Simplified (PS) has a TestDocumentation folder that Python (P) does not. Also, the tests from P are saved in PS as OldTests, in addition to its own tests. The only concern I see is that certain implementations are drastically different from P to PS - I'm not sure how many examples you need, but here are some major ones from calculations.py: (forgive me if a table is the worst way to organize this)
|
Also, where can I find the generated code for GlassBR? |
|
There isn't a comment in the generated code; however, the input file lists the thickness as "10" instead of "10.0" as in #76 |
That seems like a bug in the input file there too. We'll need to make sure the generated code knows that input should be a The problem is the generated code isn't actually compiled & tested routinely. This is partly on purpose, as that would assume all Drasil devs need to have multiple development environments on their machine, which is too much to ask for. However, the Travis builds should! I thought there even was an issue for that too. |
@JacquesCarette It is a string - the problem is that the list of accepted glass thicknesses is: ["2.5", "2.7", "3.0", "4.0", "5.0", "6.0", "8.0", "10.0", "12.0", "16.0", "19.0", "22.0"], so "10" isn't recognized as being acceptable. It needs to be rendered as "10.0" as opposed to "10". |
Good! So it is a pure bug in the input file. |
@samm82, let us move to Python_Simplified. Please delete the Python folder with a note in the commit message that it is deprecated. It will stay under version control, so we can always look in the past to find it again. In looking at JacquesCarette/Drasil#262, I see that we are repeating conversations we have had in the past. Clearing out the Python folder will hopefully prevent us from going in the same circle again in the future. The issue you pointed to also shows that we expect the test cases to fail. I do not believe that they were properly updated, but @niazim3 can give you a better idea, since she worked on this issue last summer. The simplified code was created by @palmerst last summer when he refactored the GlassBR example for code generation. Steven used the interpolation following the documentation I wrote, instead of how it was done in the original code. The first version (in the Python folder) is a straight conversion of the original Fortran code. The original Fortran unintentionally obfuscated the underlying algorithm. This made code generation almost impossible. The new code (Python simplified) shows the connection to linear interpolation more clearly. |
@smiths I just noticed this now, but Python_Simplified doesn't have a Documentation folder, so it is missing the SRS and the MG. Should I copy the one from Python over to it? |
No, please do not copy the SRS and the MG to the Python_Simplified folder. Unless an SRS is very poorly written, it does not change with the implementation language. (The SRS should be abstract.) The design (MG) should also be language agnostic. This is why the Documentation and Implementation folders are at the same level of the folder hierarchy. The same documentation applies for all programming language Implementations. (We also don't have a separate SRS and MG for the C implementation - and we shouldn't!) All of the implementations share the same requirements and design. |
Right - ok, I think some changes I made to the README got undid somehow, so I had removed the Documentation reference in it previously. |
…s per #68; update README to reflect this change
…s per #68; updated README to reflect this change
@smiths Is this issue closed then? |
Yes, this issue can be closed. However, the test cases still fail. There is an issue for that #70. I have assigned you this issue along with @niazim3. The two of you should discuss this together. @elwazana is also working on testing documentation. Together you may want to propose modifications to the verification template that we are implicitly solving. |
One line 16 of both caseStudies/CaseStudies/glass/Implementations/Python/Implementation/param.py and caseStudies/CaseStudies/glass/Implementations/Python_Simplified/Implementation/param.py, it should read "(element of ["AN", "HS", "GT"])" because of the word 'element'.
Here is the line in Python, but it is the same in Python_Simplified:
caseStudies/CaseStudies/glass/Implementations/Python/Implementation/param.py
Line 16 in a7e8172
The text was updated successfully, but these errors were encountered: