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

Clean up nitclk docs #1043

Merged
merged 132 commits into from
Sep 25, 2019
Merged

Clean up nitclk docs #1043

merged 132 commits into from
Sep 25, 2019

Conversation

texasaggie97-zz
Copy link
Contributor

  • This contribution adheres to CONTRIBUTING.md.
  • I've updated CHANGELOG.md if applicable.
  • I've added tests applicable for this pull request

What does this Pull Request accomplish?

  • Makes class.rst more presentable for nitclk
    • Move functions first since attributes are an advanced use case for NI-TClk
    • Do better with headers that show up in the TOC
    • Add simple documentatuin for SessionReference and the functions

List issues fixed by this Pull Request below, if any.

What testing has been done?

  • Visual inspection of generated files
  • Visual inspection of html

@codecov
Copy link

codecov bot commented Sep 19, 2019

Codecov Report

Merging #1043 into master will increase coverage by 0.2%.
The diff coverage is 72.72%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1043     +/-   ##
=========================================
+ Coverage   89.78%   89.98%   +0.2%     
=========================================
  Files          20       20             
  Lines        3621     3674     +53     
=========================================
+ Hits         3251     3306     +55     
+ Misses        370      368      -2
Impacted Files Coverage Δ
generated/nitclk/session.py 94.61% <ø> (+2.01%) ⬆️
build/helper/metadata_add_all.py 81.17% <66.66%> (-0.2%) ⬇️
build/helper/documentation_helper.py 88.58% <75%> (-0.26%) ⬇️
generated/nifake/_converters.py 94.15% <0%> (+0.08%) ⬆️
generated/nifake/session.py 97.62% <0%> (+0.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b317830...78308ce. Read the comment docs.

@texasaggie97-zz texasaggie97-zz changed the title [#1041] Clean up nitclk docs Clean up nitclk docs Sep 24, 2019
@@ -352,7 +352,10 @@ def _replace_attribute_python_name(a_match):
aname = attr['name'].lower()

if config['make_link']:
return ':py:data:`{0}.Session.{1}`'.format(config['module_name'], aname)
if config['module_name'] == 'nitclk':
Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty uncomfortable adding conditional logic based on specific module names to the code-generator logic.
We should really try to keep this generic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How? What can we key on instead?

Copy link
Member

Choose a reason for hiding this comment

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

If driver config had:

  • Name of the main class
  • Add properties to main class
  • Add functions as methods to main class

Could we then make better reuse of the templates and get rid of this conditional logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but to quote a top notch engineer from a different review "The medicine is worse than the disease".

It would remove using 'nitclk' in the conditionals here (but not remove them), and session.py.mako would become much more complicated and less easy to follow with the conditionals there surrounding large blocks of code.

And I don't think it would be enough to combine the nitclk session.py.mako with the generic one. Or if it is, it would become even more complicated.

Copy link
Member

Choose a reason for hiding this comment

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

Feels very wrong and hacky, but I can see it being the pragmatic solution. At least we tried.

@texasaggie97-zz texasaggie97-zz dismissed marcoskirsch’s stale review September 24, 2019 22:28

Comments addressed pending question

@marcoskirsch marcoskirsch merged commit 1420e30 into master Sep 25, 2019
@marcoskirsch marcoskirsch deleted the add_tclk/update_docs branch September 25, 2019 16:28
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.

2 participants