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

More migration stuff, more endpoints, map categories #3

Merged
merged 10 commits into from
May 28, 2024

Conversation

alexlambson
Copy link
Collaborator

@alexlambson alexlambson commented Feb 14, 2024

  • Add a system user for last_modified_by in migrations. This user is hidden by default in CncUser.objects.all() queries.
  • Clean up migrations a bit
  • Make the user management class available in migrations
  • Make map category slugs auto-generate
  • Pop fields that non-admins shouldn't see over the API
  • Start standardizing what our response.data is going to look like. I want to avoid the UI needing a is list or is dict check for api returns
  • Fix the pagination class to use limits and offsets
  • Make pagination return standard api format
  • Fix and test map category endpoint
  • Add standard map categories in a migration. Copied from https://github.com/CnCNet/cncnet-yr-client-package/blob/develop/package/INI/MPMaps.ini
  • Endpoint for the UI to check permissions for which buttons/views to render.
  • Get CI for pytest working

@alexlambson alexlambson self-assigned this Feb 14, 2024
- Add a system user for `last_modified_by` in migrations. This user is hidden by default in `CncUser.objects.all()` queries.
- Clean up migrations a bit
- Make the user management class available in migrations
- Make map category slugs auto-generate
- Pop fields that non-admins shouldn't see over the API
- Start standardizing what our `response.data` is going to look like. I want to avoid the UI needing a `is list or is dict` check for api returns
- Fix the pagination class to use limits and offsets
- Make pagination return standard api format
- Fix and test map category endpoint
- Add standard map categories in a migration. Copied from https://github.com/CnCNet/cncnet-yr-client-package/blob/develop/package/INI/MPMaps.ini
- Add Kirovy mascot.

PR: #3
@alexlambson alexlambson force-pushed the alex/feat/more-endpoints branch from 2207cab to a9204fb Compare February 14, 2024 09:25
- Make map categories many 2 many.
- Actually test the map upload path

PR: #3
- Initial work to show UI permissions

PR: #3
- First attempt at a CI and make a docker file for tests

PR: #3
- First attempt at a CI and make a docker file for tests

PR: #3
- First attempt at a CI and make a docker file for tests

PR: #3
- Made it unnecessary to have testing api creds in CI.
- Added a way to disallow certain boolean settings in prod
- Renamed some authentication stuff to be less confusing
- UI permissions endpoint and tests
- Add library to check file types
- Update docker and readme
- Update requirements
- Add field for incomplete uploads in case someone uploads a map, but never fills out metadata. These maps should be deleted if the user never finalizes the upload.
- Make a response for errors
- Fix the `is_text` check to account for `InMemoryUploads` being deleted when they are closed, meaning we couldn't use `with open(temp_file, "tr")` to check for text anymore.
- Make `ByteSized`. Might move into its own repo at some point.
- Fix binary fixture not reading as binary
- Fix the map parser service to use django's `UploadedFile` correctly
- Start figuring out the serialization and creation of the map model objects

TODO:

- Map category fetching.
- Actually save the map file
- Generate a filename
- check map hashes and cncnetid. Exclude cncnet id section from hashing
- Add the cncnetID
- Actually verify saved files in test.
- Move everything to a DRF serializer for more safety.
- Update readme for running tests
- Use `hex` for UUIDs in filenames to remove hyphens
- Update naming pattern
- Make map version uneditable. Only set version when it is None so we don't overwrite the version with each save call.
- Fix files loaded from file fixtures not working with the map parser. The issue was we used `"r"` but a file uploaded via django was `"rb"`.
- Got map uploader basically working and writing cncnet ID
- Add support for detecting reuploads and marking the original map as the parent.
@alexlambson
Copy link
Collaborator Author

People are too busy to review so I'm going to merge

@alexlambson alexlambson merged commit b2986b2 into main May 28, 2024
1 check passed
@alexlambson alexlambson deleted the alex/feat/more-endpoints branch May 28, 2024 07:20
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.

1 participant