Skip to content

Commit

Permalink
Changes to Simulation and ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
candemas97 committed Nov 1, 2024
1 parent 749a0d0 commit ea27635
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 30 deletions.
31 changes: 6 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,9 @@ python: >=3.9
pip install phitter
```



## Usage

### ***1. Fit Notebook's Tutorials***
### **_1. Fit Notebook's Tutorials_**

| Tutorial | Notebooks |
| :------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
Expand All @@ -61,23 +59,16 @@ pip install phitter
| **Fit Specific Disribution** | <a target="_blank" href="https://colab.research.google.com/github/phitterio/phitter-kernel/blob/main/examples/fit_specefic_distribution.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |
| **Working Distribution** | <a target="_blank" href="https://colab.research.google.com/github/phitterio/phitter-kernel/blob/main/examples/working_distribution.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |

### ***2. Simulation Notebook's Tutorials***
pending

## Documentation




### **_2. Simulation Notebook's Tutorials_**

Pending

## Documentation

<details>

<summary style="font-size: 16px; font-weight: bold;">Documentation Fit Module</summary>



### General Fit

```python
Expand Down Expand Up @@ -489,19 +480,9 @@ distribution.mode # -> 733.3333333333333

</details>









<details>
<summary style="font-size: 16px; font-weight: bold;">Documentation Simulation Module</summary>



## Process Simulation

This will help you to understand your processes. To use it, run the following line
Expand All @@ -518,8 +499,8 @@ simulation = simulation.ProcessSimulation()

There are two ways to add processes to your simulation instance:

- Adding a **process _without_ preceding process (new branch)**
- Adding a **process _with_ preceding process (with previous ids)**
- Adding a **process _without_ preceding process (new branch)**
- Adding a **process _with_ preceding process (with previous ids)**

#### Process _without_ preceding process (new branch)

Expand Down
12 changes: 7 additions & 5 deletions tests/pytest/test_process_simulation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest
import phitter
import pandas as pd


# Test that adding a process with a wrong function name raises a ValueError
Expand Down Expand Up @@ -55,10 +56,11 @@ def test_simulation_running():
previous_ids=["fifth", "sixth", "ni_idea_2"],
)

result = simulation.run(10)
result = simulation.run(100)

assert len(result) == 10
assert isinstance(result, list)
assert isinstance(result, pd.DataFrame)
assert len(result["Total Simulation Time"]) == 100
assert len(result.columns) == 11


# Test to check if the confidence interval results are as expected
Expand Down Expand Up @@ -103,5 +105,5 @@ def test_simulation_confidence_interval():

result = simulation.run_confidence_interval(number_of_simulations=100)

assert len(result) == 4
assert isinstance(result, tuple)
assert len(result.columns) == 4
assert isinstance(result, pd.DataFrame)

0 comments on commit ea27635

Please sign in to comment.