README.markdown 1.41 KB
Newer Older
1
2
![swmfpy logo](share/logo/swmfpy.png "swmfpy")

Qusai Al Shidi's avatar
Qusai Al Shidi committed
3
4
swmfpy
======
Qusai Al Shidi's avatar
Qusai Al Shidi committed
5

6
A collection of tools to make it easier to work with Python and Space Weather Modeling Framework (SWMF) together.
Qusai Al Shidi's avatar
Qusai Al Shidi committed
7

8
This is a work in progress.
Qusai Al Shidi's avatar
Qusai Al Shidi committed
9

10
11
Installation
------------
12
13

Clone into the directory you want to use it.
Qusai Al Shidi's avatar
Qusai Al Shidi committed
14

15
16
*Note*: swmfpy also is part of the SWMF and gets cloned into `SWMF/share/Python`. However, if you would like to [develop](CONTRIBUTING.markdown) for swmfpy or have a local copy do the following:

Qusai Al Shidi's avatar
Qusai Al Shidi committed
17
```bash
Gabor Toth's avatar
Gabor Toth committed
18
git clone https://gitlab.umich.edu/swmf_sofware/swmfpy.git /path/to/my/dir
Qusai Al Shidi's avatar
Qusai Al Shidi committed
19
20
```

21
22
23
24
Then go to its directory and run `setup.py` make sure to include `--user`.

```bash
cd /path/to/swmfpy
25
python3 -m pip install setuptools wheel twine --user # If you don't have these
26
27
28
29
python3 setup.py install --user
```

Then import it into your python project. 
Qusai Al Shidi's avatar
Qusai Al Shidi committed
30
31
32
33
34

```python
import swmfpy
```

35
36
37
Documentation
-------------

38
39
40
An auto-documented version can be found [here](DOCUMENTATION.markdown).

However, documentation is included as docstrings. Use python's *dir()* and *help()* inbuilt functions to see documentation.
Qusai Al Shidi's avatar
Qusai Al Shidi committed
41
42

```python
43
import swmfpy
Qusai Al Shidi's avatar
Qusai Al Shidi committed
44
45
help(swmfpy)  # To see list of functions
help(swmfpy.io.read_gm_log)  # To see the function documentation
Qusai Al Shidi's avatar
Qusai Al Shidi committed
46
```
Qusai Al Shidi's avatar
Autodoc    
Qusai Al Shidi committed
47

48
49
50
Issues
------

51
If you are experiencing any issues or bugs please go to the [Issues](https://gitlab.umich.edu/swmf_software/swmfpy/issues) page and create an issue. Make sure you include steps to recreate the problem in your post.