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

Docstring parsing improvements #1214

Merged
merged 10 commits into from Nov 10, 2017
Merged

Docstring parsing improvements #1214

merged 10 commits into from Nov 10, 2017

Conversation

bqpd
Copy link
Contributor

@bqpd bqpd commented Nov 8, 2017

Closes #1198

nomen.py Outdated

The above variables are sufficient, but let's introduce more anyway:

Other Variables

Choose a reason for hiding this comment

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

Other is confusing. * Variables

@bqpd
Copy link
Contributor Author

bqpd commented Nov 9, 2017

note to self: make

    """
    Variables
    ---------
    m    [kg ]  Motor mass
    W    [lbf]  Motor weight
    Pmax [W  ]  Max power
    """

throw a meaningful error

@mjburton11
Copy link

why does that throw an error?

@bqpd
Copy link
Contributor Author

bqpd commented Nov 9, 2017

spaces in the unit declarations!

@mjburton11
Copy link

why is that a bad thing?

@mjburton11
Copy link

Ok I tried this for the first time convexengineering/gplibrary@9d78070 and I really like it.

@mjburton11
Copy link

I want to get this merged

@mjburton11
Copy link

Ok I have a problem on convexengineering/gplibrary@c1b7c9b, the functions in the docstring don't seem to be working. Running wing_test.py

/Users/mjburton11/MIT/GPKIT/library/gpkitmodels/GP/aircraft/wing/wing.py in return_c(self, c)
     44         " return normalized chord distribution "
     45         return np.array([2./(1+c[self.lam])*(1+(c[self.lam]-1)*e) for e
---> 46                          in c[self.eta]])
     47 
     48     def return_cmac(self, c):

AttributeError: 'Planform' object has no attribute 'eta'

@bqpd
Copy link
Contributor Author

bqpd commented Nov 10, 2017

@mjburton11 the problem was the spaces in np.linspace(0,1,5) in the declaration of eta

@bqpd
Copy link
Contributor Author

bqpd commented Nov 10, 2017

I used a print parse_variables(Planform.__doc__) line to debug

@bqpd
Copy link
Contributor Author

bqpd commented Nov 10, 2017

test models please

@bqpd bqpd merged commit 53eef91 into master Nov 10, 2017
@bqpd bqpd deleted the fix1198 branch November 10, 2017 05:35
@bqpd
Copy link
Contributor Author

bqpd commented Nov 10, 2017

@mjburton11 it's now on master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants