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

Game meta, data validation and schema #358

Merged
merged 35 commits into from
Oct 9, 2016
Merged

Conversation

nikuda
Copy link
Collaborator

@nikuda nikuda commented Oct 7, 2016

Using pykwalify library to make sure the structure of games.yaml is valid. It picked up a lot of errors even in this basic form - see schema.yaml. More validating can be added later through pykwalify extensions.

Some of the erors picked up in game structure :

...
 - Key 'image' was not defined. Path: '/95/clones/0'.
 - Key 'ststus' was not defined. Path: '/106/clones/0'.
 - Key 'names' was not defined. Path: '/127/clones/0'.
 - Key 'licence' was not defined. Path: '/205/clones/2'.
 - Key 'image' was not defined. Path: '/225/clones/0'.
 - Key 'lang:' was not defined. Path: '/232/clones/1'.
 - Key 'licence' was not defined. Path: '/248/clones/0'.
 - Key 'licence' was not defined. Path: '/270/clones/0'.
 - Key 'stats' was not defined. Path: '/335/clones/2'.
 - Key 'licence' was not defined. Path: '/377/clones/0'.
 - Key 'image' was not defined. Path: '/447/reimplementations/0'.: Path: '/'>

With status constrained to [complete, active, sporadic, halted]:

...
 - Enum 'active (not playable yet)' does not exist. Path: '/101/reimplementations/0/status'.
 - Enum 'not playable' does not exist. Path: '/115/clones/1/status'.
 - Enum 'active (not playable, needs game data)' does not exist. Path: '/124/clones/1/status'.
 - Enum 'playable' does not exist. Path: '/137/clones/0/status'.
 - Enum 'halted (seems to be playable)' does not exist. Path: '/201/clones/2/status'.
 - Enum 'sporadic (not playable yet)' does not exist. Path: '/216/clones/0/status'.
 - Enum 'halted (basic game)' does not exist. Path: '/219/clones/0/status'.
 - Enum 'halted (or very sporadic) (playable)' does not exist. Path: '/262/clones/2/status'.
 - Enum 'active (alpha, playable)' does not exist. Path: '/267/clones/0/status'.
 - Enum 'status unavailable' does not exist. Path: '/275/clones/0/status'.
 - Enum 'active (required original files)' does not exist. Path: '/307/clones/1/status'.
 - Enum 'playable' does not exist. Path: '/312/clones/0/status'.: Path: '/'>

Related: #30
Closes: #336 #353 #360

@cxong
Copy link
Member

cxong commented Oct 7, 2016

huh, I didn't realise people were using status for both development status and playable status! Perhaps they should be separate fields. That should simplify the schema. Although I'm sure people will want to put custom playability values in, like "single player only", "some maps broken".

@nikuda
Copy link
Collaborator Author

nikuda commented Oct 7, 2016

Perhaps they should be separate fields.

I'm about to push a change for that ☺️

Although I'm sure people will want to put custom playability values in, like "single player only", "some maps broken".

I think we should put this kind of misc information into the info key.

@cxong
Copy link
Member

cxong commented Oct 7, 2016

Although I'm sure people will want to put custom playability values in, like "single player only", "some maps broken".

I think we should put this kind of misc information into the info key.

Good idea; it's something to watch out for though, because it means playability isn't a simple true/false value, there needs to be a 'partial' option. Depending on who you ask, a game isn't playable unless all of it is playable, or it's playable as long as a small portion of it is.

@nikuda
Copy link
Collaborator Author

nikuda commented Oct 7, 2016

New schema:

status: complete | playable | unplayable
development: complete | very active | active | sporadic | halted

there needs to be a 'partial' option

Just added 'complete' value to status key schema indicate that all of the game is playable, that it is feature complete.


If we try to add status: sometimes playable we get:

 - Enum 'sometimes playable' does not exist. Path: '/428/reimplementations/2/status'

Or if you try to add development: playable:

- Enum 'playable' does not exist. Path: '/429/reimplementations/0/development'

This gets us a bit closer to #30 (comment)

* Development tag background colour changed
@cxong
Copy link
Member

cxong commented Oct 7, 2016

  • I think now that it's split, playable is a better name than status
  • Now that I think more about it, semi-playability is only clear for perfect clones or those that use original game data. For "inspired by" games, it's not clear, and probably depends on that project's goals more than the original game. So I guess playable will be playable/unplayable most of the time, so I like your first option better - semi-playable

@nikuda
Copy link
Collaborator Author

nikuda commented Oct 7, 2016

Cool, changed status schema to

status: playable | semi-playable | unplayable

@nikuda
Copy link
Collaborator Author

nikuda commented Oct 7, 2016

I think if we change the status key to playable then maybe this schema would be more suited?

playable: yes | partial | no

Or something along those lines...

@nikuda nikuda force-pushed the validation branch 6 times, most recently from b9e4c5d to dac8154 Compare October 7, 2016 07:32
@nikuda
Copy link
Collaborator Author

nikuda commented Oct 7, 2016

Ready for review/merge.

This PR fixes a ton of inconsistencies/errors in games.yaml, some of the bigger changes:

Validation:

screen shot 2016-10-07 at 11 27 43 pm

@nikuda
Copy link
Collaborator Author

nikuda commented Oct 8, 2016

  • Added meta key
  • Added genre/theme validation
  • Genre/theme shows up next to game title like the other tags
  • Added Genre tag cloud below the Language tag cloud

Genre/theme info from www.giantbomb.com/games

Closes #353 and #360

screen shot 2016-10-08 at 6 57 59 pm

@nikuda nikuda mentioned this pull request Oct 8, 2016
Using 'youtube' media instead of 'raw'. Raw embed
code goes out of date, using YouTube video ID instead.
It also allows more uniformity in how videos are displayed.
Most of the raw embeds were not working, the embed
code changes too often it seems.
While thumbnails are still used don't force
all images to be the same size, just fit
the ones exceeded 500px width.
@nikuda
Copy link
Collaborator Author

nikuda commented Oct 8, 2016

Most of the youtube embed code was broken, fixed by:

  • Removing raw embed support
  • Adding youtube embeds based on youtube video id (validated)
  • Adding vimeo embeds based on vimeo video id (validated)
  • Making large images fit the content area

Now all of the 30+ youtube videos are working again ✨

@nikuda
Copy link
Collaborator Author

nikuda commented Oct 9, 2016

Added subgenres

- name: C-Dogs
  meta:
    genre: [Action, Shoot 'Em Up]
    subgenre: [Run and gun]
  clones:
    - name: C-Dogs SDL
  ...

Thoughts? @cxong @wonea @piranha

It will remove images/embeds when closed now, which
stops any videos playing and is easier on memory usage.
@nikuda nikuda changed the title Validating games.yaml schema Game meta, data validation and schema Oct 9, 2016
@wonea
Copy link
Collaborator

wonea commented Oct 9, 2016

Thanks for this, lets run with it.

@wonea wonea merged commit 8a40bba into opengaming:master Oct 9, 2016
@wonea
Copy link
Collaborator

wonea commented Oct 9, 2016

Also the template needs to be changed to new people submit issues & pull requests

https://github.com/piranha/osgameclones/blob/master/.github/ISSUE_TEMPLATE.md

@piranha
Copy link
Collaborator

piranha commented Oct 9, 2016

Wow, that's pretty cool what you did here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants