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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.0: Async? + API feedback #262

Open
bain3 opened this issue Sep 12, 2023 · 3 comments
Open

v3.0: Async? + API feedback #262

bain3 opened this issue Sep 12, 2023 · 3 comments
Labels
question Further information is requested

Comments

@bain3
Copy link
Owner

bain3 commented Sep 12, 2023

I am thinking about 3.0, and if the library should be async, or not. What are your thoughts? React with 馃憤 (async), or 馃憥 (sync), please.

It really depends on what people are using it for, and if it would make it easier to use.

If you think the API should be changed, or have some feedback, leave a comment :)

@bain3 bain3 added the question Further information is requested label Sep 12, 2023
@bain3 bain3 changed the title Async? Async? + API feedback Sep 12, 2023
@bain3 bain3 changed the title Async? + API feedback v3.0: Async? + API feedback Sep 12, 2023
@bain3
Copy link
Owner Author

bain3 commented Sep 12, 2023

What I have so far:

  • clean up parsing, split dataClasses file, since it is becoming a mess
  • try to use the dataclasses module.
  • make all the properties (like Period.grades) functions, since they actually make requests, which is kinda hidden
  • don't calculate averages if there are none, just stick to what pronote gives us
  • keep communication logic, login, etc... inside the communication class. The client should really just make requests, not caring about encryption, or how to log in.

@bain3 bain3 pinned this issue Sep 12, 2023
@tarneaux
Copy link
Contributor

I'd also add a general code cleanup.
For example, why do both teacher_name and teacher_names exist for the same pronotepy.lesson dataclass? Shouldn't one of them be removed? Is Lesson.virtual_classrooms still relevant (does pronote still have that feature)?

@bain3
Copy link
Owner Author

bain3 commented Sep 12, 2023

Yes, definitely, that's the main point of v3. The teacher_name attribute is for backwards compatibility. There are multiple things that should be removed, but were left there, so that we don't break the API unnecessarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants