Skip to main content

olypy

Build Status Coverage Status Apache License 2.0

olypy is a collection of code related to the epic fantasy strategy game Olympia, which currently lives in SVN (yuck) at

https://sourceforge.net/projects/olympiag3/

olypy supports:

  • Generating a game database for testing the Olympia code
  • Actual end-to-end tests of the Olympia code
  • Generating a game database from player turn output to support simulations for players

Installing

Install python 3.5 or better, using pyenv or your favorite equivalent.

Clone the repo.

Install dependent python modules, and see if olypy passes tests:

python -m pip install -r requirements.txt
make test

Generating the QA database

make defaultlib

Running Olympia tests

You need a compiled Olympia binary with support for the 'assert' command.

cd sim; python run-tests.py

Tests are YAML files. Here's an example:

description: test move-related things
lib: defaultlib
aa1 orders: |
 unit 1102  # A2 in Aachen [c18]
   # test movement delays
   claim 10 20
   assert item 10 20 not item 10 21 # exactly 20
   move out # 2 days
   assert day 3 not day 4
   drop 10 1
   move c18
   assert day 4 not day 5

This example contains 3 tests. assert is similar to wait; it passes if the wait is 0-time, and fails elsewise. The foo not foo syntax is a way of expressing exact values.

Metadata

Release files for olypy 0.9.45

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for olypy 0.9.45
File Interpreter ABI Platform
olypy-0.9.45-py3-none-any.whl Python 3 none any Details

Release files / olypy-0.9.45-py3-none-any.whl

Download URL olypy-0.9.45-py3-none-any.whl
Size 334.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e7dbe6cd91bb724b4e16f65f44fd69535c62c9e5cd2107991e06572f60d5d64
BLAKE2b-256 checksum
How to use checksums
4866b967f2e3140670ed9760fb0ea6dd095503cea8239988e55af909eb629663
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.4

Release history Release notifications | RSS feed

This release

0.9.45 This release

1 release file

0.9.43

1 release file

0.9.41

1 release file

0.9.40

1 release file

0.9.39

1 release file

0.9.37

1 release file

0.9.36

1 release file

0.9.34

1 release file

0.9.33

1 release file

0.9.32

1 release file

0.9.31

1 release file

0.9.30

1 release file

0.9.26

1 release file

0.9.25

1 release file

0.9.22

1 release file

0.9.20

1 release file

0.9.19

1 release file

0.9.18

1 release file

0.9.16

1 release file

0.9.14

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page