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

Sprites Take 2 #264

Closed
wants to merge 110 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
8712acf
Add support for YAML configuration of game details.
alecpm Jul 19, 2023
5d96b83
Merge pull request #244 from Dallinger/yaml-game-config
jessesnyder Jul 19, 2023
217ecec
Fix game_config file lookup path.
alecpm Jul 20, 2023
5805389
Make object and transition config accessible to client side
jessesnyder Jul 20, 2023
1aacbf7
Remove unsused var
jessesnyder Jul 20, 2023
61936c2
Hard-code a type_id for food, for now
jessesnyder Jul 21, 2023
9beb69d
Replace Food with generic Resource
jessesnyder Jul 21, 2023
e9654de
Add Food to game config
jessesnyder Jul 21, 2023
1757b62
Add some notes
jessesnyder Jul 21, 2023
2eabd8b
incorporate objects defined in yaml configuration into gridworld
cguardia Jul 21, 2023
a2e7e90
Only consume things immediately if they're non-interactive
jessesnyder Jul 21, 2023
6442db1
Merge branch 'issues/233-participants-see-objects' into issues/232-ne…
jessesnyder Jul 21, 2023
d2c809e
Bugfix: attribute name
jessesnyder Jul 21, 2023
61730ae
Add some logging on grid object spawning
jessesnyder Jul 21, 2023
43c5a73
Use YAML config for Food, and remove other objects for now
jessesnyder Jul 21, 2023
130301c
Update attr names in JS to match python
jessesnyder Jul 21, 2023
17b8f4c
Commit compiled JS
jessesnyder Jul 21, 2023
fe9ef39
Use item rather than object or resource
cguardia Jul 22, 2023
4f88723
Commit compiled JS
jessesnyder Jul 24, 2023
ef257ff
tablib is no longer a dependency, so remove related test
jessesnyder Jul 24, 2023
03b09e7
Mechanical changes to get most tests passing again
jessesnyder Jul 24, 2023
02cbb59
Use a shared reference to item_config across Item instances
jessesnyder Jul 24, 2023
6abf932
Move from hard-coding colors to using a "sprite" definition in game_c…
jessesnyder Jul 25, 2023
a2494ee
Add note about possibly avoidable copy of shared values
jessesnyder Jul 25, 2023
4be6708
Port maturation threshold and speed to item config
jessesnyder Jul 26, 2023
4789d8d
Attempt to blindly update grid item deserialization
jessesnyder Jul 26, 2023
44e8614
add black; first black run updates
cguardia Jul 26, 2023
24a775a
add default item config; use item count and calories instead of globa…
cguardia Jul 26, 2023
8ddd3fe
Fix some bugs with replenish_items(), but some still remain
jessesnyder Jul 26, 2023
b44192a
move away form grid based to item based config and evaluation
cguardia Jul 27, 2023
2b86e49
fix merge conflict
cguardia Jul 27, 2023
2d9e251
Update supported python versions
jessesnyder Jul 28, 2023
c768385
Make Item immutable(ish)
jessesnyder Jul 28, 2023
b831c99
Better test isolation
jessesnyder Jul 28, 2023
a2fcae5
Blacken tests
jessesnyder Jul 28, 2023
7b09115
Make instruction test very basic for now
jessesnyder Jul 28, 2023
31e06c6
Greatly reduce mocking and make sure @property patches are removed on…
jessesnyder Jul 28, 2023
e795dc7
Restore docstring
jessesnyder Jul 28, 2023
3d1419b
Restore config.txt, add docstring, remove spurious comment
jessesnyder Jul 31, 2023
395f571
Optimize replenish_items
jessesnyder Jul 31, 2023
2410991
Add player config with distribution config.
alecpm Jul 31, 2023
64d7583
Merge pull request #248 from Dallinger/issues/232-new-object-types
alecpm Jul 31, 2023
87a2a32
Blacken
jessesnyder Jul 31, 2023
bfdf457
Test fixes.
alecpm Jul 31, 2023
68bc57b
Add pre-commit hooks and blacken everything.
alecpm Jul 31, 2023
298acba
Make pytest work
silviot Jul 20, 2023
81d3d02
Initial CI workflow definition
silviot Jul 20, 2023
fc57417
Add cache and test reporting
silviot Jul 20, 2023
b8a7d87
Start dallinger services before running tests
silviot Jul 20, 2023
ca0a9ce
Naively fix tests
silviot Jul 20, 2023
250d6da
Add tablib to griduniverse dependencies
silviot Jul 20, 2023
f1ff539
Remove no longer used travis config file
silviot Jul 20, 2023
25f6511
Install dependencies in the versions specified by dallinger
silviot Jul 20, 2023
0da3116
Symlink game_config.yml to make tests pass
silviot Jul 20, 2023
f5587cc
Try to fix a couple of hacks in the CI setup.
alecpm Jul 31, 2023
df3738f
Mark replay test as xfail and add pre-commit to CI.
alecpm Jul 31, 2023
8e697b5
Merge pull request #246 from Dallinger/issues/236-transitions
alecpm Jul 31, 2023
0523685
Badge update
alecpm Jul 31, 2023
d62176b
Another readme update.
alecpm Jul 31, 2023
8d074de
Update pre-commit.
alecpm Aug 2, 2023
f9a8b25
WIP transition support.
alecpm Aug 2, 2023
479ea35
Test fix.
alecpm Aug 2, 2023
e726094
Immutability fix. Test fix.
alecpm Aug 2, 2023
7bb0064
Fix formatting issue.
alecpm Aug 2, 2023
b555533
Fix formatting issues.
alecpm Aug 2, 2023
4cbf055
Fix Item.remaining_uses default issue, add some docstrings and tests.
alecpm Aug 2, 2023
a83d656
Make some of the transition logic a little clearer.
alecpm Aug 2, 2023
afb6e07
Merge pull request #253 from Dallinger/issues/236-241-transitions
alecpm Aug 3, 2023
0cbcb2c
Add tests for object pickup
silviot Aug 3, 2023
fbf5858
Add tests for object drop
silviot Aug 3, 2023
a6da6d3
Add ItemCollection, and move it and Item to separate module
jessesnyder Aug 1, 2023
1168ea0
Compiled JS
jessesnyder Aug 1, 2023
dee51ef
Display info about interactive item player shares square with
jessesnyder Aug 1, 2023
39628a9
Remove unused code
jessesnyder Aug 1, 2023
7000cec
Oops... actually add the new items.js file
jessesnyder Aug 1, 2023
a69aed9
Update gitignore
jessesnyder Aug 1, 2023
4b88145
Commit compiled JS
jessesnyder Aug 3, 2023
fe15c7e
Savepoint: get things working after rebase
jessesnyder Aug 3, 2023
d3847e7
Savepoint
jessesnyder Aug 3, 2023
a80a550
Missed remainingUses attribute
jessesnyder Aug 3, 2023
1bf354c
Single point of truth for Item grid positions
jessesnyder Aug 3, 2023
c259e9a
Merge branch 'issues/234-player-item-interaction__pos-single-point-of…
jessesnyder Aug 3, 2023
7aaefe3
Commit compiled JS
jessesnyder Aug 3, 2023
65a06f3
Docstring
jessesnyder Aug 3, 2023
31ac077
Better API for iterating grid items
jessesnyder Aug 3, 2023
5068ed4
Missed a case
jessesnyder Aug 3, 2023
36c299f
Use strings for item IDs, for sanity
jessesnyder Aug 3, 2023
8895400
Use strings for item IDs, for sanity
jessesnyder Aug 4, 2023
1a736b5
Show transition options
jessesnyder Aug 4, 2023
cb3091f
Test fixes
jessesnyder Aug 4, 2023
5fed0b0
Add trasition test
silviot Aug 4, 2023
4e4cb46
Refactor test fixtures
silviot Aug 4, 2023
9391950
PR review fixes
jessesnyder Aug 4, 2023
04b75d1
Bug fixes
jessesnyder Aug 4, 2023
405404a
Merge pull request #255 from Dallinger/issues/234-player-item-interac…
jessesnyder Aug 4, 2023
23e6beb
Fix linting error.
alecpm Aug 4, 2023
701aa5f
Merge pull request #254 from Dallinger/issues/236-241-transitions-tests
alecpm Aug 4, 2023
e5c1d7d
Merge pull request #252 from Dallinger/issues/234-player-item-interac…
jessesnyder Aug 4, 2023
bb6bfc2
Additional transition and consumption tests. Fixes.
alecpm Aug 4, 2023
554f3a3
Use consistent checks for `undefined`. Explicitly require `lodash`. C…
alecpm Aug 4, 2023
a9de96d
Need to install the JS deps to test the JS build.
alecpm Aug 4, 2023
322cfd9
Make sure we install yarn.
alecpm Aug 4, 2023
c439c97
Allow the build to run on linux.
alecpm Aug 4, 2023
293390c
Merge pull request #257 from Dallinger/miscellaneous-js-build-cleanup
alecpm Aug 4, 2023
dbfee86
Implement transition visibility. Update some variable names. More com…
alecpm Aug 4, 2023
53dad97
Tweak some variable names.
alecpm Aug 4, 2023
abf6d6a
Change up emoji
alecpm Aug 4, 2023
3399e11
Small documentation update.
alecpm Aug 4, 2023
92f1bf4
Misc fixes.
alecpm Aug 4, 2023
0e05a3a
Merge pull request #258 from Dallinger/issues/256-transition-visibility
alecpm Aug 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Run tests

on:
push:

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('dev-requirements.txt') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r https://raw.githubusercontent.com/Dallinger/Dallinger/issues/5330-websocket-updates/dev-requirements.txt
pip install -r dev-requirements.txt
- name: Install dallinger
run: |
pip install git+https://github.com/Dallinger/Dallinger.git@issues/5330-websocket-updates#egg=dallinger[docker]
- name: Install experiment
run: |
pip install -e .[dev]
- name: Start dallinger services as docker containers
run: dallinger docker start-services
- name: Run pytest
run: pytest --junit-xml=test-results.xml
- name: Surface failing tests
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
display-options: fEX
fail-on-empty: true

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install yarn globally
run: npm install -g yarn
- name: Install JS deps with yarn
run: yarn install --ignore-optional
- uses: pre-commit/[email protected]
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ snapshots/*
data/*
dlgr/griduniverse/snapshots
dlgr/griduniverse/data/*
dlgr/griduniverse/dallinger_develop

.tox/*
*.egg-info/*
Expand All @@ -57,6 +58,8 @@ dlgr/griduniverse/data/*
docs/build/*
dlgr/griduniverse/dump.rdb

# Editor config, etc.
.vscode/
*.DS_Store

bin
Expand Down
30 changes: 30 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
repos:

- repo: https://github.com/psf/black
rev: 23.7.0 # update with `pre-commit autoupdate`
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.6+
files: ^(test|dlgr|demos)/|setup.py

- repo: https://github.com/PyCQA/flake8
rev: '6.0.0'
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- repo: local
hooks:
- id: compile-js
name: Update JS build
entry: "bash -c '( yarn run build && git add dlgr/griduniverse/static/scripts/dist ) || exit 1'"
language: system
files: "\\.js$"
pass_filenames: false
19 changes: 10 additions & 9 deletions .pyup.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
label_prs: "enhancement"
requirements:
- constraints.txt
update: all
pin: True
- requirements.txt
update: False
pin: False
- dev-requirements.txt
update: False
pin: False
- constraints.txt:
update: all
pin: True
- requirements.txt:
update: False
pin: False
- dev-requirements.txt:
update: False
pin: False
67 changes: 0 additions & 67 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Griduniverse

[![Build Status](https://travis-ci.org/Dallinger/Griduniverse.svg?branch=master)](https://travis-ci.org/Dallinger/Griduniverse)
[![Greenkeeper badge](https://badges.greenkeeper.io/Dallinger/Griduniverse.svg)](https://greenkeeper.io/)
[![Build Status](https://github.com/dallinger/Griduniverse/actions/workflows/test.yml/badge.svg)](https://github.com/Dallinger/Griduniverse/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/Dallinger/Griduniverse/branch/master/graph/badge.svg)](https://codecov.io/gh/Dallinger/Griduniverse)


Expand Down
Loading
Loading