Skip to content

Commit

Permalink
Add tclk session template (#1027)
Browse files Browse the repository at this point in the history
* Add initial metadata

* Create nitclk.mak

* Remove numpy restriction

Bug fixed

* Upgrade pip

* Remove specific version of flake8

'\' in comments now need to be escaped

* Add basepython section

* Try using pypy3.5

* Go back to pypy3 and remove basepython block

* Don't need to run build_test for all builds - only 3.6

* Remove warning from coverage

* Undo previous change

* Try disabling faulthandler

* Remove --no-faulthandler

* pypy needs an older version of pytest

See pytest-dev/pytest#5807

* Use platform_python_implementation since implementation_name is not defined on Python2

* Try to get back to the initial coverage

* Do the same thing for build_test

* Remove redundant pip

* Add codecov file to try to control limits for passing

* Enable nitclk build

* There are some files we will need to skip for now

* Add generated nitclk files

* Update generated files

* Can't skip README.rst

* Update templates

* Add new cases for buffers with a converter

* Need to handle ' []' to normalize everything

* Get the session handle name from config instead of hardcoding 'vi'

* Temp commit

* Fix syntax error

* Test new cases

* Force change

* Update generated files

* Update generated files

* Add different target for pr (project) and commit (patch)

* threshold should be number

* Renumber scaler cases to be in order used in the code

* Update generated files

* Renumber buffer cases to match order used in code

* Move and rename test to match case (C020)

* Update generated files

* Add nitclk specific session template

* No longer need to skip generating session.py

* Add new session.py

* Update generated files

* Don't need the extra line

* Don't need the extra line

* Update generated files

* get_session_number() is now private

* Remove repeated calabilities list

* Don't need if since we know tclk has attributes

* Change session handle name

* Update generated files

* Change attribute class name to remove ViInt32

* Update generated files

* Update docstring
  • Loading branch information
texasaggie97-zz committed Sep 19, 2019
1 parent 8da41e7 commit adbfebe
Show file tree
Hide file tree
Showing 26 changed files with 1,412 additions and 41 deletions.
2 changes: 1 addition & 1 deletion build/templates/_attributes.py.mako
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class AttributeEnum(object):


# nitclk specific attribute type
class AttributeViInt32SessionReference(Attribute):
class AttributeSessionReference(Attribute):

def __get__(self, session, session_type):
# Import here to avoid a circular dependency when initial import happens
Expand Down
4 changes: 2 additions & 2 deletions build/templates/_converters.py.mako
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,12 @@ def convert_to_nitclk_session_number(item):
- NI-TClk Session Num
'''
try:
return item.tclk.get_session_number()
return item.tclk._get_session_number()
except KeyError:
pass

try:
return item.get_session_number()
return item._get_session_number()
except KeyError:
pass

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = '1.1.3.dev0'
release = '0.1.0.dev0'
# The short X.Y version.
version = release[:3]

Expand Down
2 changes: 1 addition & 1 deletion generated/nidcpower/_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __set__(self, session, value):


# nitclk specific attribute type
class AttributeViInt32SessionReference(Attribute):
class AttributeSessionReference(Attribute):

def __get__(self, session, session_type):
# Import here to avoid a circular dependency when initial import happens
Expand Down
4 changes: 2 additions & 2 deletions generated/nidcpower/_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ def convert_to_nitclk_session_number(item):
- NI-TClk Session Num
'''
try:
return item.tclk.get_session_number()
return item.tclk._get_session_number()
except KeyError:
pass

try:
return item.get_session_number()
return item._get_session_number()
except KeyError:
pass

Expand Down
2 changes: 1 addition & 1 deletion generated/nidigital/_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __set__(self, session, value):


# nitclk specific attribute type
class AttributeViInt32SessionReference(Attribute):
class AttributeSessionReference(Attribute):

def __get__(self, session, session_type):
# Import here to avoid a circular dependency when initial import happens
Expand Down
4 changes: 2 additions & 2 deletions generated/nidigital/_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ def convert_to_nitclk_session_number(item):
- NI-TClk Session Num
'''
try:
return item.tclk.get_session_number()
return item.tclk._get_session_number()
except KeyError:
pass

try:
return item.get_session_number()
return item._get_session_number()
except KeyError:
pass

Expand Down
2 changes: 1 addition & 1 deletion generated/nidmm/_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __set__(self, session, value):


# nitclk specific attribute type
class AttributeViInt32SessionReference(Attribute):
class AttributeSessionReference(Attribute):

def __get__(self, session, session_type):
# Import here to avoid a circular dependency when initial import happens
Expand Down
4 changes: 2 additions & 2 deletions generated/nidmm/_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ def convert_to_nitclk_session_number(item):
- NI-TClk Session Num
'''
try:
return item.tclk.get_session_number()
return item.tclk._get_session_number()
except KeyError:
pass

try:
return item.get_session_number()
return item._get_session_number()
except KeyError:
pass

Expand Down
2 changes: 1 addition & 1 deletion generated/nifake/_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __set__(self, session, value):


# nitclk specific attribute type
class AttributeViInt32SessionReference(Attribute):
class AttributeSessionReference(Attribute):

def __get__(self, session, session_type):
# Import here to avoid a circular dependency when initial import happens
Expand Down
4 changes: 2 additions & 2 deletions generated/nifake/_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ def convert_to_nitclk_session_number(item):
- NI-TClk Session Num
'''
try:
return item.tclk.get_session_number()
return item.tclk._get_session_number()
except KeyError:
pass

try:
return item.get_session_number()
return item._get_session_number()
except KeyError:
pass

Expand Down
2 changes: 1 addition & 1 deletion generated/nifgen/_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __set__(self, session, value):


# nitclk specific attribute type
class AttributeViInt32SessionReference(Attribute):
class AttributeSessionReference(Attribute):

def __get__(self, session, session_type):
# Import here to avoid a circular dependency when initial import happens
Expand Down
4 changes: 2 additions & 2 deletions generated/nifgen/_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ def convert_to_nitclk_session_number(item):
- NI-TClk Session Num
'''
try:
return item.tclk.get_session_number()
return item.tclk._get_session_number()
except KeyError:
pass

try:
return item.get_session_number()
return item._get_session_number()
except KeyError:
pass

Expand Down
4 changes: 2 additions & 2 deletions generated/nimodinst/_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ def convert_to_nitclk_session_number(item):
- NI-TClk Session Num
'''
try:
return item.tclk.get_session_number()
return item.tclk._get_session_number()
except KeyError:
pass

try:
return item.get_session_number()
return item._get_session_number()
except KeyError:
pass

Expand Down
2 changes: 1 addition & 1 deletion generated/niscope/_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __set__(self, session, value):


# nitclk specific attribute type
class AttributeViInt32SessionReference(Attribute):
class AttributeSessionReference(Attribute):

def __get__(self, session, session_type):
# Import here to avoid a circular dependency when initial import happens
Expand Down
4 changes: 2 additions & 2 deletions generated/niscope/_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ def convert_to_nitclk_session_number(item):
- NI-TClk Session Num
'''
try:
return item.tclk.get_session_number()
return item.tclk._get_session_number()
except KeyError:
pass

try:
return item.get_session_number()
return item._get_session_number()
except KeyError:
pass

Expand Down
4 changes: 2 additions & 2 deletions generated/nise/_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ def convert_to_nitclk_session_number(item):
- NI-TClk Session Num
'''
try:
return item.tclk.get_session_number()
return item.tclk._get_session_number()
except KeyError:
pass

try:
return item.get_session_number()
return item._get_session_number()
except KeyError:
pass

Expand Down
2 changes: 1 addition & 1 deletion generated/niswitch/_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __set__(self, session, value):


# nitclk specific attribute type
class AttributeViInt32SessionReference(Attribute):
class AttributeSessionReference(Attribute):

def __get__(self, session, session_type):
# Import here to avoid a circular dependency when initial import happens
Expand Down
4 changes: 2 additions & 2 deletions generated/niswitch/_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ def convert_to_nitclk_session_number(item):
- NI-TClk Session Num
'''
try:
return item.tclk.get_session_number()
return item.tclk._get_session_number()
except KeyError:
pass

try:
return item.get_session_number()
return item._get_session_number()
except KeyError:
pass

Expand Down
2 changes: 1 addition & 1 deletion generated/nitclk/_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __set__(self, session, value):


# nitclk specific attribute type
class AttributeViInt32SessionReference(Attribute):
class AttributeSessionReference(Attribute):

def __get__(self, session, session_type):
# Import here to avoid a circular dependency when initial import happens
Expand Down
4 changes: 2 additions & 2 deletions generated/nitclk/_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ def convert_to_nitclk_session_number(item):
- NI-TClk Session Num
'''
try:
return item.tclk.get_session_number()
return item.tclk._get_session_number()
except KeyError:
pass

try:
return item.get_session_number()
return item._get_session_number()
except KeyError:
pass

Expand Down

0 comments on commit adbfebe

Please sign in to comment.