sem

A framework to manage ns-3 simulation campaigns: let SEM perform multiple parallelized executions of your ns-3 scenario, permanently save the results and output them in plotting-friendly data structures. All from the comfort of the command line or in a few, clean lines of Python code.

https://github.com/signetlabdei/sem

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (22.0%) to scientific vocabulary

Keywords

ns-3

Keywords from Contributors

transformation
Last synced: 10 months ago · JSON representation

Repository

A framework to manage ns-3 simulation campaigns: let SEM perform multiple parallelized executions of your ns-3 scenario, permanently save the results and output them in plotting-friendly data structures. All from the comfort of the command line or in a few, clean lines of Python code.

Basic Info
Statistics
  • Stars: 36
  • Watchers: 7
  • Forks: 30
  • Open Issues: 7
  • Releases: 2
Topics
ns-3
Created about 8 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Contributing License

README.md

A Simulation Execution Manager for ns-3

Binder

This is a Python library to perform multiple ns-3 script executions, manage the results and collect them in processing-friendly data structures.

How does this work?

For complete step-by-step usage and installation instructions, check out our documentation.

How to cite us

If you used SEM for your ns-3 analysis, please cite the following paper, both to provide a reference and help others find out about this tool:

Davide Magrin, Dizhi Zhou, and Michele Zorzi. 2019. A Simulation Execution Manager for ns-3: Encouraging reproducibility and simplifying statistical analysis of ns-3 simulations. In Proceedings of the 22nd International ACM Conference on Modeling, Analysis and Simulation of Wireless and Mobile Systems (MSWIM '19). ACM, New York, NY, USA, 121-125. DOI: https://doi.org/10.1145/3345768.3355942

Contributing

This section contains information on how to contribute to the project. If you are only interested in using SEM, check out the documentation.

If you want to contribute to sem development, first of all you'll need an installation that allows you to modify the code, immediately see the results and run tests.

Building the module from scratch

This module is developed using poetry: in order to correctly manage virtual environments and install dependencies, make sure it is installed. Typically, the following is enough:

bash curl -sSL https://install.python-poetry.org | python3 -

Note that, if poetry's installer does not add poetry's path to your shell's startup file properly, you may need to add source $HOME/.poetry/env to your startup file. You can tell that you need to add it if your shell cannot find the poetry command the next time you open a terminal window.

Then, clone the repo (or your fork, by changing the url in the following command), also getting the ns-3 installations that are used for running examples and tests:

bash git clone https://github.com/signetlabdei/sem cd sem git submodule update --init --recursive

From the project root, you can then install the package and the requirements with the following:

bash poetry install

This will also get you a set of tools such as sphinx, pygments and pytest that handle documentation and tests.

Finally, you can spawn a sub-shell using the new virtual environment by calling:

bash poetry shell

Now, you can start a python REPL to use the library interactively, issue the bash sem program, run tests and compile the documentation of your local copy of sem.

Running tests

This project uses the pytest framework for running tests. Tests can be run, from the project root, using:

bash python -m pytest --doctest-glob='*.rst' docs/ python -m pytest -x -n 3 --doctest-modules --cov-report term --cov=sem/ ./tests

These two commands will run, respectively, all code contained in the docs/ folder and all tests, also measuring coverage and outputting it to the terminal.

Since we are mainly testing integration with ns-3, tests require frequent copying and pasting of folders, ns-3 compilations and simulation running. Furthermore, documentation tests run all the examples in the documentation to make sure the output is as expected. Because of this, full tests are far from instantaneous. Single test files can be targeted, to achieve faster execution times, by substituting ./tests in the second command with the path to the test file that needs to be run.

Building the documentation

Documentation can be built locally using the makefile's docs target:

bash make docs

Running examples

The scripts in examples/ can be directly run:

bash python examples/wifi_example.py

Installing SEM in pip's editable mode

pip currently requires a setup.py file to install projects in editable mode.

As explained here, poetry actually already generates a setup.py. After building the project, you can extract the file from the archive using the following command:

bash tar -xvf dist/*.tar.gz --wildcards --no-anchored '*/setup.py' --strip=1

After this step, it becomes possible to install SEM in editable mode.

Authors

Davide Magrin

Owner

  • Name: SIGNET Lab - DEI, University of Padova
  • Login: signetlabdei
  • Kind: organization

GitHub Events

Total
  • Issues event: 2
  • Watch event: 2
Last Year
  • Issues event: 2
  • Watch event: 2

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 297
  • Total Committers: 10
  • Avg Commits per committer: 29.7
  • Development Distribution Score (DDS): 0.178
Past Year
  • Commits: 31
  • Committers: 2
  • Avg Commits per committer: 15.5
  • Development Distribution Score (DDS): 0.065
Top Committers
Name Email Commits
Davide Magrin m****e@g****m 244
pagmatt m****g@g****m 29
mychele m****e@g****m 9
Davide Magrin D****r 6
Kr0n0s (GCI 2019) 3
Giacomo De Lazzari g****i@a****m 2
Marshall Asch m****h@r****m 1
Davide Magrin d****e@D****l 1
iirzyk 4****k 1
Mattia Lecci m****i@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 37
  • Total pull requests: 41
  • Average time to close issues: 3 months
  • Average time to close pull requests: 16 days
  • Total issue authors: 18
  • Total pull request authors: 15
  • Average comments per issue: 2.43
  • Average comments per pull request: 1.76
  • Merged pull requests: 28
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: about 10 hours
  • Issue authors: 2
  • Pull request authors: 2
  • Average comments per issue: 0.5
  • Average comments per pull request: 0.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • matbord (8)
  • DvdMgr (6)
  • Prapi123 (3)
  • Thecave3 (2)
  • SzymonSzott (2)
  • mrequena (2)
  • MarshallAsch (2)
  • alp23 (1)
  • mtahrawi (1)
  • akshitpatel01 (1)
  • steveratti (1)
  • BenGitUHA (1)
  • djvergad (1)
  • rediet-orange (1)
  • mychele (1)
Pull Request Authors
  • pagmatt (13)
  • DvdMgr (11)
  • mychele (5)
  • akshitpatel01 (3)
  • non-det-alle (2)
  • ahmed-abdulhuy (2)
  • Thecave3 (1)
  • gitter-badger (1)
  • SzymonSzott (1)
  • gdelazzari (1)
  • sachinnayaklris (1)
  • iirzyk (1)
  • MarshallAsch (1)
  • mattia-lecci (1)
  • tommasozugno (1)
Top Labels
Issue Labels
enhancement (4) bug (2) invalid (2) good first issue (1) question (1)
Pull Request Labels
enhancement (2) bug (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 118 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 3
  • Total versions: 14
  • Total maintainers: 2
pypi.org: sem

A Simulation Execution Manager for ns-3

  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 3
  • Downloads: 118 Last month
Rankings
Forks count: 7.2%
Dependent repos count: 9.0%
Dependent packages count: 10.1%
Average: 10.9%
Stargazers count: 11.5%
Downloads: 17.0%
Maintainers (2)
Last synced: 12 months ago

Dependencies

.binder/requirements.txt pypi
  • poetry *
pyproject.toml pypi
  • check-manifest * develop
  • flake8 * develop
  • graphviz * develop
  • importmagic * develop
  • matplotlib * develop
  • pygments * develop
  • pylint * develop
  • pyright ^0.0.13 develop
  • pytest * develop
  • pytest-cov * develop
  • pytest-xdist * develop
  • scipy * develop
  • seaborn * develop
  • sphinx * develop
  • sphinxcontrib-napoleon * develop
  • click *
  • drmaa *
  • gitpython *
  • numpy ^1.21.5
  • pandas *
  • python >3.8,<3.11
  • salib ^1.3.8
  • tinydb ^4.0.0
  • tqdm *
  • xarray *
.github/workflows/build-and-push-docs.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • peaceiris/actions-gh-pages v3 composite
  • snok/install-poetry v1 composite
.github/workflows/run-tests.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • egor-tensin/setup-gcc v1 composite
  • snok/install-poetry v1 composite