mdolab / CMPLXFOIL

GNU General Public License v2.0
29 stars 20 forks source link

Fix plotting and update niceplots commands #21

Closed eytanadler closed 1 year ago

eytanadler commented 1 year ago

Purpose

The matplotlib imports worked only sometimes, which this PR fixes. The error was because import matplotlib does not import pyplot automatically, so the pyplot attribute was unavailable when it was requested from matplotlib.

The second change is that the niceplots interface has been changed in version 2, so I updated it here (and the minimum version in setup.py).

Expected time until merged

Instantaneously

Type of change

Testing

Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #21 (5a7d438) into main (d5dad00) will increase coverage by 0.13%. The diff coverage is 57.14%.

@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   78.36%   78.50%   +0.13%     
==========================================
  Files           4        4              
  Lines         564      563       -1     
==========================================
  Hits          442      442              
+ Misses        122      121       -1     
Impacted Files Coverage Δ
cmplxfoil/CMPLXFOIL.py 83.72% <50.00%> (+0.17%) :arrow_up:
cmplxfoil/__init__.py 66.66% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

bernardopacini commented 1 year ago

Broader question: is it worth moving the airfoil plotting to a different file?

A-CGray commented 1 year ago

Broader question: is it worth moving the airfoil plotting to a different file?

I think no, given that there's only one plotting function atm, but in future we add more then maybe

eytanadler commented 1 year ago

Broader question: is it worth moving the airfoil plotting to a different file?

IMO it's nice to be able to do this:

funcs = {}
CFDSolver(ap)
CFDSolver.evalFunctions(ap, funcs)
CFDSolver.plotAirfoil()

There is a separate file for generating animations if you so desire Coach B.