Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.wsnsimpy: init at 0.2.5 #75378

Merged
merged 1 commit into from Dec 20, 2020

Conversation

dmrauh
Copy link
Contributor

@dmrauh dmrauh commented Dec 9, 2019

Motivation for this change

I needed a Python-based simulation library for wireless sensor networks.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@jonringer
Copy link
Contributor

are you meant to use this as an application or import it as a module?

@dmrauh
Copy link
Contributor Author

dmrauh commented Dec 10, 2019

wsnsimpy is used as a module. It provides a general framework that can be used to implement and visualize specific simulation scenarios in Python. I'm sorry that I didn't make that clear right away.

@stale
Copy link

stale bot commented Jun 8, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 8, 2020
@dmrauh
Copy link
Contributor Author

dmrauh commented Jun 8, 2020

@jonringer do you think there's work to do for this PR from my side? I'm still interested in getting this merged 😃

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 8, 2020
@dmrauh dmrauh force-pushed the add/wsnsimpy branch 2 times, most recently from 5bdbc15 to db9d40a Compare June 19, 2020 10:50
@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 75378 run on x86_64-linux 1

2 packages built:
  • python37Packages.wsnsimpy
  • python38Packages.wsnsimpy

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 75378 run on x86_64-darwin 1

2 packages built:
  • python37Packages.wsnsimpy
  • python38Packages.wsnsimpy

@dmrauh
Copy link
Contributor Author

dmrauh commented Dec 4, 2020

Thanks for your review @SuperSandro2000 I incorporated your suggestions!

@SuperSandro2000
Copy link
Member

Some tests are failing:

_____________________ [doctest] real-time-simulations.rst ______________________
041    >>>
042    >>> env = simpy.Environment()
043    >>> proc = env.process(example(env))
044    >>> env.run(until=proc)
045    Duration of one simulation time unit: 0.00s
046    >>>
047    >>> import simpy.rt
048    >>> env = simpy.rt.RealtimeEnvironment(factor=0.1)
049    >>> proc = env.process(example(env))
050    >>> env.run(until=proc)
Expected:
Duration of one simulation time unit: 0.10s
Got:
Duration of one simulation time unit: 0.11s
/private/tmp/nix-build-python3.7-simpy-4.0.1.drv-0/simpy-4.0.1/docs/topical_guides/real-time-simulations.rst:50: DocTestFailure
__________________________ test_rt_slow_sim_no_error ___________________________

log = [1]
    def test_rt_slow_sim_no_error(log):
        """Test ignoring slow simulations."""
        start = monotonic()
        env = RealtimeEnvironment(factor=0.05, strict=False)
        env.process(process(env, log, 0.1, 1))

        env.run(2)
        duration = monotonic() - start

>       assert check_duration(duration, 2 * 0.1)
E       assert False
E        +  where False = check_duration(0.2203596250000004, (2 * 0.1))

tests/test_rt.py:81: AssertionError
=============================== warnings summary ===============================

@dmrauh
Copy link
Contributor Author

dmrauh commented Dec 12, 2020

Why could tests of simpy be failing? simpy is only a dependency of wsnsimpy...

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 75378 run on x86_64-linux 1

3 packages built:
  • python37Packages.wsnsimpy
  • python38Packages.wsnsimpy
  • python39Packages.wsnsimpy

@SuperSandro2000
Copy link
Member

Why could tests of simpy be failing? simpy is only a dependency of wsnsimpy...

I am not sure but this only fails on darwin.

Additonally to that I found the following:

docs/topical_guides/real-time-simulations.rst Exception ignored in: <generator object Car.run at 0x109d9f120>                                                                               Traceback (most recent call last):                                                                                                                                                            File "<doctest process_interaction.rst[6]>", line 13, in run                                                                                                                              NameError: name 'simpy' is not defined                                                                                                                                                      F                          [ 10%]

But I am going to ignore that for this PR because it is unrelated.

@SuperSandro2000 SuperSandro2000 merged commit 8026d62 into NixOS:master Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants