Skip to content

Commit eb318dc

Browse files
authored
Merge pull request #234 from ModECI/test_outreachy_main
Readme updates
2 parents 9ef12fd + 13cd8ba commit eb318dc

File tree

5 files changed

+37
-4
lines changed

5 files changed

+37
-4
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ repos:
4646
# files: src
4747

4848
- repo: https://github.com/psf/black
49-
rev: 20.8b1
49+
rev: 22.3.0
5050
hooks:
5151
- id: black
File renamed without changes.

README.md

+34-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The implementation and dissemination of the MDF language and associated tools is
2525

2626
<p align="center">
2727
<a href="examples/README.md">
28-
<img alt="mdf interacts" width="400" src="examples/ModECI_MDF.png"/>
28+
<img alt="mdf interactions" width="400" src="https://github.com/ModECI/MDF/raw/main/examples/ModECI_MDF.png"/>
2929
</a>
3030
<br/><sup><i><b>Fig 1:</b> Some of the current and planned formats which MDF will interact with. Click on the image for more information.</i></sup></p>
3131

@@ -54,8 +54,41 @@ Successful interfacing of MDF to existing disciplinary standards (such as [ONNX]
5454

5555
<p align="center"><img src="docs/images/MDFgraph2.png" width="700px"><br/><sup><i><b>Fig 3:</b> This graph illustrates the ability to specify behavior that extends beyond the directed flow through the graph. Here, Node 1 generates a random number and transmits that number to Node 2. Node 2 will only run if the number it receives from Node 1 is greater than 10.</i></sup></p>
5656

57+
## Installation
58+
59+
### Requirements
60+
Requires Python >= 3.7
61+
62+
### Installation steps
63+
To install the MDF package and run it locally:
64+
65+
1. Clone this repository
66+
```
67+
git clone https://github.com/ModECI/MDF.git
68+
```
69+
2. Change to the directory
70+
```
71+
cd MDF
72+
```
73+
3. Create a virtual environment (e.g. called `mdf-env`)
74+
```
75+
pip install virtualenv
76+
virtualenv mdf-env
77+
```
78+
4. Activate the virtual environment
79+
```
80+
source MDF-env/bin/activate
81+
```
82+
5. Install the package
83+
```
84+
pip install .
85+
```
86+
5787
## Examples
5888

89+
To get started, follow the simple example in a Jupyter notebook [here](https://github.com/ModECI/MDF/blob/main/examples/SimpleExample.ipynb)
90+
91+
5992
Multiple examples of serialized MDF files, the Python scripts used to generate them, as well as mappings to target environments can be found [here](https://github.com/ModECI/MDF/blob/main/examples/README.md).
6093

6194
[actions-badge]: https://github.com/ModECI/MDF/actions/workflows/ci.yml/badge.svg

src/modeci_mdf/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def color_rgb_to_hex(rgb):
135135

136136

137137
def is_number(s):
138-
"""Return :code:`True` if cast to :code:`float` does not throw ValueError, :code:`False` otherwise. """
138+
"""Return :code:`True` if cast to :code:`float` does not throw ValueError, :code:`False` otherwise."""
139139
try:
140140
float(s)
141141
return True

tests/test_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def test_ConditionSet_init_kwargs():
9494

9595

9696
def test_Condition_init_kwargs():
97-
""" Check the working of Condition"""
97+
"""Check the working of Condition"""
9898
C = Condition(type="test_type", n="test_n", dependency="test_dependency")
9999
assert C.type == "test_type"
100100
assert C.args == {"n": "test_n", "dependency": "test_dependency"}

0 commit comments

Comments
 (0)