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

Dev update to index branch #2740

Merged
merged 106 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
f686afd
Add augur api start
ABrain7710 Feb 3, 2024
5743e4f
Add augur collection start and stop commands
ABrain7710 Feb 3, 2024
48d08e9
Merge dev into branch
ABrain7710 Feb 13, 2024
1366105
Start adding issue contributors
ABrain7710 Feb 18, 2024
f8eed39
Update settings page
Ulincsys Feb 19, 2024
5723188
Merge branch 'dev' into improve-profile-page
Ulincsys Feb 19, 2024
696f62e
Insert issue reporters
ABrain7710 Feb 20, 2024
4f9a577
Insert issue assignees and contributors
ABrain7710 Feb 20, 2024
5de9e16
Merge pull request #2709 from chaoss/main
sgoggins Feb 20, 2024
1ba8f24
Fix misspelling
Ulincsys Feb 20, 2024
273ae12
fix script lacking github actions user name
IsaacMilarky Feb 20, 2024
d0c8032
Add issue comment contributors
ABrain7710 Feb 21, 2024
c06a09c
Merge pull request #2712 from chaoss/add-auto-merge-gh-action
sgoggins Feb 21, 2024
8beb7bc
edit commit out of the script and only do merge
IsaacMilarky Feb 21, 2024
f0f6c07
Merge pull request #2714 from chaoss/add-auto-merge-gh-action
sgoggins Feb 22, 2024
19cce15
Merge branch 'main' into dev
Feb 22, 2024
2bdcc43
move celery database engine initialization to db __init__.py
ABrain7710 Feb 24, 2024
26c82ee
move get_engine imports to top level
ABrain7710 Feb 24, 2024
3fe6865
remove unused imports
ABrain7710 Feb 25, 2024
c44d13d
Merge branch 'dev' into remove-unused-imports
ABrain7710 Feb 25, 2024
47af018
Merge branch 'dev' into gitlab-contributors
ABrain7710 Feb 25, 2024
985aef5
add suggestion by pylint
ABrain7710 Feb 25, 2024
c2abf45
automatically handle database engine cleanup in cli
ABrain7710 Feb 26, 2024
cc001de
update start tasks and fix mr event unique
ABrain7710 Feb 26, 2024
fb9463e
add database decorator to last db command
ABrain7710 Feb 26, 2024
b4f6131
fix weird cli bug
IsaacMilarky Feb 26, 2024
bde4d1c
fix weird cli bug
IsaacMilarky Feb 26, 2024
756fbf3
add gitlab logic to repo cli
IsaacMilarky Feb 26, 2024
e1ae921
prevent error with blank metadata
IsaacMilarky Feb 26, 2024
ca47c34
remove requestJson import
ABrain7710 Feb 26, 2024
4df9bc7
Merge pull request #2718 from chaoss/gitlab-contributors
ABrain7710 Feb 26, 2024
a43cb3e
Merge branch 'dev' into add-api-start-command
ABrain7710 Feb 26, 2024
a3cb351
Merge branch 'dev' into remove-unused-imports
ABrain7710 Feb 26, 2024
89141a9
Merge branch 'dev' into gitlab-cli-patch
IsaacMilarky Feb 26, 2024
191d79f
typo
IsaacMilarky Feb 26, 2024
0051b77
Merge pull request #2717 from chaoss/remove-unused-imports
Ulincsys Feb 27, 2024
eec445b
Merge pull request #2719 from chaoss/gitlab-cli-patch
ABrain7710 Feb 27, 2024
61dc81f
Merge branch 'dev' into add-api-start-command
ABrain7710 Feb 27, 2024
7fc61c5
Merge pull request #2681 from chaoss/add-api-start-command
ABrain7710 Feb 27, 2024
ebc7889
Merge branch 'dev' into cli-engine-cleanup
ABrain7710 Feb 27, 2024
6cafc46
remove object super class from DatabaseContext
ABrain7710 Feb 27, 2024
da81a58
disable method docstring nag pylint
IsaacMilarky Feb 27, 2024
ad437c7
Merge pull request #2721 from chaoss/cli-engine-cleanup
IsaacMilarky Feb 27, 2024
975a3c2
clean up engine when gunicorn worker exits
ABrain7710 Feb 28, 2024
3569d57
Merge pull request #2723 from chaoss/disable-module-docstring
sgoggins Feb 28, 2024
e11db92
Merge branch 'main' into dev
Feb 28, 2024
9fc2127
Update metadata.py
sgoggins Feb 28, 2024
8793ebd
Merge branch 'main' into dev
Feb 28, 2024
0a3c30b
Update README.md
sgoggins Feb 28, 2024
61e4526
Update Dockerfile
sgoggins Feb 28, 2024
cb9e8e8
Merge branch 'main' into dev
Feb 28, 2024
2a11f34
Update Dockerfile
sgoggins Feb 28, 2024
f9e3790
Merge branch 'main' into dev
Feb 28, 2024
46d396d
Update Dockerfile
sgoggins Feb 28, 2024
b54f249
Merge branch 'main' into dev
Feb 28, 2024
7ceefc4
Merge branch 'main' into dev
Feb 29, 2024
91a6154
Define gunicorn engine in db package
ABrain7710 Mar 2, 2024
351009f
remove most sessionmakers from routes
ABrain7710 Mar 2, 2024
6305457
Merge branch 'dev' into gunicorn-database-handling-improvements
ABrain7710 Mar 2, 2024
1d978d7
define engine on celery app so it doesn't have to be imported
ABrain7710 Mar 2, 2024
911f888
Merge branch 'dev' into improve-profile-page
Ulincsys Mar 3, 2024
ff4cba9
Merge pull request #2726 from chaoss/improve-profile-page
ABrain7710 Mar 4, 2024
0d71b7d
Cherry pick some database improvements
ABrain7710 Mar 4, 2024
57d9909
Small fixes
ABrain7710 Mar 4, 2024
0433fdb
Fix bug where cntrb_id is null
ABrain7710 Mar 4, 2024
ede5109
Fix bug in update query
ABrain7710 Mar 4, 2024
0fd8564
Fix update user method
ABrain7710 Mar 5, 2024
7f8518b
Fix logic error in query
ABrain7710 Mar 5, 2024
a0242a2
Merge pull request #2728 from chaoss/db-improvements
ABrain7710 Mar 5, 2024
b75b02b
Remove augur config from backend.py
ABrain7710 Mar 5, 2024
7e91237
Remove some augur config references
ABrain7710 Mar 6, 2024
fa698f7
Remove more references to augur config
ABrain7710 Mar 6, 2024
9d4fd67
try to create new metric
IsaacMilarky Mar 7, 2024
5972723
start
IsaacMilarky Mar 7, 2024
68c2f86
Define context method to create temporary database engine
ABrain7710 Mar 9, 2024
ba8e7c2
Define temp db engine with different name
ABrain7710 Mar 9, 2024
1a23033
Fix missing variable passed
ABrain7710 Mar 9, 2024
95d6e7a
Change server.py to create engine like before
ABrain7710 Mar 11, 2024
9dea006
Merge pull request #2730 from chaoss/potential-fixes
sgoggins Mar 11, 2024
57d9c2a
Merge branch 'dev' into config-usage-improvements
ABrain7710 Mar 11, 2024
b372e98
Merge pull request #2729 from chaoss/config-usage-improvements
sgoggins Mar 11, 2024
56e91a2
add repo id parameter to certain complexity endpoints
IsaacMilarky Mar 11, 2024
5d40668
Add potential fix
ABrain7710 Mar 11, 2024
4648b95
add stuff
ABrain7710 Mar 11, 2024
11c369b
merge with dev
IsaacMilarky Mar 11, 2024
dfa48d5
Merge branch 'dev' into nadia-label-poc
IsaacMilarky Mar 11, 2024
ee412ef
Do pylint suggestion
ABrain7710 Mar 11, 2024
3e96aac
get unique contribs
IsaacMilarky Mar 12, 2024
daa2a52
Fix engine.execute error
ABrain7710 Mar 12, 2024
55b9a2e
add nadia endpoint
IsaacMilarky Mar 12, 2024
a338ef7
Merge pull request #2732 from chaoss/dev-fixes
IsaacMilarky Mar 12, 2024
31b42c7
Merge branch 'dev' into nadia-label-poc
IsaacMilarky Mar 12, 2024
7410274
fix typo
IsaacMilarky Mar 12, 2024
da5c321
Allow exception visibility in CLI
Ulincsys Mar 13, 2024
a8853fd
Add __init__.py to gitlab task folder
Ulincsys Mar 13, 2024
bc8aee8
Merge pull request #2734 from chaoss/nadia-label-poc
sgoggins Mar 13, 2024
2d43778
Merge pull request #2736 from chaoss/make-gitlab-init-py
sgoggins Mar 13, 2024
48e93be
Merge pull request #2735 from chaoss/cli-raise-exception
sgoggins Mar 13, 2024
3b7f2ef
Merge pull request #2731 from chaoss/add-complexity-endpoint-features
sgoggins Mar 13, 2024
9d85d24
patch install and nadia badge sql syntax
IsaacMilarky Mar 13, 2024
64c4196
fix conflicting namespace
IsaacMilarky Mar 13, 2024
d6a6fc7
adhere to linting suggestions surrounding file handling
IsaacMilarky Mar 13, 2024
2667f0d
Merge pull request #2737 from chaoss/dev-patch
sgoggins Mar 13, 2024
bc90a32
Merge pull request #2738 from chaoss/release-fixes
sgoggins Mar 13, 2024
02d3298
Fix RabbitMQ config issue in Docker
Ulincsys Mar 13, 2024
99f2db1
Merge pull request #2739 from chaoss/docker-rabbitmq-fix
sgoggins Mar 14, 2024
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
3 changes: 3 additions & 0 deletions .github/workflows/auto_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ jobs:
with:
fetch-depth: 0
- run: |
git config user.name 'GitHub Actions'
git config user.email '[email protected]'
git checkout dev
git merge main
echo "Done with merge"
- name: Push to dev
uses: CasperWA/push-protected@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#refactoring checker
#enable=R

disable=E0611,E1101,W1203,R0801,W0614,W0611,C0411,C0103,C0301,C0303,C0304,C0305,W0311,E0401
disable=E0611,E1101,W1203,R0801,W0614,W0611,C0411,C0103,C0301,C0303,C0304,C0305,W0311,E0401,C0116


# Analyse import fallback blocks. This can be used to support both Python 2 and
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Augur NEW Release v0.62.5
# Augur NEW Release v0.62.6

Augur is primarily a data engineering tool that makes it possible for data scientists to gather open source software community data. Less data carpentry for everyone else!
The primary way of looking at Augur data is through [8Knot](https://github.com/oss-aspen/8knot) ... A public instance of 8Knot is available at https://metrix.chaoss.io ... That is tied to a public instance of Augur at https://ai.chaoss.io
Expand All @@ -10,7 +10,7 @@ The primary way of looking at Augur data is through [8Knot](https://github.com/o
## NEW RELEASE ALERT!
### [If you want to jump right in, updated docker build/compose and bare metal installation instructions are available here](docs/new-install.md)

Augur is now releasing a dramatically improved new version to the main branch. It is also available here: https://github.com/chaoss/augur/releases/tag/v0.62.5
Augur is now releasing a dramatically improved new version to the main branch. It is also available here: https://github.com/chaoss/augur/releases/tag/v0.62.6
- The `main` branch is a stable version of our new architecture, which features:
- Dramatic improvement in the speed of large scale data collection (100,000+ repos). All data is obtained for 100k+ repos within 2 weeks.
- A new job management architecture that uses Celery and Redis to manage queues, and enables users to run a Flower job monitoring dashboard
Expand Down
63 changes: 32 additions & 31 deletions augur/api/gunicorn_conf.py
Original file line number Diff line number Diff line change
@@ -1,47 +1,48 @@
# from augur import ROOT_AUGUR_DIRECTORY
import multiprocessing
import logging
import os
from pathlib import Path
from glob import glob
import shutil

from augur.application.db.session import DatabaseSession
from augur.application.config import AugurConfig
from augur.application.db.lib import get_value, get_section
from augur.application.db import dispose_database_engine

logger = logging.getLogger(__name__)
with DatabaseSession(logger) as session:

augur_config = AugurConfig(logger, session)


# ROOT_AUGUR_DIRECTORY = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))

# base_log_dir = ROOT_AUGUR_DIRECTORY + "/logs/"
# ROOT_AUGUR_DIRECTORY = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))

# base_log_dir = ROOT_AUGUR_DIRECTORY + "/logs/"

# Path(base_log_dir).mkdir(exist_ok=True)

# Path(base_log_dir).mkdir(exist_ok=True)
workers = multiprocessing.cpu_count() * 2 + 1
umask = 0o007
reload = True
reload_extra_files = glob(str(Path.cwd() / '**/*.j2'), recursive=True)

workers = multiprocessing.cpu_count() * 2 + 1
umask = 0o007
reload = True
reload_extra_files = glob(str(Path.cwd() / '**/*.j2'), recursive=True)
# set the log location for gunicorn
logs_directory = get_value('Logging', 'logs_directory')
accesslog = f"{logs_directory}/gunicorn.log"
errorlog = f"{logs_directory}/gunicorn.log"

# set the log location for gunicorn
logs_directory = augur_config.get_value('Logging', 'logs_directory')
accesslog = f"{logs_directory}/gunicorn.log"
errorlog = f"{logs_directory}/gunicorn.log"
ssl_bool = get_value('Server', 'ssl')

if ssl_bool is True:

workers = int(get_value('Server', 'workers'))
bind = '%s:%s' % (get_value("Server", "host"), get_value("Server", "port"))
timeout = int(get_value('Server', 'timeout'))
certfile = str(get_value('Server', 'ssl_cert_file'))
keyfile = str(get_value('Server', 'ssl_key_file'))

else:
workers = int(get_value('Server', 'workers'))
bind = '%s:%s' % (get_value("Server", "host"), get_value("Server", "port"))
timeout = int(get_value('Server', 'timeout'))

ssl_bool = augur_config.get_value('Server', 'ssl')

if ssl_bool is True:
def worker_exit(server, worker):
print("Stopping gunicorn worker process")
dispose_database_engine()

workers = int(augur_config.get_value('Server', 'workers'))
bind = '%s:%s' % (augur_config.get_value("Server", "host"), augur_config.get_value("Server", "port"))
timeout = int(augur_config.get_value('Server', 'timeout'))
certfile = str(augur_config.get_value('Server', 'ssl_cert_file'))
keyfile = str(augur_config.get_value('Server', 'ssl_key_file'))

else:
workers = int(augur_config.get_value('Server', 'workers'))
bind = '%s:%s' % (augur_config.get_value("Server", "host"), augur_config.get_value("Server", "port"))
timeout = int(augur_config.get_value('Server', 'timeout'))
1 change: 0 additions & 1 deletion augur/api/metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import datetime
import sqlalchemy as s
import pandas as pd
from augur.api.util import register_metric
from augur.application.db.engine import engine
```
3. Defining the function
1. Add the decorator @register_metric to the function
Expand Down
18 changes: 9 additions & 9 deletions augur/api/metrics/commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import datetime
import sqlalchemy as s
import pandas as pd
from augur.api.util import register_metric
from flask import current_app

from ..server import engine
from augur.api.util import register_metric

@register_metric()
def committers(repo_group_id, repo_id=None, begin_date=None, end_date=None, period='month'):
Expand Down Expand Up @@ -90,7 +90,7 @@ def committers(repo_group_id, repo_id=None, begin_date=None, end_date=None, peri
"""
)

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(committersSQL, conn, params={'repo_id': repo_id,
'repo_group_id': repo_group_id,'begin_date': begin_date, 'end_date': end_date, 'period':period})

Expand Down Expand Up @@ -168,7 +168,7 @@ def annual_commit_count_ranked_by_new_repo_in_repo_group(repo_group_id, repo_id=
ORDER BY YEAR ASC
""".format(table, period))

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(cdRgNewrepRankedCommitsSQL, conn, params={'repo_id': repo_id,
'repo_group_id': repo_group_id,'begin_date': begin_date, 'end_date': end_date})
return results
Expand Down Expand Up @@ -267,7 +267,7 @@ def annual_commit_count_ranked_by_repo_in_repo_group(repo_group_id, repo_id=None
LIMIT 10
""")

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(cdRgTpRankedCommitsSQL, conn, params={ "repo_group_id": repo_group_id,
"repo_id": repo_id})
return results
Expand Down Expand Up @@ -299,7 +299,7 @@ def top_committers(repo_group_id, repo_id=None, year=None, threshold=0.8):
ORDER BY patches DESC) a
""")

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(total_commits_SQL, conn,
params={'year': year, 'repo_group_id': repo_group_id})
else:
Expand All @@ -312,7 +312,7 @@ def top_committers(repo_group_id, repo_id=None, year=None, threshold=0.8):
ORDER BY patches DESC) a
""")

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(total_commits_SQL, conn,
params={'year': year, 'repo_id': repo_id})

Expand All @@ -339,7 +339,7 @@ def top_committers(repo_group_id, repo_id=None, year=None, threshold=0.8):
ORDER BY commits DESC
""")

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(committers_SQL, conn,
params={'year': year, 'repo_group_id': repo_group_id})
else:
Expand All @@ -359,7 +359,7 @@ def top_committers(repo_group_id, repo_id=None, year=None, threshold=0.8):
ORDER BY commits DESC
""")

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(committers_SQL, conn,
params={'year': year, 'repo_id': repo_id})

Expand Down
20 changes: 10 additions & 10 deletions augur/api/metrics/contributor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import datetime
import sqlalchemy as s
import pandas as pd
from flask import current_app

from augur.api.util import register_metric
import uuid

from ..server import engine

@register_metric()
def contributors(repo_group_id, repo_id=None, period='day', begin_date=None, end_date=None):
Expand Down Expand Up @@ -125,7 +125,7 @@ def contributors(repo_group_id, repo_id=None, period='day', begin_date=None, end
ORDER BY total DESC
""")

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(contributorsSQL, conn, params={'repo_id': repo_id, 'period': period,
'begin_date': begin_date, 'end_date': end_date})
else:
Expand Down Expand Up @@ -212,7 +212,7 @@ def contributors(repo_group_id, repo_id=None, period='day', begin_date=None, end
ORDER BY total DESC
""")

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(contributorsSQL, conn, params={'repo_group_id': repo_group_id, 'period': period,
'begin_date': begin_date, 'end_date': end_date})
return results
Expand Down Expand Up @@ -283,7 +283,7 @@ def contributors_new(repo_group_id, repo_id=None, period='day', begin_date=None,
GROUP BY date, repo.repo_id, repo_name
""")

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(contributorsNewSQL, conn, params={'repo_id': repo_id, 'period': period,
'begin_date': begin_date, 'end_date': end_date})
else:
Expand Down Expand Up @@ -333,7 +333,7 @@ def contributors_new(repo_group_id, repo_id=None, period='day', begin_date=None,
GROUP BY date, repo.repo_id, repo_name
""")

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(contributorsNewSQL, conn, params={'repo_group_id': repo_group_id, 'period': period,
'begin_date': begin_date, 'end_date': end_date})
return results
Expand All @@ -355,7 +355,7 @@ def lines_changed_by_author(repo_group_id, repo_id=None):
GROUP BY commits.repo_id, date_trunc('week', cmt_author_date::date), cmt_author_affiliation, cmt_author_email, repo_name
ORDER BY date_trunc('week', cmt_author_date::date) ASC;
""")
with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(linesChangedByAuthorSQL, conn, params={"repo_id": repo_id})
return results
else:
Expand All @@ -367,7 +367,7 @@ def lines_changed_by_author(repo_group_id, repo_id=None):
GROUP BY repo_id, date_trunc('week', cmt_author_date::date), cmt_author_affiliation, cmt_author_email
ORDER BY date_trunc('week', cmt_author_date::date) ASC;
""")
with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(linesChangedByAuthorSQL, conn, params={"repo_group_id": repo_group_id})
return results

Expand Down Expand Up @@ -426,7 +426,7 @@ def contributors_code_development(repo_group_id, repo_id=None, period='all', beg
GROUP BY a.email, a.repo_id, repo_name
""")

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(contributorsSQL, conn, params={'repo_id': repo_id, 'period': period,
'begin_date': begin_date, 'end_date': end_date})
else:
Expand Down Expand Up @@ -462,7 +462,7 @@ def contributors_code_development(repo_group_id, repo_id=None, period='all', beg
ORDER BY commits desc, email
""")

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(contributorsSQL, conn, params={'repo_group_id': repo_group_id, 'period': period,
'begin_date': begin_date, 'end_date': end_date})
return results
9 changes: 5 additions & 4 deletions augur/api/metrics/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@

import sqlalchemy as s
import pandas as pd
from augur.api.util import register_metric
import datetime
from flask import current_app

from augur.api.util import register_metric

from ..server import engine

@register_metric()
def deps(repo_group_id, repo_id=None, period='day', begin_date=None, end_date=None):
Expand Down Expand Up @@ -46,7 +47,7 @@ def deps(repo_group_id, repo_id=None, period='day', begin_date=None, end_date=No
AND repo_dependencies.repo_id = :repo_id
""")

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(depsSQL, conn)

else:
Expand All @@ -71,7 +72,7 @@ def deps(repo_group_id, repo_id=None, period='day', begin_date=None, end_date=No
AND repo.repo_group_id = :repo_group_id
""")

with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(depsSQL, conn)
return results

Expand Down
4 changes: 2 additions & 2 deletions augur/api/metrics/insight.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pandas as pd
from augur.api.util import register_metric

from ..server import engine
from flask import current_app

@register_metric(type="repo_group_only")
def top_insights(repo_group_id, num_repos=6):
Expand All @@ -29,6 +29,6 @@ def top_insights(repo_group_id, num_repos=6):
LIMIT :num_repos
)
""")
with engine.connect() as conn:
with current_app.engine.connect() as conn:
results = pd.read_sql(topInsightsSQL, conn, params={'repo_group_id': repo_group_id, 'num_repos': num_repos})
return results
Loading