-
Notifications
You must be signed in to change notification settings - Fork 42
AI Usage section of Major Project Submission #613
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
Draft
shaeespring
wants to merge
6
commits into
develop
Choose a base branch
from
shaeespring/ai_usage
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4fa2c8d
for the love of god i hate docker
shaeespring 689594a
Merge branch 'develop' into shaeespring/ai_usage
shaeespring aac96bb
migration data
shaeespring 0048725
Merge branch 'develop' into shaeespring/ai_usage
shaeespring 155b2ad
Merge remote-tracking branch 'origin/develop' into shaeespring/ai_usage
shaeespring 9698a19
feedback and Readme update
shaeespring File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,28 @@ | ||
| from sqlalchemy import desc, func | ||
|
|
||
| from conditional import db, start_of_year | ||
| from conditional.models.models import MajorProject | ||
| from conditional.models.models import MajorProjectSkill | ||
| from conditional.models.models import MajorProject, MajorProjectSkill | ||
|
|
||
|
|
||
| def get_project_list(): | ||
| proj_list = db.session.query( | ||
| MajorProject.id, | ||
| MajorProject.date, | ||
| MajorProject.uid, | ||
| MajorProject.name, | ||
| MajorProject.tldr, | ||
| MajorProject.time_spent, | ||
| MajorProject.description, | ||
| MajorProject.links, | ||
| MajorProject.status, | ||
| func.array_agg(MajorProjectSkill.skill).label("skills") | ||
| ).outerjoin(MajorProjectSkill, | ||
| MajorProject.id == MajorProjectSkill.project_id | ||
| ).group_by(MajorProject.id | ||
| ).where(MajorProject.date >= start_of_year() | ||
| ).order_by(desc(MajorProject.date), desc(MajorProject.id)) | ||
| proj_list = ( | ||
| db.session.query( | ||
| MajorProject.id, | ||
| MajorProject.date, | ||
| MajorProject.uid, | ||
| MajorProject.name, | ||
| MajorProject.ai_usage, | ||
| MajorProject.tldr, | ||
| MajorProject.time_spent, | ||
| MajorProject.description, | ||
| MajorProject.links, | ||
| MajorProject.status, | ||
| func.array_agg(MajorProjectSkill.skill).label("skills"), | ||
| ) | ||
| .outerjoin(MajorProjectSkill, MajorProject.id == MajorProjectSkill.project_id) | ||
| .group_by(MajorProject.id) | ||
| .where(MajorProject.date >= start_of_year()) | ||
| .order_by(desc(MajorProject.date), desc(MajorProject.id)) | ||
| ) | ||
|
|
||
| return proj_list |
26 changes: 26 additions & 0 deletions
26
migrations/versions/3aeffe20e07c_ai_usage_input_for_major_projects.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| """AI usage input for major projects | ||
|
|
||
| Revision ID: 4c0f1c4e006f | ||
| Revises: ce92a683ecf8 | ||
| Create Date: 2026-09-06 22:35:09.349126 | ||
|
|
||
| """ | ||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision = "4c0f1c4e006f" | ||
| down_revision = "5e8db174ce30" | ||
|
|
||
| import sqlalchemy as sa | ||
| from alembic import op | ||
|
|
||
|
|
||
| def upgrade(): | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.add_column("major_projects", sa.Column("ai_usage", sa.Text(), nullable=True)) | ||
| # ### end Alembic commands ### | ||
|
|
||
|
|
||
| def downgrade(): | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.drop_column("major_projects", "ai_usage") | ||
| # ### end Alembic commands ### |
26 changes: 26 additions & 0 deletions
26
migrations/versions/4c0f1c4e006f_ai_usage_input_for_major_projects.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| """AI usage input for major projects | ||
|
|
||
| Revision ID: 4c0f1c4e006f | ||
| Revises: ce92a683ecf8 | ||
| Create Date: 2026-09-06 22:35:09.349126 | ||
|
|
||
| """ | ||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision = "4c0f1c4e006f" | ||
| down_revision = "ce92a683ecf8" | ||
|
Comment on lines
+3
to
+11
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're going to hate me, but because I hotfixed the stuff for account creation, this is broken, when it references |
||
|
|
||
| import sqlalchemy as sa | ||
| from alembic import op | ||
|
|
||
|
|
||
| def upgrade(): | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.add_column("major_projects", sa.Column("ai_usage", sa.Text(), nullable=True)) | ||
| # ### end Alembic commands ### | ||
|
|
||
|
|
||
| def downgrade(): | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.drop_column("major_projects", "ai_usage") | ||
| # ### end Alembic commands ### | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is crashing, you need to edit
conditional/utils/major_project.pyto include ai usage i believe