1. Team SimPy
  2. simpy
  3. simpy

Commits

Author Commit Message Date Builds
Stefan Scherfke
Merged in jpgrayson/simpy (pull request #79) Add performance benchmark tests
Peter Grayson
Disable benchmark tests by default The benchmarks may be re-enabled on the command line with: py.test -m benchmark Or to run all tests including benchmark and non-benchmark tests: py.test -m "benchmark or not benchmark" The benchmark tests are also disabled by default when running the test suite with tox, however new tox environment called "benchmark" exists for running the benchmarks. To the benchmark tests with tox: …
Peter Grayson
Use nested functions for simulation benchmark tests
Peter Grayson
Add performance benchmark tests The new `tests/test_benchmark.py` adds several performance benchmarks to the test suite. It uses the `pytest-benchmark` plugin for `pytest`. The benchmarks cover high-frequency "micro" behaviors such as measuring `Event()` initialization time as well as full simulations involving resources and multiple processes. The new benchmark tests are run automatically by `py.test`. The benchmarks add appr…
luensdorf
Merged in jpgrayson/simpy (pull request #80) Use properties for Event.ok and Event.defused
Peter Grayson
Allow Event.ok to raise AttributeError This brings the semantic of the Event.ok property in-line with the [recently] previous semantic of the Event.ok attribute.
Peter Grayson
Simplify Event.defused property implementation. Testing self._ok was unnecessary.
Peter Grayson
Use hasattr(event, '_defused') in Environment.step() (for performance)
Peter Grayson
Use properties for Event.ok and Event.defused New `Event.ok` and `Event.defused` properties wrap `Event._ok` and `Event._defused` attributes. The key benefit is that doc strings now can exist for `Event.ok` and `Event.defused`. This is a performance-neutral change since all of the fast-paths still use direct access to the `_ok` and `_defused` attributes.
Stefan Scherfke
Merged in jpgrayson/simpy (pull request #81) Add new PriorityStore resource
Peter Grayson
Add new PriorityStore resource The new `PriorityStore` class is a subclass of `Store` that maintains its `items` list in priority order such that `get()` yields items in priority order. The `PriorityItem` helper class allows unorderable items to be put into a `PriorityStore` by associating an explicit priority value with the item.
Stefan Scherfke
Merged in jpgrayson/simpy (pull request #74) Various minor repairs for flake8 compliance.
Peter Grayson
Repair flake8 violations in docs/conf.py Also apply flake8 to entire project in tox.ini.
Peter Grayson
Various minor repairs for flake8 compliance. N.B. We disable flake8 in docs/conf.py since there are oodles of violations on commented-out configuration lines.
Stefan Scherfke
Merged in jpgrayson/simpy (pull request #76) Update testing recommendations
Peter Grayson
Update testing recommendations Update documentation in README.txt and installation.rst to recommend running the test suite with `py.test` instead of the `python -c ...` method. The `py.test` method is shorter and more powerful. Plus if tests are invoked with the `py.test` method, then we no longer need simpy.util.test(). So we also remove that function in the name of PEP-20 (one obvious way to do it).
Peter Grayson
Update .coveragerc for new src and tests directory layout The paths in `.coveragerc` are updated to support the new `src` and `tests` directory structure.
Stefan Scherfke
Merged in jpgrayson/simpy (pull request #75) Repair typo in example code: "charing" to "charging".
Peter Grayson
Repair typo in example code: "charing" to "charging".
Peter Grayson
Include LICENSE.txt in license.rst The license.rst documentation page was blank. Use literalinclude of the top-level LICENSE.txt file to remedy.
Stefan Scherfke
Updated requirements.
Stefan Scherfke
Updated tox.ini to work with the new project layout (also removed py32, which is no longer supported by pytest).
Stefan Scherfke
Moved package to src/ and tests to tests/
Stefan Scherfke
Merged in jpgrayson/simpy (pull request #69) Additional test coverage for resources.
Peter Grayson
Additional test coverage for resources. Unit test coverage of the various resource classes is increased.
Stefan Scherfke
Merged in jpgrayson/simpy (pull request #70) Limit coverage reports to simpy package and examples
Peter Grayson
Limit coverage reports to simpy package and examples Depending on the python environment or virtualenv, coverage reports could also have included code from site-packages.
Peter Grayson
Additional .hgignore globs Ignore optimized .pyo files and modern __pycache__ directories. Also ignore the pytest-generated .cache directory.
Peter Grayson
Update error messages for get/put queue invariant violations
Peter Grayson
Do not use assert for control flow Repair BaseResource._trigger_get() and _trigger_put() to avoid using `assert` for control flow. Regular `if` tests are now used and RuntimeError is raised if the assert predicate is False. The use of `assert` for control flow caused breakage when python optimizations were turned on. For example, this was breaking tests: $ PYTHONOPTIMIZE=1 py.test This repairs issue #78.
  1. Prev
  2. Next