Giter Site home page Giter Site logo

Comments (4)

keiyamamo avatar keiyamamo commented on August 28, 2024

Right now, environment.yml specifies python version to be 3.10, but I do not know if we need python 3.10.
We can downgrade python version to, for example, 3.8 and change the documentation to say that turtle works with python<3.9 instead of updating this function.

- python=3.10

What do you think, @johannesring @jorgensd ?

from turtlefsi.

jorgensd avatar jorgensd commented on August 28, 2024

Right now, environment.yml specifies python version to be 3.10, but I do not know if we need python 3.10. We can downgrade python version to, for example, 3.8 and change the documentation to say that turtle works with python<3.9 instead of updating this function.

- python=3.10

What do you think, @johannesring @jorgensd ?

Python 3.7 is EOL (end of life) in June, so I wouldn't bother supporting it.
However, we should support Python3.8.
Thus I've made #47 that only enforces a min bound on the python env, and we can test it with anaconda.

from turtlefsi.

johannesring avatar johannesring commented on August 28, 2024

I ran into the same problem in Oasis not long ago and fixed it by using list(element) instead of element.getchildren() as written in the documentation. For turtleFSI this would be:

--- a/turtleFSI/problems/__init__.py
+++ b/turtleFSI/problems/__init__.py
@@ -419,14 +419,14 @@ def merge_xml_files(files):
     # Get last timestep of first tree
     base_tree = trees[indexes[0]]
     last_node = base_tree.getroot()[0][0][-1]
-    ind = 1 if len(last_node.getchildren()) == 3 else 2
+    ind = 1 if len(list(last_node)) == 3 else 2
     last_timestep = float(last_node[ind].attrib["Value"])
 
     # Append
     for index in indexes[1:]:
         tree = trees[index]
-        for node in tree.getroot()[0][0].getchildren():
-            ind = 1 if len(node.getchildren()) == 3 else 2
+        for node in list(tree.getroot()[0][0]):
+            ind = 1 if len(list(node)) == 3 else 2
             if last_timestep < float(node[ind].attrib["Value"]):
                 base_tree.getroot()[0][0].append(node)
                 last_timestep = float(node[ind].attrib["Value"])

from turtlefsi.

keiyamamo avatar keiyamamo commented on August 28, 2024

solved #50

from turtlefsi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.