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

Child curations - backend. #321

Open
wants to merge 84 commits into
base: develop
Choose a base branch
from

Conversation

LindirQuenya
Copy link
Member

@LindirQuenya LindirQuenya commented Apr 1, 2022

The backend changes for #245.

Also, switch to better-sqlite3: performance was suffering without it, and I can't see a reason to stick with a slower version of the same functionality. Nope, better-sqlite3 doesn't do migrations correctly. It's been reverted.

For the testing: I've begun with rewriting the tests for GameManager.ts. I'm not too clear on how to test things beyond that... we'll see.

@LindirQuenya LindirQuenya changed the title Child curations. Child curations - backend. Apr 1, 2022
@coveralls
Copy link

coveralls commented Apr 1, 2022

Pull Request Test Coverage Report for Build 2234249069

  • 49 of 134 (36.57%) changed or added relevant lines in 9 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-21.3%) to 38.855%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/back/GameLauncher.ts 2 8 25.0%
src/back/util/misc.ts 1 12 8.33%
src/shared/curate/metaToMeta.ts 1 13 7.69%
src/back/importGame.ts 3 30 10.0%
src/back/game/GameManager.ts 21 50 42.0%
Totals Coverage Status
Change from base Build 2011998412: -21.3%
Covered Lines: 1201
Relevant Lines: 2730

💛 - Coveralls

@LindirQuenya
Copy link
Member Author

LindirQuenya commented Apr 1, 2022

Things I currently know that I need to fix:

  • Native overrides in execs.json don't seem to work with children.
  • Extras need to be fixed.
  • A whole bunch of strings need to be added.
  • All backend tests need to be rewritten.
  • ESLint messages should be addressed.
  • Curation needs to be tested.
  • Importing needs to be tested.
  • The game counter at the bottom needs fixing.
  • The game data browser is broken?

That is: I hope so. I haven't tested curation yet, but I *think* this
will fix some portions of it.
Previously, the blank platform strings of children were included in the
results of findPlatforms().
Also make some == into ===, and make the message bar appear in when
browsing.
@LindirQuenya
Copy link
Member Author

In case you're wondering about the point of b49d9c1: in my testing, it looked like typeorm doesn't translate undefined properties to NULL in the database - in fact, it doesn't seem to touch them at all. This (kinda old) comment suggests that this is intentional - we will need to actually set the property to null if we want it to be NULL in the DB.

@LindirQuenya LindirQuenya marked this pull request as ready for review April 3, 2022 02:19
@LindirQuenya
Copy link
Member Author

better-sqlite3 wasn't running the migrations properly on Windows, so I've reverted c64d1f7. Performance is less important than the launcher working on Windows.

Remove some temporary statements, and add a relation-loading statement
for the tags of child games.
Previously, the param was marked as optional. However, failure to supply
it resulted in an error (column not found).
Switch the comparison for keyset pagination when orderBy is different.
Don't open a new database connection if one already exists, and don't
close the connection at the end of testing.
Also: add some jsdoc and a possible todo, and remove an unneeded
selected colum.
Also switch filtering funcs to === from ==.
Also clean up some TODOs.
Implement the child edit function and turn on cascades for children.
Set the default child modified and added dates to the unix epoch.
Previously, the all-zeroes date was resulting in a null datetime object.
@LindirQuenya
Copy link
Member Author

That should bring it up to date with develop. The GameManager tests are in the wrong place though, one moment.

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.

2 participants