Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
98cee3e
rename augur_data model file to data
MoralCode May 27, 2026
86e260b
rename augur_data to collection_data in schema arguments
MoralCode May 27, 2026
9d907f2
rename augur_data to collection_data in table arguments
MoralCode May 27, 2026
e637771
schema arguments (but single quotes this time)
MoralCode May 27, 2026
bf798ea
rename all references (foreign keys, sequences etc) within SQL
MoralCode May 27, 2026
cea59b8
rename all references to augur_data in the rest of the codebase
MoralCode May 27, 2026
cf6b651
rename augur_operations file to operations
MoralCode May 27, 2026
5ddd115
rename operations schema specifiers in tables and columns
MoralCode May 27, 2026
56627b6
rename in-SQL references to operations schema within the models
MoralCode May 27, 2026
2fc2d6e
rename all references to augur_operations in the rest of the codebase
MoralCode May 27, 2026
2c11dad
create database migration for the schema rename
MoralCode May 27, 2026
ba45cb1
correct more imports of the ops schema
MoralCode May 27, 2026
419d3df
fix search paths
MoralCode May 27, 2026
f275c2b
update test fixtures for worker tests
MoralCode May 27, 2026
e410cfc
update unit test references to operations schema in SQL
MoralCode May 27, 2026
68d9d70
update docs references to ops schema by name
MoralCode May 27, 2026
e532006
update database comments (and include them in the schema rename migra…
MoralCode May 27, 2026
cd47c36
update another schema reference in tests
MoralCode May 27, 2026
63e768d
forgot to change augur_data model imports
MoralCode May 27, 2026
ca62e36
rename a schema reflection ref that was crashing gunicorn
MoralCode May 27, 2026
89f623a
rename an augur_data variable
MoralCode May 27, 2026
5ca88b8
change augur_data references in test files
MoralCode May 27, 2026
eaa6057
change augur_data references in docs files
MoralCode May 27, 2026
488b8a8
change augur_data references in the CLI
MoralCode May 27, 2026
fca0f63
fix typo (its collection_data schema)
MoralCode May 29, 2026
83ab6a4
hardcode schema in migrations
MoralCode May 29, 2026
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
2 changes: 1 addition & 1 deletion collectoss/api/metrics/commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def annual_commit_count_ranked_by_repo_in_repo_group(repo_group_id, repo_id=None
if timeframe == 'all':
cdRgTpRankedCommitsSQL = s.sql.text("""
SELECT repo.repo_id, repo_name as name, SUM(added - removed - whitespace) as net, patches
FROM augur_data.dm_repo_annual, repo, repo_groups
FROM collection_data.dm_repo_annual, repo, repo_groups
WHERE repo.repo_group_id = :repo_group_id
AND repo.repo_group_id = repo_groups.repo_group_id
AND dm_repo_annual.repo_id = repo.repo_id
Expand Down
32 changes: 16 additions & 16 deletions collectoss/api/metrics/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def deps(repo_group_id, repo_id=None, period='day', begin_date=None, end_date=No

depsSQL = s.sql.text("""
SELECT
augur_data.repo_dependencies.*,
augur_data.repo_groups.repo_group_id
collection_data.repo_dependencies.*,
collection_data.repo_groups.repo_group_id
FROM
augur_data.repo_dependencies,
augur_data.repo_groups,
augur_data.repo,
( SELECT MAX ( date_trunc( 'day', augur_data.repo_dependencies.data_collection_date ) ) AS data_collection_date FROM repo_dependencies WHERE repo_id = repo_id ) C
collection_data.repo_dependencies,
collection_data.repo_groups,
collection_data.repo,
( SELECT MAX ( date_trunc( 'day', collection_data.repo_dependencies.data_collection_date ) ) AS data_collection_date FROM repo_dependencies WHERE repo_id = repo_id ) C
WHERE
repo_dependencies.repo_id = repo.repo_id
AND repo.repo_group_id = repo_groups.repo_group_id
Expand All @@ -54,13 +54,13 @@ def deps(repo_group_id, repo_id=None, period='day', begin_date=None, end_date=No

depsSQL = s.sql.text("""
SELECT
augur_data.repo_dependencies.*,
augur_data.repo_groups.repo_group_id
collection_data.repo_dependencies.*,
collection_data.repo_groups.repo_group_id
FROM
augur_data.repo_dependencies,
augur_data.repo_groups,
augur_data.repo,
( SELECT MAX ( date_trunc( 'day', augur_data.repo_dependencies.data_collection_date ) ) AS data_collection_date
collection_data.repo_dependencies,
collection_data.repo_groups,
collection_data.repo,
( SELECT MAX ( date_trunc( 'day', collection_data.repo_dependencies.data_collection_date ) ) AS data_collection_date
FROM repo_dependencies, repo, repo_groups
WHERE repo.repo_group_id = repo_groups.repo_group_id and
repo_dependencies.repo_id = repo.repo_id and
Expand Down Expand Up @@ -134,8 +134,8 @@ def libyear(repo_group_id, repo_id=None, period='day', begin_date=None, end_date
f.libyear,
f.data_collection_date
FROM
( SELECT repo_id, NAME, MAX ( data_collection_date ) AS data_collection_date FROM augur_data.repo_deps_libyear WHERE repo_id = :repo_id GROUP BY repo_id, NAME ORDER BY NAME ) e,
augur_data.repo_deps_libyear f
( SELECT repo_id, NAME, MAX ( data_collection_date ) AS data_collection_date FROM collection_data.repo_deps_libyear WHERE repo_id = :repo_id GROUP BY repo_id, NAME ORDER BY NAME ) e,
collection_data.repo_deps_libyear f
WHERE
e.data_collection_date = f.data_collection_date and
e.repo_id = f.repo_id
Expand Down Expand Up @@ -203,8 +203,8 @@ def libyear(repo_group_id, repo_id=None, period='day', begin_date=None, end_date
f.libyear,
f.data_collection_date
FROM
( SELECT repo_id, NAME, MAX ( data_collection_date ) AS data_collection_date FROM augur_data.repo_deps_libyear GROUP BY repo_id, NAME ORDER BY NAME ) e,
augur_data.repo_deps_libyear f
( SELECT repo_id, NAME, MAX ( data_collection_date ) AS data_collection_date FROM collection_data.repo_deps_libyear GROUP BY repo_id, NAME ORDER BY NAME ) e,
collection_data.repo_deps_libyear f
WHERE
e.data_collection_date = f.data_collection_date and
e.repo_id = f.repo_id
Expand Down
20 changes: 10 additions & 10 deletions collectoss/api/metrics/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ def repo_messages(repo_group_id, repo_id=None, period='day', begin_date=None, en
COUNT ( * ),
repo_name
FROM
augur_data.repo,
augur_data.message
collection_data.repo,
collection_data.message
WHERE
augur_data.repo.repo_id = augur_data.message.repo_id
collection_data.repo.repo_id = collection_data.message.repo_id
AND
augur_data.repo.repo_id = :repo_id
collection_data.repo.repo_id = :repo_id
AND
message.msg_timestamp BETWEEN :begin_date AND :end_date
GROUP BY
Expand All @@ -69,14 +69,14 @@ def repo_messages(repo_group_id, repo_id=None, period='day', begin_date=None, en
COUNT ( * ),
rg_name
FROM
augur_data.repo,
augur_data.repo_groups,
augur_data.message
collection_data.repo,
collection_data.repo_groups,
collection_data.message
WHERE
augur_data.repo.repo_id = augur_data.message.repo_id
AND augur_data.repo_groups.repo_group_id = repo.repo_group_id
collection_data.repo.repo_id = collection_data.message.repo_id
AND collection_data.repo_groups.repo_group_id = repo.repo_group_id
AND
augur_data.repo_groups.repo_group_id = :repo_group_id
collection_data.repo_groups.repo_group_id = :repo_group_id
AND
message.msg_timestamp BETWEEN :begin_date AND :end_date
GROUP BY
Expand Down
6 changes: 3 additions & 3 deletions collectoss/api/metrics/pull_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,8 @@ def pull_request_average_commit_counts(repo_group_id, repo_id=None, group_by='mo
pr_merged_at,
pr_closed_at,
pr_created_at
FROM augur_data.pull_request_commits, augur_data.pull_request_meta,augur_data.repo_groups,
augur_data.pull_requests JOIN repo ON pull_requests.repo_id = repo.repo_id
FROM collection_data.pull_request_commits, collection_data.pull_request_meta,collection_data.repo_groups,
collection_data.pull_requests JOIN repo ON pull_requests.repo_id = repo.repo_id
WHERE pull_requests.repo_id IN
(SELECT repo_id FROM repo WHERE repo_group_id = :repo_group_id)
AND pull_requests.pull_request_id = pull_request_commits.pull_request_id
Expand Down Expand Up @@ -821,7 +821,7 @@ def pull_request_average_commit_counts(repo_group_id, repo_id=None, group_by='mo
pr_merged_at,
pr_closed_at,
pr_created_at
FROM augur_data.pull_request_commits, augur_data.pull_requests, augur_data.pull_request_meta
FROM collection_data.pull_request_commits, collection_data.pull_requests, collection_data.pull_request_meta
WHERE pull_requests.pull_request_id = pull_request_commits.pull_request_id
AND pull_requests.pull_request_id = pull_request_meta.pull_request_id
AND pull_requests.repo_id = :repo_id
Expand Down
12 changes: 6 additions & 6 deletions collectoss/api/metrics/repo_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def sbom_download(repo_group_id, repo_id=None):
:return: dosocs sbom
"""
dosocs_SQL = s.sql.text("""
select * from augur_data.repo_sbom_scans
select * from collection_data.repo_sbom_scans
where repo_id = :repo_id;
""")

Expand Down Expand Up @@ -313,15 +313,15 @@ def cii_best_practices_badge(repo_group_id, repo_id=None):
if not repo_id:
cii_best_practices_badge_SQL = s.sql.text("""
SELECT data
FROM augur_data.repo_badging
FROM collection_data.repo_badging
WHERE repo_id IN (SELECT repo_id FROM repo WHERE repo_group_id = :repo_group_id)
ORDER BY created_at DESC
LIMIT 1
""")
else:
cii_best_practices_badge_SQL = s.sql.text("""
SELECT data
FROM augur_data.repo_badging
FROM collection_data.repo_badging
WHERE repo_id = :repo_id
ORDER BY created_at DESC
LIMIT 1
Expand Down Expand Up @@ -1270,7 +1270,7 @@ def clones(repo_group_id, repo_id=None, begin_date=None, end_date=None):
clone_data_timestamp AS date,
count_clones AS total_clones,
unique_clones
FROM augur_data.repo_clones_data
FROM collection_data.repo_clones_data
WHERE repo_id = :repo_id
AND clone_data_timestamp BETWEEN :begin_date AND :end_date
ORDER BY clone_data_timestamp
Expand All @@ -1289,9 +1289,9 @@ def clones(repo_group_id, repo_id=None, begin_date=None, end_date=None):
clone_data_timestamp AS date,
count_clones AS total_clones,
unique_clones
FROM augur_data.repo_clones_data
FROM collection_data.repo_clones_data
WHERE repo_id IN (
SELECT repo_id FROM augur_data.repo WHERE repo_group_id = :repo_group_id
SELECT repo_id FROM collection_data.repo WHERE repo_group_id = :repo_group_id
)
AND clone_data_timestamp BETWEEN :begin_date AND :end_date
ORDER BY repo_id, clone_data_timestamp
Expand Down
2 changes: 1 addition & 1 deletion collectoss/api/metrics/toss.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def toss_repo_info(repo_id):
repo_info.default_branch,
repo.repo_git
FROM
augur_data.repo_info
collection_data.repo_info
JOIN repo ON repo.repo_id = repo_info.repo_id
WHERE
repo_info.repo_id = :repo_id
Expand Down
18 changes: 9 additions & 9 deletions collectoss/api/routes/collection_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ def issue_collection_status(): # TODO: make this name automatic - wrapper?
(
CAST (( COUNT ( * )) +1 AS DOUBLE PRECISION ) / CAST ( b.issues_count + 1 AS DOUBLE PRECISION )) AS ratio_issues
FROM
augur_data.repo A,
augur_data.issues d,
augur_data.repo_info b,
( SELECT repo_id, MAX ( data_collection_date ) AS last_collected FROM augur_data.repo_info GROUP BY repo_id ORDER BY repo_id ) e,
collection_data.repo A,
collection_data.issues d,
collection_data.repo_info b,
( SELECT repo_id, MAX ( data_collection_date ) AS last_collected FROM collection_data.repo_info GROUP BY repo_id ORDER BY repo_id ) e,
( SELECT repo_id, MAX ( data_collection_date ) AS most_recently_collected_issue FROM issues GROUP BY repo_id ORDER BY repo_id ) f
WHERE
A.repo_id = b.repo_id
Expand Down Expand Up @@ -135,11 +135,11 @@ def pull_request_collection_status(): # TODO: make this name automatic - wrappe
ABS ( CAST ( ( COUNT ( * ) ) + 1 AS DOUBLE PRECISION ) / CAST ( b.pull_request_count + 1 AS DOUBLE PRECISION ) ) AS ratio_abs,
( CAST ( ( COUNT ( * ) ) + 1 AS DOUBLE PRECISION ) / CAST ( b.pull_request_count + 1 AS DOUBLE PRECISION ) ) AS ratio_issues
FROM
augur_data.repo A,
augur_data.pull_requests d,
augur_data.repo_info b,
( SELECT repo_id, MAX ( data_collection_date ) AS last_collected FROM augur_data.repo_info GROUP BY repo_id ORDER BY repo_id ) e,
( SELECT repo_id, MAX ( data_collection_date ) AS last_pr_collected FROM augur_data.pull_requests GROUP BY repo_id ORDER BY repo_id ) f
collection_data.repo A,
collection_data.pull_requests d,
collection_data.repo_info b,
( SELECT repo_id, MAX ( data_collection_date ) AS last_collected FROM collection_data.repo_info GROUP BY repo_id ORDER BY repo_id ) e,
( SELECT repo_id, MAX ( data_collection_date ) AS last_pr_collected FROM collection_data.pull_requests GROUP BY repo_id ORDER BY repo_id ) f
WHERE
A.repo_id = b.repo_id
AND LOWER ( A.repo_git ) LIKE'%github.com%'
Expand Down
Loading
Loading