Skip to content

Commit

Permalink
Merge branch 'release/1.3.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bam4d committed May 18, 2022
2 parents 513c519 + d61e525 commit 631f31a
Show file tree
Hide file tree
Showing 26 changed files with 205 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. mac/linux/windows]
- Version [e.g. 1.3.7]
- Version [e.g. 1.3.8]

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.0)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version")
project(Griddly VERSION 1.3.7)
project(Griddly VERSION 1.3.8)

set(BINARY ${CMAKE_PROJECT_NAME})

Expand Down
4 changes: 2 additions & 2 deletions bindings/python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace griddly {

PYBIND11_MODULE(python_griddly, m) {
m.doc() = "Griddly python bindings";
m.attr("version") = "1.3.7";
m.attr("version") = "1.3.8";

#ifndef NDEBUG
spdlog::set_level(spdlog::level::debug);
Expand All @@ -23,7 +23,7 @@ PYBIND11_MODULE(python_griddly, m) {
spdlog::debug("Python Griddly module loaded!");

py::class_<Py_GriddlyLoaderWrapper, std::shared_ptr<Py_GriddlyLoaderWrapper>> gdy_reader(m, "GDYReader");
gdy_reader.def(py::init<std::string, std::string>());
gdy_reader.def(py::init<std::string, std::string, std::string>());
gdy_reader.def("load", &Py_GriddlyLoaderWrapper::loadGDYFile);
gdy_reader.def("load_string", &Py_GriddlyLoaderWrapper::loadGDYString);

Expand Down
4 changes: 2 additions & 2 deletions bindings/wrapper/GriddlyLoaderWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ namespace griddly {

class Py_GriddlyLoaderWrapper {
public:
Py_GriddlyLoaderWrapper(std::string imagePath, std::string shaderPath)
: resourceConfig_({imagePath, shaderPath}) {
Py_GriddlyLoaderWrapper(std::string gdyPath, std::string imagePath, std::string shaderPath)
: resourceConfig_({gdyPath, imagePath, shaderPath}) {
}

std::shared_ptr<Py_GDYWrapper> loadGDYFile(std::string filename) {
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Chris Bamford'

# The full version, including alpha/beta/rc tags
release = '1.3.7'
release = '1.3.8'


# -- General configuration ---------------------------------------------------
Expand Down
101 changes: 69 additions & 32 deletions js/jiddly-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/jiddly-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jiddly-app",
"version": "1.3.7",
"version": "1.3.8",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.1.1",
Expand Down
2 changes: 1 addition & 1 deletion python/griddly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, gdy_path=None, image_path=None, shader_path=None):
if gdy_path is None
else gdy_path
)
self._gdy_reader = gd.GDYReader(self._image_path, self._shader_path)
self._gdy_reader = gd.GDYReader(self._gdy_path, self._image_path, self._shader_path)

def get_full_path(self, gdy_path):
# Assume the file is relative first and if not, try to find it in the pre-defined games
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def griddly_package_data(config='Debug'):

setup(
name='griddly',
version="1.3.7",
version="1.3.8",
author_email="[email protected]",
description="Griddly Python Libraries",
long_description=long_description,
Expand Down
28 changes: 25 additions & 3 deletions python/tests/history_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@ def build_test_env(test_name, yaml_file, enable_history=True):
return env


def eq_dict(dict1, dict2):

for key in dict1:
if key in dict2:
if dict1[key] != dict2[key]:
return False
else:
assert False
return True

def in_dict(list_of_dicts, dict):
for dict1 in list_of_dicts:
if eq_dict(dict1, dict):
return True
return False


def test_history_SinglePlayer_HasHistory(test_name):
"""
Assuming there is a single avatar
Expand Down Expand Up @@ -122,7 +139,9 @@ def test_history_SinglePlayer_MultipleAction(test_name):
},
]

assert info["History"] == expected_history
assert in_dict(info["History"], expected_history[0])
assert in_dict(info["History"], expected_history[1])



def test_history_MultiplePlayer_History(test_name):
Expand Down Expand Up @@ -170,7 +189,8 @@ def test_history_MultiplePlayer_History(test_name):
},
]

assert info["History"] == expected_history
assert in_dict(info["History"], expected_history[0])
assert in_dict(info["History"], expected_history[1])


def test_history_MultiplePlayer_MultipleAction_History(test_name):
Expand Down Expand Up @@ -238,4 +258,6 @@ def test_history_MultiplePlayer_MultipleAction_History(test_name):
},
]

assert info["History"] == expected_history
assert in_dict(info["History"], expected_history[0])
assert in_dict(info["History"], expected_history[1])
assert in_dict(info["History"], expected_history[2])
Loading

0 comments on commit 631f31a

Please sign in to comment.