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

Do Not Merge, #945

Closed
wants to merge 208 commits into from
Closed

Conversation

berndhahnebach
Copy link
Contributor

We are in bug fixing for GSoC project FEM elmer and would like to run the Travis tests ...

cheers bernd

@berndhahnebach
Copy link
Contributor Author

Does someone know why it does not load the modules on linux?

test_pyimport_all_FEM_modules (TestFem.FemTest) ... /usr/local/Mod/Fem/ 
/usr/local/Mod/Fem/PyObjects/ 
Try importing FemConstraint ... 
ERROR

it works on my local machine ?!

<string>sdfsdfsdfds</string>
</property>
<property name="text">
<string>Depreciated</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be Deprecated ?

@drhooves
Copy link
Contributor

======================================================================
ERROR: test_pyimport_all_FEM_modules (TestFem.FemTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/Mod/Fem/TestFem.py", line 381, in test_pyimport_all_FEM_modules
    __import__('{0}'.format(mod))  # to get an error message what was going wrong
  File "/usr/local/Mod/Fem/FemConstraint.py", line 29, in <module>
    from pivy import coin
ImportError: No module named 'pivy'

----------------------------------------------------------------------

Could it be that travis doesn't have pivy installed? It's only required by the GUI, not for the app tests. If so we have to guard the import with if App.GuiUp.

======================================================================
ERROR: test_static_freq_analysis (TestFem.FemCcxAnalysisTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/Mod/Fem/TestFem.py", line 572, in test_static_freq_analysis
    solver_ccx2_object = ObjectsFem.makeSolverCalculix('CalculiX')
  File "/usr/local/Mod/Fem/ObjectsFem.py", line 347, in makeSolverCalculix
    import FemCalculix.SolverObject
  File "/usr/local/Mod/Fem/FemCalculix/SolverObject.py", line 177
    print pattern
                ^
SyntaxError: Missing parentheses in call to 'print'

Looks like a python3 error?!

@berndhahnebach
Copy link
Contributor Author

Could it be that travis doesn't have pivy installed? It's only required by the GUI, not for the app tests. If so we have to guard the import with if App.GuiUp.

ATM in Fem Gui modules are seperated from App modules, thus I did not need to guide it by a GuiUp test.

Python3 needs print('hello')

@berndhahnebach
Copy link
Contributor Author

fixed al above ...

@berndhahnebach
Copy link
Contributor Author

berndhahnebach commented Aug 31, 2017

damn I just guarded the imports, but we would need to guard the whole ViewProviderClass ?! To not have such problems was one of the reason for splitting all Python modules in GUI and nonGUI part in FEM.

I would guard the whole viewprovider for now ?!

bernd

@berndhahnebach
Copy link
Contributor Author

57c1985

I do not really like it but I'm curious if it passes the tests thus I just implemented it.

bernd

@berndhahnebach berndhahnebach force-pushed the femnewsolver branch 3 times, most recently from c1e3647 to 9b15382 Compare August 31, 2017 21:23
@drhooves
Copy link
Contributor

drhooves commented Sep 1, 2017

No we don't need to guard the whole view provider proxy. The arch workbench does it the same way, can't tell which way is better but splitting generates alot of modules with just 3-4 lines of code.

@berndhahnebach
Copy link
Contributor Author

No we don't need to guard the whole view provider proxy. The arch workbench does it the same way, can't tell which way is better but splitting generates alot of modules with just 3-4 lines of code.

IT was my misstake. The import FreeCAD was missing. It is all in here: See 63d38cb

ATM py3 seams to fail here: https://github.com/berndhahnebach/FreeCAD_bhb/blob/d01289fa75383f1794d388a6563f4792c2e1f057/src/Mod/Fem/ObjectsFem.py#L348

do not know why?

@drhooves
Copy link
Contributor

drhooves commented Sep 2, 2017

It's because in python3 print is a function, is it not? We could put from __future__ import print_function at the beginning of the file. That would make python2 support the new syntax too.

@berndhahnebach
Copy link
Contributor Author

sure, if there are prints without brackets py3 fails. But AFAIK I fixed all prints. Is there still an old print without brackets somewhere in your code?

bernd

@berndhahnebach berndhahnebach force-pushed the femnewsolver branch 4 times, most recently from c95c0e5 to 78470fd Compare September 10, 2017 22:00
@berndhahnebach
Copy link
Contributor Author

berndhahnebach commented Sep 10, 2017

@berndhahnebach
Copy link
Contributor Author

:-)

@sasobadovinac
Copy link
Contributor

👍 is it ready to merge?

@@ -303,7 +303,7 @@ def makeMeshNetgen(doc, name="FEMMeshNetgen"):


def makeMeshRegion(doc, base_mesh, element_length=0.0, name="FEMMeshRegion"):
'''makeMeshRegion(document, base_mesh, [element_length] [name]): creates a FEM mesh region object to define properties for a regon of a FEM mesh'''
'''makeMeshRegion(document, base_mesh, [element_length], [name]): creates a FEM mesh region object to define properties for a regon of a FEM mesh'''
Copy link
Contributor

Choose a reason for hiding this comment

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

@berndhahnebach regon->region

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@berndhahnebach
Copy link
Contributor Author

continues here: #1076

due to commit ce68094 a rebase makes no sence anymore ...

@berndhahnebach berndhahnebach deleted the femnewsolver branch November 14, 2017 06:31
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.

None yet

4 participants