Closed dsimmons87 closed 1 year ago
The added maps are of map format 11. We have switched to using map format 12 while still supporting format 11 FYI the main change of the format is the addition map.png into the unique map hash
In the future you could make it so github actions run python3 manage.py seedtestdata {email} {username} {password}
everytime a PR is opened / commit merged
Other than that I'm not sure anyone can / will review this PR. There's a reason why resource centre has been neglected for such a long time.
In the future you could make it so github actions run
python3 manage.py seedtestdata {email} {username} {password}
everytime a PR is opened / commit merged
I don't think we want to create a superuser each time a PR is merged.
Yep the seeder is just to get a test environment set up quickly so it's easier to get started working on the resource center. Or if you just want a quick reset when testing changes out. It isn't meant to be run on deployment.
The map version can be updated, but for now, until the next release, it should be fine on this version in my opinion. Once the next version is released, a PR can be put in with updated maps if needed.
It would be nice at some point to maybe get the tests run automatically for commits if that's possible, so that it's easier to confirm that a commit is less likely to have broken anything?
This PR adds a seeder command to make it easier to get started working on the resource center.
This is used as follows:
python3 manage.py seedtestdata {email} {username} {password}
This will then create an superuser account using those details, and import three very basic sample maps: One normal; one with custom rules; and one with Lua.
This saves issues whereby normally if you create a super user, they are banned from uploading anything for a period, so you have to get access to the database and doctor it (the seeder automatically sets the creation date sufficiently back).
This also saves having to manually hunt down maps and upload them just to get a test site up.
In this PR I've also started adding some tests too, but for now they only test the seeder.