69 Commits

Author SHA1 Message Date
axel7083 7eb1d88b15 fix: profile field serialization in compiler view (#1273)
* fix: profile field serialization in compiler view

* fix: formatting

* Update backend/coreapp/tests/test_preset.py
2024-06-10 01:41:59 -04:00
axel7083 c208896d99 feat(presets): include profile in preset owner field (#1252)
* feat(preset): uses ProfileField for owner field

* fix: linter

* fix: format

* fix: adding proper owner type
2024-05-20 21:04:06 +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 a06015fe90 Remove 'language' from TerseScratch serializer (#1205) 2024-04-23 01:17:30 +09:00
Ethan Roseman 509dc758c1 Remove is_you from /api/user (#1122) 2024-03-10 23:45:05 +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
Ethan Roseman f61668a77b Show presets on scratch lists & more (#954) 2024-02-08 19:29:18 +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 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
Mark Street edd7ee0f86 Fix permuter import (#903)
* Add test to demonstrate broken import

* Fix import from permuter
2023-10-31 07:01:54 +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
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 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
Mark Street 13d193541d API - Allow filtering scratches based on preset (#860) 2023-09-19 04:58:24 +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 3b39a6d3af Add clangd language server support (#739)
* Initial clangd support
Tidy up languageserver.ts
Add CompilerCommand option

* Codemirror tooltip newline handling

* Force github login through redirects instead of popup window

* Gracefully exit LS when scratch unloads

* Break scratch language out to api, move language server integration to new hook

* Fix broken import

* Fix languageServer.ts import warnings
(and rename languageserver.ts to languageServer.ts)

* Format on Alt-Shift-F

* Add default, site-wide .clang-format

* Allow source to reference context definitions

* Remove overzealous IIFEs

* Clean up yaml imports, useLanguageServer state

* Remove webpack yaml-specific config

* Fix default-clang-format.yaml loading

* Add editor option to enable / disable language server

* Change language server setting text

* Add ability to select small language server, version bump

* EditorSettings clean

* EditorSettings 2: Electric Boogaloo (sponsored by tailwind)

* Fix tooltip appearance

* Remove alignment settings from default-clang-format.yaml

* Remove references to preferSmallLanguageServer

---------

Co-authored-by: ConorBobbleHat <c.github@firstpartners.net>
Co-authored-by: Mark Street <streetster@gmail.com>
2023-06-04 14:15:27 +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
Matt Kempster 963179a9bf Allow submitting PRs from scratches (#391)
* [scratch][projects] Allow submitting PRs from scratches

* Fix up mypy and test

* Move .exists() call to get_dir() in GitHubRepo

* Fix tests

* Minor cleanup

* Frontend lint

* WIP of project function

* Get tests working again

* Move PR stuff to its own viewset

* Reform commit and PR titles

* Fix mypy errors

* Remove breakpoint

* fix

* fix tests

* mypy

* remove suspense from UserAvatarList

* fix tests after mypy

* mypy

* wip pr scratch basket

* implement pr basket

* adjust basket scratch padding

* require public_repo scope

* don't allow function to be added to pr basket twice

* fix pr backend

* only allow matched funcs to be added to pr

* add margin between attempt scratchlist items

* fix mypy issues

* fix eslint issue

* possibly fix test

* pr comments

* fix tests

* remove double import

* fix stylelint

* mock GitHubRepo.get_sha()

Co-authored-by: Alex Bates <alex@nanaian.town>
2022-09-14 13:59:57 +01:00
ConorB b026a2ef10 Implement colorful frog avatars for anonymous users (#517) 2022-09-03 19:21:38 +09:00
ConorB a473143fee Nicknames for anonymous users (#513)
* Begin implementing random pseudonyms for anonymous users

* Switch pseudonyms from [Adjective] / [Person] to [Adjective] / [Animal]

* Have the migration assign all users pseudonyms
(instead of lazily upon profile use)

* Tweak path handling, None checks
2022-08-30 22:24:12 +09:00
Ethan Roseman f50b3c32b8 disallow_untyped_defs for mypy (#477)
* Make mypy happy

* failing tests

* working

* use consistent annotation format

* remove comments
2022-07-03 23:43:59 +09:00
alex 9b31c9ebb8 Add family page & diff label editor (#438)
* add 'parent' url to TerseScratchSerializer

* add family page

* link to family in AboutScratch

* bump react-laag

* ui to edit diff label

* use User-Agent Client Hints API if supported

* fix pwa icons

* use carets instead of slashes between breadcrumbs

* use breadcrumbs on project function page

* fix save problem

* allow diff_label on compile

* a

* change placeholder

* new diff flags fix

* diff flags stuff

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2022-04-13 23:21:40 +09:00
Ethan Roseman f7982e0c90 Fix settings bugs (#434)
* Fix settings bugs
-woff was being filtered out of compiler flags upon scratch creation
diff_flags was being passed incorrectly to the backend

* filter less stuff

* fix tests
2022-04-06 02:14:01 +09:00
Anghelo Carvajal 231842b545 Allow specifying custom objdump flags (#427)
* Trying to add a new section

* objdump section is no longer borken

* objdump section is a bit more independent from the compilerargs one

* add objdump_flags to database

* Allow to save objdump flags on change

* Actually pass the objdump flags to objdump

* Allow adding objdump flags to presets

* add short description to compilers.json

* filter_objdump_flags

* Introduce GCCMIPSCompiler class

* Add -M gekko / broadway by default for gc/wii compilers

* format autogenerated file

* type annotation

* Disable enum trailing comma warnings on Majora's Mask

* wip

* flags as array, backend parsing, frontend cleanup

* style scratch options

* loose ends

* only show diff opts section if there are any options to show

* fix mypy

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
Co-authored-by: Alex Bates <alex@nanaian.town>
2022-04-05 22:19:04 +09:00