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

Add GPT-based Project Analysis #547

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby 2.7.7
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ gem 'bootsnap','>= 1.1.0', require: false
gem 'addressable'
gem 'aws-sdk-s3'
gem 'bourbon', '~> 4.0.2'
gem 'bcrypt', '~> 3.1.7'
gem 'clearance', '~> 2.5.0'
gem 'clearance-deprecated_password_strategies'
gem 'coffee-rails'
Expand All @@ -24,7 +25,9 @@ gem 'jquery-rails', '~> 4.1.1'
gem 'jquery-ui-rails', '~> 3.0.1'
gem 'magnific-popup-rails'
gem 'mail', '~> 2.7.1' # TODO see if this is still required in Ruby 3
gem 'nio4r', '>= 2.7.3'
gem 'nokogiri', '~> 1.14.3'
gem 'ruby-openai'
gem 'pg', '~> 1.4.4'
gem 'puma', '< 7'
gem 'rack-attack'
Expand All @@ -51,6 +54,7 @@ group :development do
gem 'dotenv-rails'
gem 'letter_opener'
gem 'listen'
gem 'standard'
gem 'web-console'
end

Expand Down
63 changes: 61 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ GEM
argon2 (2.1.1)
ffi (~> 1.14)
ffi-compiler (~> 1.0)
ast (2.4.2)
aws-eventstream (1.2.0)
aws-partitions (1.646.0)
aws-sdk-core (3.160.0)
Expand All @@ -85,7 +86,8 @@ GEM
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
bcrypt (3.1.18)
base64 (0.2.0)
bcrypt (3.1.20)
bindex (0.8.1)
bootsnap (1.13.0)
msgpack (~> 1.2)
Expand Down Expand Up @@ -151,6 +153,7 @@ GEM
email_validator (2.2.3)
activemodel
erubi (1.12.0)
event_stream_parser (1.0.0)
execjs (2.8.1)
factory_girl (3.5.0)
activesupport (>= 3.0.0)
Expand All @@ -159,6 +162,13 @@ GEM
railties (>= 3.0.0)
faker (2.23.0)
i18n (>= 1.8.11, < 2)
faraday (2.8.1)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (3.0.2)
ffi (1.15.5)
ffi-compiler (1.0.1)
ffi (>= 1.0.0)
Expand Down Expand Up @@ -199,10 +209,13 @@ GEM
jquery-ui-rails (3.0.1)
jquery-rails
railties (>= 3.1.0)
json (2.7.4)
language_server-protocol (3.17.0.3)
launchy (2.5.0)
addressable (~> 2.7)
letter_opener (1.8.1)
launchy (>= 2.2, < 3)
lint_roller (1.1.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
Expand All @@ -224,11 +237,16 @@ GEM
mocha (1.2.1)
metaclass (~> 0.0.1)
msgpack (1.6.0)
multipart-post (2.4.1)
newrelic_rpm (7.2.0)
nio4r (2.5.8)
nio4r (2.7.3)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
parallel (1.26.3)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
pg (1.4.4)
protobuf-cucumber (3.10.8)
activesupport (>= 3.2)
Expand Down Expand Up @@ -288,6 +306,7 @@ GEM
method_source
rake (>= 12.2)
thor (~> 1.0)
rainbow (3.1.1)
rake (13.0.6)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
Expand All @@ -300,6 +319,7 @@ GEM
tilt
redcarpet (3.5.1)
regexp_parser (2.7.0)
rexml (3.3.9)
roda (3.61.0)
rack
rollbar (3.3.2)
Expand All @@ -324,6 +344,28 @@ GEM
rspec-mocks (~> 3.11)
rspec-support (~> 3.11)
rspec-support (3.12.0)
rubocop (1.64.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
parser (>= 3.3.1.0)
rubocop-performance (1.21.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-openai (7.3.1)
event_stream_parser (>= 0.3.0, < 2.0.0)
faraday (>= 1)
faraday-multipart (>= 1)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
ruby_dep (1.5.0)
rubyzip (2.3.2)
sass (3.7.3)
Expand Down Expand Up @@ -371,6 +413,18 @@ GEM
sprockets-redirect (0.1.0)
activesupport (>= 3.1.0)
rack
standard (1.37.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.64.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.4)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.4.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.21.0)
stimulus-rails (1.2.1)
railties (>= 6.0.0)
sucker_punch (3.1.0)
Expand Down Expand Up @@ -398,6 +452,7 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.6.0)
uppy-s3_multipart (1.2.0)
aws-sdk-s3 (~> 1.0)
content_disposition (~> 1.0)
Expand Down Expand Up @@ -426,6 +481,7 @@ PLATFORMS
DEPENDENCIES
addressable
aws-sdk-s3
bcrypt (~> 3.1.7)
bootsnap (>= 1.1.0)
bourbon (~> 4.0.2)
bourne
Expand Down Expand Up @@ -456,6 +512,7 @@ DEPENDENCIES
magnific-popup-rails
mail (~> 2.7.1)
newrelic_rpm (~> 7.2)
nio4r (>= 2.7.3)
nokogiri (~> 1.14.3)
pg (~> 1.4.4)
pry
Expand All @@ -472,13 +529,15 @@ DEPENDENCIES
redcarpet
rollbar
rspec-rails (~> 6.0.1)
ruby-openai
sassc-rails (~> 2.1)
sham_rack
shoulda-matchers (~> 3)
shrine (~> 3)
shrine-tus (~> 2.1)
simple_form (~> 5.1)
sprockets-redirect
standard
stimulus-rails
sucker_punch (~> 3.1)
terser
Expand Down
24 changes: 18 additions & 6 deletions app/assets/stylesheets/_base-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,28 @@ $gw-column: 60px;
$gw-gutter: 20px;

$serif: Georgia, Cambria, serif;
$sans-serif: 'museo-sans', 'proxima-nova', $helvetica;
$sans-serif: "museo-sans", "proxima-nova", $helvetica;

$base-font-color: rgb(55,55,55);
$lighter-base-font-color: rgb(46,46,46);
$base-font-color: rgb(55, 55, 55);
$lighter-base-font-color: rgb(46, 46, 46);
$muted-color: #ccc;

$pink: rgb(255, 75, 126);
$button-pink: rgb(252, 103, 147);

$blue: rgb(34,122,255); //blue
$blue: rgb(34, 122, 255); //blue

$green-background: #a7f3d0;
$green-text: #065f46;

$yellow-background: #fef08a;
$yellow-text: #854d0e;

$red-background: #fecaca;
$red-text: #7f1d1d;

$base-font-color: rgb(55, 55, 55);
$lighter-base-font-color: rgb(46, 46, 46);

/***
* Responsiveness Sizes
Expand All @@ -22,7 +34,7 @@ $blue: rgb(34,122,255); //blue
* mobile-small: for additional changes that accommdate very small screens like iPhone 5S
***/

$maximum-width: 60em; // Equivalent to 969px;
$maximum-width: 60em; // Equivalent to 969px;
$tablet-standard: 60em;
$mobile-standard: 30em; // Equivalent to 480px;
$mobile-small: 20em; // Equivalent to 320px;
$mobile-small: 20em; // Equivalent to 320px;
45 changes: 45 additions & 0 deletions app/assets/stylesheets/_project_analyses.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// @import "base_variables";

body.project-analysis-show {
h1 {
font-size: 24px;
margin-bottom: 16px;
}

.scores-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;

th,
td {
padding: 8px;
border: 1px solid #ddd;
}

th {
background-color: #f0f0f0;
text-align: left;
font-weight: bold;
}

// Define classes for score rows using the color variables
tr.score-row--high {
background-color: $green-background;
color: $green-text;
font-weight: 900;
}

tr.score-row--medium {
background-color: $yellow-background;
color: $yellow-text;
}

tr.score-row--low {
background-color: $red-background;
color: $red-text;
}
}

// Additional styles can be defined here, following your SCSS strategies
}
Loading
Loading