Skip to content

Commit

Permalink
Merge pull request #853 from chaoss/dev
Browse files Browse the repository at this point in the history
Issue 852 Docker build fix.
  • Loading branch information
sgoggins committed Jul 20, 2020
2 parents 0a50faf + 2669f6f commit 4f9873e
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 2 deletions.
20 changes: 20 additions & 0 deletions docs/source/getting-started/dev-start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Getting Started with Development
1. Augur Documentation: https://oss-augur.readthedocs.io/en/dev/ (Use the dev branch)
2. Follow documentation to install on whatever OS you are most comfortable with (other than windows).
3. Use the "oh my zsh" shell. It has a lot of nice Git features. https://ohmyz.sh/
4. Postgres.app download for mac: https://postgresapp.com/downloads.html
5. git clone https://github.com/chaoss/augur augur-rdohm
- `pwd` will tell you the current working directory.
- https://ma.ttias.be/mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun/
6. For the first week or so, if you encounter an issue that is not clear? Its clear what you're supposed to do as a next step: Enter an issue: https://github.com/chaoss/augur/issues
7. I recommmend getting a copy of Navicat for Postgres
8. Create a password on the command line for postgres:
```
sudo -u postgres psql postgres
# \password postgres
Enter new password:
```
9.
5 changes: 4 additions & 1 deletion schema/create_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@
\i schema/generate/15-schema_update_17.sql
\i schema/generate/16-schema_update_18.sql
\i schema/generate/17-schema_update_19.sql
\i schema/generate/18-schema_update_20.sql
\i schema/generate/18-schema_update_20.sql
\i schema/generate/19-schema_update_21.sql
\i schema/generate/20-schema_update_22.sql

2 changes: 1 addition & 1 deletion schema/generate/18-schema_update_20.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DROP INDEX "augur_data"."cntrb_id";
DROP INDEX if exists "augur_data"."cntrb_id";

CREATE INDEX "cnt-fullname" ON "augur_data"."contributors" USING hash (
"cntrb_full_name" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops"
Expand Down
48 changes: 48 additions & 0 deletions schema/generate/19-schema_update_21.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
-- DROP TABLE "message_analysis";
-- DROP TABLE "message_analysis_summary";

CREATE TABLE "message_analysis" (
"msg_analysis_id" serial8 NOT NULL,
"msg_id" int8,
"worker_run_id" int8,
"sentiment_score" float8,
"reconstruction_error" float8,
"novelty_flag" bool,
"feedback_flag" bool,
"tool_source" varchar,
"tool_version" varchar,
"data_source" varchar,
"data_collection_date" timestamp(0) DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY ("msg_analysis_id")
)
WITHOUT OIDS;
COMMENT ON COLUMN "message_analysis"."worker_run_id" IS 'This column is used to indicate analyses run by a worker during the same execution period, and is useful for grouping, and time series analysis. ';
COMMENT ON COLUMN "message_analysis"."sentiment_score" IS 'A sentiment analysis score. Zero is neutral, negative numbers are negative sentiment, and positive numbers are positive sentiment. ';
COMMENT ON COLUMN "message_analysis"."reconstruction_error" IS 'Each message is converted to a 250 dimensin doc2vec vector, so the reconstruction error is the difference between what the predicted vector and the actual vector.';
COMMENT ON COLUMN "message_analysis"."novelty_flag" IS 'This is an analysis of the degree to which the message is novel when compared to other messages in a repository. For example when bots are producing numerous identical messages, the novelty score is low. It would also be a low novelty score when several people are making the same coment. ';
COMMENT ON COLUMN "message_analysis"."feedback_flag" IS 'This exists to provide the user with an opportunity provide feedback on the resulting the sentiment scores. ';
ALTER TABLE "message_analysis" OWNER TO "augur";

CREATE TABLE "message_analysis_summary" (
"msg_summary_id" serial8 NOT NULL,
"repo_id" int8,
"worker_run_id" int8,
"positive_ratio" float8,
"negative_ratio" float8,
"novel_count" int8,
"period" timestamp(0),
"tool_source" varchar,
"tool_version" varchar,
"data_source" varchar,
"data_collection_date" timestamp(0) DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY ("msg_summary_id")
)
WITHOUT OIDS;
COMMENT ON TABLE "message_analysis_summary" IS 'In a relationally perfect world, we would have a table called “message_analysis_run” the incremented the “worker_run_id” for both message_analysis and message_analysis_summary. For now, we decided this was overkill. ';
COMMENT ON COLUMN "message_analysis_summary"."worker_run_id" IS 'This value should reflect the worker_run_id for the messages summarized in the table. There is not a relation between these two tables for that purpose because its not *really*, relationaly a concept unless we create a third table for "worker_run_id", which we determined was unnecessarily complex. ';
COMMENT ON COLUMN "message_analysis_summary"."novel_count" IS 'The number of messages identified as novel during the analyzed period';
COMMENT ON COLUMN "message_analysis_summary"."period" IS 'The whole timeline is divided into periods based on the definition of time period for analysis, which is user specified. Timestamp of the first period to look at, until the end of messages at the data of execution. ';
ALTER TABLE "message_analysis_summary" OWNER TO "augur";


update "augur_operations"."augur_settings" set value = 21 where setting = 'augur_data_version';
14 changes: 14 additions & 0 deletions schema/generate/20-schema_update_22.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE TABLE augur_data.repo_cluster_messages
(
msg_cluster_id serial8,
repo_id bigint,
cluster_content integer,
cluster_mechanism integer,
"tool_source" varchar,
"tool_version" varchar,
"data_source" varchar,
"data_collection_date" timestamp(0) DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY ("msg_cluster_id")
)

update "augur_operations"."augur_settings" set value = 22 where setting = 'augur_data_version';

0 comments on commit 4f9873e

Please sign in to comment.