42 Commits

Author SHA1 Message Date
Mark Street a8995a4a4a Add extra sanity check to user.is_online() (#1453)
* Add extra sanity check to user.is_online()

* mypy?
2025-02-10 18:46:08 +09:00
Ethan Roseman 36edf529ca Try to fix the overabundance of profiles (#1370)
* Try to fix the overabundance of profiles

and dep updates

* thanksh, stubs

* stop using deleted password generation method in tests

* Fix silly test stuff

* fix filtering
2024-10-27 22:40:03 +09:00
Ethan Roseman 90b1b88543 Update backend deps, try to fix bug, remove CompilerConfig (#1256)
* Update backend deps, try to fix bug, remove CompilerConfig

* Upgrade Poetry in Docker to 1.8.3, fix ordering of fields list
2024-05-27 01:52:00 +09:00
Ethan ee3ebb7f95 Fix admin panel for modifying Presets 2024-05-26 16:26:31 +09:00
Ethan Roseman 9a02a004d9 Remove old preset-creation migration from the nation (#1247)
* Remove old preset-creation migration from the nation

* Victory?

* This time for sure
2024-05-20 19:37:46 +09:00
axel7083 efe7024215 feat(backend): allowing auth users to create presets (#1228)
* feat(backend): allowing auth users to create presents

* test(preset): improve coverage

* fix: linter&preset behaviour

* fix: remove unused import

* fix: mypy

* fix: mypy return type
2024-05-16 20:50:16 +09:00
Mark Street ed910d70a6 Fix editing of scratches on /admin endpoint (#960)
* Fix editing of scratches on /admin endpoint

* hide claim_token from scratch edit admin page

* much better

* myfry

* pr feedback

* black
2024-02-11 03:22:24 +09:00
Ethan Roseman 139ac9ff73 Stop relying on GitHub's API so much (#956)
* Move some github details into model

* Nevermind - just don't rely on the API at all lol

* comment

* tidying

* remove unneeded mock

* remove the 'small' profile
2024-02-09 21:50:40 +09:00
Mark Street b792d4d517 Attempt to fix 500 on missing github user (#949)
* Attempt to fix 500 on missing github user

* mypy

* mycry
2024-02-05 04:35:21 +09:00
Luke Street 85c2e215d5 Use random token for claiming scratches (#945)
* Use random token for claiming scratches

* Fix migration dep

* Fix claim_token serialization & address PR comments

* Improve error handling

* Update backend tests

* reformat

* Update another test

* Minor update to ClaimableScratchSerializer
2024-01-19 16:02:05 +09:00
Luke Street 5369f81263 Support binary target_obj in scratch creation (#943)
* Support binary `target_obj` in scratch creation

Also support `--disassemble=` in `diff_flags`,
so the scratch can be limited to a single function
within the object.

Resolves https://github.com/decompme/decomp.me/issues/215

* Test fixes

* Validate uploaded file size & magic

Remove `-D` from `skip_flags_with_args`,
we want to keep defines.
2024-01-17 15:52:41 +09:00
Ethan Roseman da7869adf6 Update to Django 5 (#931)
* Update to Django 5

* Ah yes, the classic yaml number problem

* Typechecking issues
2023-12-17 20:56:07 +09:00
Ethan Roseman c80abfaa05 Platform page & preset page (#906)
* Platform page & preset page

* Fix mypy

* improve styles

* move presetUrl to its own file and fix star import

* oops

* Show number of scratches on platform / preset page

* Remove url field stuff & leftovre ProjectFunction stuff

* Remove more projectfunction stuff

* black

* Attempting to remove most url and html_url

* oops

* mypy

* fixz

* suggz

---------

Co-authored-by: Alex Bates <alex@nanaian.town>
2023-11-13 22:23:12 +09:00
Ethan Roseman 8d7deedb12 Set blank=True on json fields (#905) 2023-10-31 07:23:59 +09:00
Ethan Roseman 4ae89872e2 Presets in the DB (#897)
* Organize tests, update settings, backend deps

* Remove project import code from backend

* Remove some frontent project code

* more progress, project cleanup

* more preset work

* .

* upd8z

* Admins can delete scratches & preset migration

* bye, source presets

* fixes & changes

* Preset in admin panel & rename migration

* mypy

* Fix perset viewset & tests

* Change compilers hash files

* test annotations so Windows doesn't run them

* Mark nits

* Preset auto ID field

* scratch as reference (1/?)

* backend fixes to preset (2/3)

* Use preset ID instead of name in frontend

* update frogger preset

* I broke one of the ten commandments of react

* finishing touches (3/3 lol)

* Update serializers.py
2023-10-27 23:40:59 +09:00
Ethan Roseman 23a3087a38 Sentry issue fixes (#900)
* Catch login failures and raise an exception

* Trying to fix library serialization crap (not working)

* Use validated_data instead of data

* Promments
2023-10-26 03:37:38 +09:00
Robin Lambertz e33b5fb3cf Add libraries support to presets (#873)
* Add libraries support to presets

* Add directx 5 to lego island preset

* Move libraries to named globals

* Fix bug preventing changing the version of a library
2023-10-09 20:06:25 +01:00
Robin Lambertz fb69aceded Fix libraries migration (#876) 2023-10-04 18:57:16 +09:00
Robin Lambertz e1c33d47d3 Support libraries in decomp.me (#843)
* Add script to download libraries, and download directx

* Add libraries endpoint

* Allow compiling with a library

* Add new libraries tab in frontend

* Add libraries support in CI

* Better look for the libraries

* Give pretty names to libraries

* Move Libraries to live under CompilerOpts

* typechecking hackery

* Make libraries trigger autorecomp and set the unsaved flag

* Fix libraryVersions

* Add new libraries download script to CI, docker and docs

---------

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2023-09-30 14:54:40 +09:00
Ethan Roseman ebd520c536 Add a way to manually mark a scratch as matching (fixes #401) (#804) 2023-07-10 13:40:59 +09:00
ConorB aded2ee902 Fix server error upon processing user with revoked github token (#783)
* Don't use an auth token to fetch details if we don't have to

* Try to use the user token as much as possible

* Force users with bad tokens to log in again

* Fix invalid token session deletion

* GitHubUser.details shouldn't make network requests

---------

Co-authored-by: ConorBobbleHat <c.github@firstpartners.net>
2023-07-03 21:50:43 +09:00
Ethan Roseman b0c9160b33 Diff label max size increase (#715)
* Increase diff label limit

whyyyy

* Increase scratch name limit
2023-03-26 20:49:16 +09:00
Ethan Roseman 9651b7dcf2 A few issues (#603)
Fixes #312 - removes login event from plausible
Fixes #249 - adds the course db models
Fixes #583 - allow viewing target asm even when the scratch doesn't
initially compile

Update frontend & backend deps
2022-12-14 23:40:41 +09:00
Alex Bates 2e96373ac7 Projects list, creation, settings pages (#542)
* add projects list

* new project page

* mypy

* allow '.' in github identifiers

* implement project create

* project settings

* disallow anons from being project members

* uploadable project icon

* docker attempt

* fix tests

* add tests

* add description form

* refactor to add useEntity and FieldSet

* move FieldSet out of subdirectory

* use same page for project tabs

* scroll up to UnderlineNav when tab changes

* stylelint

* configure vscode mypy extension

* mypy

* fix mypy and dmypy

dmypy does not support follow_imports=silent. Instead we explicitly
disable most checks for asm_differ and m2c, which
has the same effect

* remove redundant mypy flags

* FieldSet style tweaks

* give UnderlineNav horiz padding

* fix swr mutate of project header

* few tweaks to help docker (#550)

* eth changes

* use POST/DELETE rather than PUT for project members

* add migration

* fix pr creation

* simplify project platform derivation

Co-authored-by: Mark Street <22226349+mkst@users.noreply.github.com>
Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2022-10-07 20:12:18 +09:00
Alex Bates 5abadc1596 Only request public_repo GitHub scope when making a PR (#529)
* remove public_repo requirement for login

* request public_repo on pull request create if needed
2022-09-15 10:34:06 +09:00