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

merge main into sa-selenium #305

Open
wants to merge 119 commits into
base: sa-selenium
Choose a base branch
from
Open

merge main into sa-selenium #305

wants to merge 119 commits into from

Conversation

FAReTek1
Copy link
Collaborator

add the new features to the selenium branch as well

(can't automatically merge)

TimMcCool and others added 30 commits November 9, 2024 14:12
…or is a builtin so i renamed it, also i fixed a typo in cloud_requests.py
Signed-off-by: FA ReTek <[email protected]>
(cherry picked from commit 6cb631f)
fixed image in pypi info page
(cherry picked from commit f3ce6a2)
@FAReTek1 FAReTek1 marked this pull request as ready for review December 23, 2024 13:12
@FAReTek1
Copy link
Collaborator Author

FAReTek1 commented Dec 23, 2024

I'm a bit inexperienced at GitHub so i am a bit scared of merging this

FAReTek1 and others added 11 commits December 24, 2024 10:00
…ok here!)

Classroom abilities + create studio + misc
NOTE: DUE TO THE SIZE OF THIS PR AND THE CONFLICTS THAT NEEDED TO BE SOLVED, IT IS POSSIBLE THAT SOME BUGS MAY HAVE BEEN INTRODUCED (sorry ;-;)

# New classroom abilities
Adds a wide array of capabilities for scratch's classroom system, including:
- Creating classes
- Loading closed classes using HTML web scraping
- Checking if a class is closed
- Setting thumbnails (also added the ability to set pfps of normal accounts as well)
- Setting descriptions
- Setting 'what we're working on'/status
- Setting class title/name
- Adding studios
- Closing/Reopening classes
- Registering students (NOT FROM CSV) **should this be removed?**
- Generating signup link (This actually just uses the class token)
- Fetching public activity (same format as user activity; loading from HTML)
- Fetching private activity  - things like comments or profile updates (in a bad format which is very improvable)
- Registering users with simply a class token
- Abilities to load stuff in classes in different sort modes

# Other new abilities
# create_studio()
Added the `Session.create_studio()` function to create studios to solve [an issue](#277) (#277). I copy+pasted rate limit code from `Session.create_project()`. Also added title/desc settings to make it more convenient

# exceptions
- Now using the msg argument in `exceptions.Unauthorized()` so that you can add more detail to the exception if need be. When receiving a 403/401 status code in the `requests` wrapper, it will now print the request  content which will sometimes be more descriptive than simply: "You are unauthorised"
- Renamed `ConnectionError` to `CloudConnectionError` since `ConnectionError` is actually a builtin error

### misc changes/features
- added password reset email sender (since i was resetting passwords of a lot of my old accounts)
- A few scratchtools endpoints (isonline, is beta user, scratchtools display name) in `other_apis.py`
- Added class option to `commons.webscrape_count`


### Extra Note(s)
- In `cloud_requests.py`, I fixed a typo of `self.call_even`, changing it to `self.call_event`. In the rare case this is intentional, now you know
- Also it looks like I pressed ctrl-alt-l again...
- I added a lot of dosctrings at the start of when I made this, before I knew about `from __future__ import annotations` so that may need to be fixed
sbeditor (Rival to project_json_capabilites) @ scratchattach.editor
Signed-off-by: TheCommCraft <[email protected]>
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.

4 participants