Skip to content

Conversation

@warix8
Copy link
Contributor

@warix8 warix8 commented Apr 10, 2025

Description

This PR add a miscellaneous module for some stuff.
It adds contacts information for a website from PE5 to protect information about contact on the campus such as phone, number, location in order to not leak them on Internet directly.

Checklist

  • Created models
  • Created schemas
  • Created cruds
  • Created endpoints
  • All tests passing

@codecov
Copy link

codecov bot commented Apr 10, 2025

Codecov Report

Attention: Patch coverage is 96.80851% with 3 lines in your changes missing coverage. Please review.

Project coverage is 82.00%. Comparing base (001b352) to head (f9cc150).

Files with missing lines Patch % Lines
app/modules/misc/cruds_misc.py 93.10% 2 Missing ⚠️
app/utils/auth/providers.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #693      +/-   ##
==========================================
+ Coverage   81.88%   82.00%   +0.12%     
==========================================
  Files         152      156       +4     
  Lines       10862    10956      +94     
==========================================
+ Hits         8894     8985      +91     
- Misses       1968     1971       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@warix8 warix8 requested a review from Copilot April 10, 2025 10:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

tests/test_contact.py:15

  • [nitpick] Consider refactoring to avoid module-level global variables for tokens and contact. Use fixtures that yield these values instead to improve test isolation and maintainability.
token_simple: str

@Marc-Andrieu
Copy link
Member

Consider writing in code comments that it is instead for the future "satefy cards" website... few know the context!
Saying that "safety cards" website = PE5 here in the discussion is enough.

Also, where is the AuthClient to authenticate via MyECL ?

@Marc-Andrieu
Copy link
Member

Last but not least: a (super)module for miscellaneous small (sub)modules sounds like a good idea to me (see others in Titan), but it may create lengthy discussions to actually create it.

Comment on lines 9 to 17
class Contacts(Base):
__tablename__ = "misc_contacts"

id: Mapped[PrimaryKey]
creation: Mapped[datetime]
name: Mapped[str]
email: Mapped[str | None]
phone: Mapped[str | None]
location: Mapped[str | None]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use CoreData

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants