forked from wking/igor
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from ns-rse/master
Fixing entry points
- Loading branch information
Showing
7 changed files
with
60 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,7 @@ igor2/_version.py | |
|
||
*.egg-info | ||
.env | ||
|
||
# Emacs | ||
*~ | ||
\#* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
#!/usr/bin/env python | ||
"""IBW -> ASCII conversion""" | ||
|
||
import pprint | ||
|
||
import numpy | ||
|
||
from igor.binarywave import load | ||
from igor2.binarywave import load | ||
from igor.script import Script | ||
|
||
|
||
class WaveScript (Script): | ||
class WaveScript(Script): | ||
def _run(self, args): | ||
wave = load(args.infile) | ||
numpy.savetxt( | ||
args.outfile, wave['wave']['wData'], fmt='%g', delimiter='\t') | ||
numpy.savetxt(args.outfile, wave["wave"]["wData"], fmt="%g", delimiter="\t") | ||
self.plot_wave(args, wave) | ||
if args.verbose > 0: | ||
wave['wave'].pop('wData') | ||
wave["wave"].pop("wData") | ||
pprint.pprint(wave) | ||
|
||
|
||
s = WaveScript(description=__doc__) | ||
s.run() | ||
def main(): | ||
s = WaveScript(description=__doc__) | ||
s.run() | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
"""Test the CLI entry points.""" | ||
from igor2.cli.igorbinarywave import WaveScript | ||
from igor2.cli.igorpackedexperiment import PackedScript | ||
|
||
|
||
def test_wavescript(capsys): | ||
"""Test the WaveScript class entry point.""" | ||
|
||
|
||
def test_wavescript(capsys): | ||
"""Test the PackedScript class entry point.""" |