Note: The default ITS GitLab runner is a shared resource and is subject to slowdowns during heavy usage.
You can run your own GitLab runner that is dedicated just to your group if you need to avoid processing delays.

We will be renewing and replacing the SSL certificate for the ITS GitLab service on 11/3/2021. While the certificate is being replaced, the GitLab service will be unavailable. Maintenance will start at 5:30p, and be completed by 7:30p.

Verified Commit 63a40aa0 authored by Qusai Al Shidi's avatar Qusai Al Shidi 💬
Browse files

@cdha this is great and I made a few changes to keep in mind.

- Google style docstrings use `Args:` and not `Arguments:`
- Stick to markdown *everywhere*.
- The first line in a big docstring `"""` is always a one line summary

Please confirm before I merge :).
parent d3196274
......@@ -26,6 +26,7 @@ __email__ = 'qusai@umich.edu'
import sys
from . import paramin
from . import io
from . import tecplottools
  • I recommend not importing tecplottools by default. While I don't think the import itself will cause problems (Tecplot doesn't look for a license until you actually try to do something to data) I don't think the user will be able to use the functions in the module without a license. So for a user who never touches tecplot it would be a bit pointless to require them to install the pytecplot package, which I believe is what would happen if it's imported by default.

Please register or sign in to reply
from . import web
assert sys.version_info >= (3, 6), "swmfpy requires Python >=3.6. Sorry :(."
......
#!/usr/bin/env python
"""Tools for working with the Tecplot visualization software. Requires an
active Tecplot license and the pytecplot python package. pytecplot ships with
Tecplot 360 2017 R1 and later versions but it is recommended that you install
the latest version with `pip install pytecplot`. See the pytecplot
documentation for more details about installation
(https://www.tecplot.com/docs/pytecplot/install.html). See also
TECPLOT.markdown for tips targeted to SWMF users.
"""Tools for working with the Tecplot visualization software.
Requires an active Tecplot license and the pytecplot python package.
pytecplot ships with Tecplot 360 2017 R1 and later versions
but it is recommended that you install the latest version with
`pip install pytecplot`.
See the pytecplot documentation for more details about
[installation](https://www.tecplot.com/docs/pytecplot/install.html).
See also [TECPLOT](TECPLOT.markdown) for tips targeted to SWMF users.
Some useful references:
- Tecplot User's Manual
http://download.tecplot.com/360/current/360_users_manual.pdf
- Tecplot Scripting Guide
http://download.tecplot.com/360/current/360_scripting_guide.pdf
- Pytecplot documentation
https://www.tecplot.com/docs/pytecplot/index.html
- [Tecplot User's Manual](download.tecplot.com/360/current/360_users_manual.pdf)
- [Tecplot Scripting Guide](download.tecplot.com/360/current/360_scripting_guide.pdf)
- [Pytecplot documentation](www.tecplot.com/docs/pytecplot/index.html)
"""
__all__ = [
'apply_equations'
......@@ -24,20 +23,20 @@ __email__ = 'cdha@@umich.edu'
import tecplot
def apply_equations(eqn_path: str, verbose: bool = False):
"""
Apply an equations file in the Tecplot macro format to the active Tecplot
dataset. Please reference the Tecplot User's Manual for more details on
"""Apply an equations file in the Tecplot macro format to the active dataset
Please reference the Tecplot User's Manual for more details on
equation files and syntax. It is recommended to use this function with eqn
files generated with the Tecplot GUI. See TECPLOT.markdown for tips on using
pytecplot.
files generated with the Tecplot GUI.
See [TECPLOT](TECPLOT.markdown) for tips on using pytecplot.
Arguments:
eqn_file_path: The path to the equation macro file (typically with
Args:
eqn_file_path (str): The path to the equation macro file (typically with
extension `.eqn`).
verbose: (Optional) Whether or not to print the equations as they are
verbose (bool): (Optional) Whether or not to print the equations as they are
applied. Default behavior is silent.
Example:
Examples:
```python
import tecplot
import swmfpy.tecplottools as tpt
......
  • Also, thank you so much @cdha !!

  • 99% awesome! I had a comment recommending to not import the module by default however. And thanks to you as well, I will bear this formatting in mind in the future.

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment