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

Created Project dashboard #1054

Merged
merged 4 commits into from
Dec 23, 2023
Merged

Created Project dashboard #1054

merged 4 commits into from
Dec 23, 2023

Conversation

Sujanadh
Copy link
Contributor

@Sujanadh Sujanadh commented Dec 21, 2023

Updates

This PR introduces the get_dashboard_detail async function, which fetches project details for the project dashboard using project_id.

Response

{
"project_name_prefix": "test sujan",
"organization": "naxa",
"organization_logo": "http://s3.fmtm.localhost:7050/fmtm-data/1/logo.png",
"total_tasks": 6,
"total_submission": 0,
"total_contributors": 2,
"created": "06 Dec 2023",
"last_active": "6 days ago"
}

Copy link
Member

@spwoodcock spwoodcock left a comment

Choose a reason for hiding this comment

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

Nice using the pydantic schemas 👍

@spwoodcock spwoodcock merged commit db32567 into development Dec 23, 2023
4 of 5 checks passed
@spwoodcock spwoodcock deleted the project-dashboard branch December 23, 2023 10:58
@varun2948
Copy link
Contributor

varun2948 commented Jan 8, 2024

@spwoodcock, what are we using from now on? Pydantic schemas or raw SQL? I've noticed that some parts of the code use Pydantic, while others use raw SQL. Shouldn't it be consistent throughout the entire codebase, or am I missing something?

@spwoodcock
Copy link
Member

spwoodcock commented Jan 8, 2024

Hi @varun2948, you raise a good point!
Although I think you must mean SQLAlchemy models vs raw SQL.

Pydantic schemas are used for JSON serialization to and from (SQLAlchemy) database models.

That plan was (and still possibly is) to refactor out SQLAlchemy in favour of raw SQL.
But until there is time to do that, we can use either raw SQL or the SQlAlchemy models (with raw SQL being preferred if possible).

@varun2948
Copy link
Contributor

Oh yeah i meant SQLAlchemy vs raw SQL 😄 okay sounds good @spwoodcock Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants