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

Release 0.76.0 #2857

Merged
merged 139 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
a1f3f8d
intermediate work on graphical install
Ulincsys Aug 12, 2023
51ecbb7
Merge branch 'dev' into startup-wizard
Ulincsys Aug 13, 2023
ebe7d26
ready to test
Ulincsys Aug 15, 2023
84ed9e8
fix not waiting for process completion
Ulincsys Aug 15, 2023
6ca9cb7
touch-ups
Ulincsys Aug 15, 2023
b17c1a0
commented out unused ML import, and kept the versions open on several…
sgoggins Aug 16, 2023
310cfb3
wizard-docker-image.yml
sgoggins Aug 16, 2023
de90e81
Update build_docker.yml
sgoggins Aug 16, 2023
bccc9a4
- Add configurable build target with `AUGUR_TARGET`
Ulincsys Aug 22, 2023
a4ea1f7
Merge pull request #2689 from chaoss/improve-profile-page
Ulincsys Feb 19, 2024
0ebdc5f
Merge branch 'startup-wizard' into dev
sgoggins Feb 20, 2024
4f3688a
merge conflict
IsaacMilarky Feb 20, 2024
1de0d4b
Merge pull request #2695 from chaoss/fix-dev-main-conflict
sgoggins Feb 20, 2024
53290f2
Merge pull request #2694 from chaoss/dev
sgoggins Feb 20, 2024
416a904
Bump dnspython from 2.2.1 to 2.6.1
dependabot[bot] Apr 12, 2024
68f7d06
Bump eventlet from 0.33.3 to 0.35.2
dependabot[bot] Apr 12, 2024
ab84ce7
Bump gunicorn from 20.1.0 to 22.0.0
dependabot[bot] Apr 17, 2024
fc2e339
Bump flask-cors in /augur/tasks/data_analysis/clustering_worker
dependabot[bot] May 14, 2024
abd026b
Bump flask-cors in /augur/tasks/data_analysis/insight_worker
dependabot[bot] May 14, 2024
db15302
Bump flask-cors in /augur/tasks/git/util/facade_worker
dependabot[bot] May 14, 2024
b25c6af
Bump flask-cors
dependabot[bot] May 14, 2024
51ef7dc
Bump flask-cors in /augur/tasks/data_analysis/contributor_breadth_worker
dependabot[bot] May 14, 2024
2d26ed4
Bump flask-cors in /augur/tasks/data_analysis/discourse_analysis
dependabot[bot] May 14, 2024
bcdb1b6
Bump flask-cors in /augur/tasks/data_analysis/message_insights
dependabot[bot] May 14, 2024
768c340
Bump flask-cors from 3.0.10 to 4.0.1
dependabot[bot] May 14, 2024
9167238
Optimize secondary task recollection
ABrain7710 May 17, 2024
0e47f00
Pass full collection flag to phases
ABrain7710 May 17, 2024
4d04633
Filter updated prs by repo_id
ABrain7710 May 17, 2024
354a833
---
dependabot[bot] May 21, 2024
2af7ef1
Merge branch 'dev' into optimize-secondary-recollection
ABrain7710 May 21, 2024
22ba0d6
Merge branch 'dev' into startup-wizard
Ulincsys May 29, 2024
9d7420e
Define new github data access
ABrain7710 May 31, 2024
7fb513d
Add more functionality to github data access
ABrain7710 May 31, 2024
69cd421
update API description URLS
kaxada Jun 2, 2024
edb56ea
Use github data access in prs
ABrain7710 Jun 3, 2024
64b859b
Bump tornado from 6.3.3 to 6.4.1
dependabot[bot] Jun 6, 2024
cbb76f8
clarify the setup end-condition
Ulincsys Jun 10, 2024
a2f8c24
Merge branch 'dev' into startup-wizard
Ulincsys Jun 10, 2024
fdc18cb
side-port important change dropped in merge
Ulincsys Jun 10, 2024
af14944
Merge pull request #2815 from chaoss/startup-wizard
sgoggins Jun 10, 2024
daced69
updates to docker testing
sgoggins Jun 10, 2024
be2b209
update wizard timeout
sgoggins Jun 11, 2024
cc2ac05
Merge pull request #2763 from chaoss/dependabot/pip/gunicorn-22.0.0
sgoggins Jun 11, 2024
72b5097
Merge pull request #2761 from chaoss/dependabot/pip/dnspython-2.6.1
sgoggins Jun 11, 2024
d5402fa
Merge pull request #2762 from chaoss/dependabot/pip/eventlet-0.35.2
sgoggins Jun 11, 2024
f05b2ed
Merge pull request #2792 from chaoss/dependabot/pip/augur/tasks/data_…
sgoggins Jun 11, 2024
b8b577c
Merge pull request #2793 from chaoss/dependabot/pip/augur/tasks/data_…
sgoggins Jun 11, 2024
750ab2d
Merge pull request #2794 from chaoss/dependabot/pip/augur/tasks/git/u…
sgoggins Jun 11, 2024
a83b07a
Merge pull request #2795 from chaoss/dependabot/pip/augur/tasks/data_…
sgoggins Jun 11, 2024
027ccf5
Merge pull request #2796 from chaoss/dependabot/pip/augur/tasks/data_…
sgoggins Jun 11, 2024
c6817f8
Merge pull request #2797 from chaoss/dependabot/pip/augur/tasks/data_…
sgoggins Jun 11, 2024
f837f54
Merge pull request #2798 from chaoss/dependabot/pip/augur/tasks/data_…
sgoggins Jun 11, 2024
df98aa3
Merge pull request #2799 from chaoss/dependabot/pip/flask-cors-4.0.1
sgoggins Jun 11, 2024
28abb83
Merge pull request #2803 from chaoss/dependabot/pip/requests-2.32.0
sgoggins Jun 11, 2024
dfc8c34
Merge pull request #2811 from chaoss/dependabot/pip/tornado-6.4.1
sgoggins Jun 11, 2024
6b5bfdb
Merge pull request #2808 from chaoss/api-enhancements
sgoggins Jun 11, 2024
42b0bc4
move facade table refresh to refresh with the mat views
IsaacMilarky Jun 11, 2024
2a76f9c
Don't use tuple constructor
ABrain7710 Jun 17, 2024
6730a11
Fix syntax errors
ABrain7710 Jun 17, 2024
39f552b
Merge branch 'dev' into optimize-secondary-recollection
ABrain7710 Jun 17, 2024
6035218
fixes after merging dev
ABrain7710 Jun 17, 2024
70fa87c
Fix missing import
ABrain7710 Jun 17, 2024
6f931ee
Merge pull request #2800 from chaoss/optimize-secondary-recollection
sgoggins Jun 17, 2024
f711042
Merge pull request #2823 from chaoss/redesign-github-paginator
sgoggins Jun 17, 2024
dbed6aa
Bump scikit-learn in /augur/tasks/data_analysis/clustering_worker
dependabot[bot] Jun 18, 2024
95f37e6
fix missing import error
Ulincsys Jun 20, 2024
3a78d15
Explicitly identify iconized buttons using role attribute
Ulincsys Jun 20, 2024
24da2cd
Merge pull request #2825 from chaoss/fix-missing-env
sgoggins Jun 20, 2024
9132ae5
Merge pull request #2824 from chaoss/dependabot/pip/augur/tasks/data_…
sgoggins Jun 20, 2024
42b5840
Remove redundant button classification
Ulincsys Jun 21, 2024
6f3f09b
library version consistency fix
sgoggins Jun 21, 2024
f25f695
library version consistency updates
sgoggins Jun 21, 2024
b435122
Merge pull request #2826 from chaoss/improve-frontend-accessibility
sgoggins Jun 21, 2024
2229359
materialized view refresh script
sgoggins Jun 22, 2024
062fe36
:materialized view refresh script update
sgoggins Jun 22, 2024
7cd7779
update collection cadence
sgoggins Jun 22, 2024
1dbb414
Improve directory selection for facade worker
Ulincsys Jun 24, 2024
ccd6379
missing import fixed
sgoggins Jun 24, 2024
9eb8e63
Add response as member of rate limit exception
ABrain7710 Jun 24, 2024
965d806
Merge branch 'dev' into dev-fixes
ABrain7710 Jun 24, 2024
417cd15
Clean review comments before inserting
ABrain7710 Jun 24, 2024
8f2aaa3
Use logger not session
ABrain7710 Jun 24, 2024
4d574f2
Merge pull request #2828 from chaoss/dev-fixes
sgoggins Jun 24, 2024
614fce6
Merge pull request #2827 from chaoss/improve-facade-directory-selection
sgoggins Jun 24, 2024
d0d20ae
Order settings and sections
ABrain7710 Jun 24, 2024
268d482
Add check to see if git credentials are writable
IsaacMilarky Jun 24, 2024
4eb8f71
Merge pull request #2830 from chaoss/dev-fixes
ABrain7710 Jun 24, 2024
3a2188f
move check to inside loop
IsaacMilarky Jun 24, 2024
8b8f90d
Fix merge error
IsaacMilarky Jun 24, 2024
98ff8e1
Re-prompt on permission error
Ulincsys Jun 24, 2024
febdee1
Merge pull request #2831 from chaoss/config-script-patch
sgoggins Jun 24, 2024
96b25e8
Merge pull request #2832 from chaoss/fix-merge
sgoggins Jun 24, 2024
523e135
Define method to get core_data_last_collected
ABrain7710 Jun 25, 2024
f0cd7f7
Define method to get updated issues
ABrain7710 Jun 25, 2024
d852a60
Optimize prs and issues
ABrain7710 Jun 25, 2024
ce10293
Only use contributor name if we find one
ABrain7710 Jun 25, 2024
c163846
Merge pull request #2833 from chaoss/get-first-contributor
ABrain7710 Jun 25, 2024
0db3ba3
Merge pull request #2820 from chaoss/facade-non-domain-patch
sgoggins Jun 25, 2024
20c3ab9
Fix ml issue
ABrain7710 Jun 25, 2024
dd16275
Merge branch 'dev' into ml_phase_fix
ABrain7710 Jun 25, 2024
4ccfba5
Merge pull request #2834 from chaoss/ml_phase_fix
ABrain7710 Jun 25, 2024
64b82a2
Pass full collection flag to tasks
ABrain7710 Jun 26, 2024
3ee5e48
Pass repo_id
ABrain7710 Jun 26, 2024
cd2c620
Fix issues based on linter
ABrain7710 Jun 26, 2024
9ceb97f
Update issues task to use github data access
ABrain7710 Jun 26, 2024
7392635
Compare datetime with datetime
ABrain7710 Jun 26, 2024
9235aa8
Merge branch 'dev' into optimize-core-recollection-2
ABrain7710 Jun 26, 2024
636ef8c
Fixes to datetime handling
ABrain7710 Jun 26, 2024
2149adf
Changes messages to use gihtub data access
ABrain7710 Jun 27, 2024
62c5d0d
Update github events to use github data access
ABrain7710 Jun 27, 2024
23f7892
Add confirmation dialog for blank input in config script
Ulincsys Jun 28, 2024
cd8bad5
Add return from blank_confirm on bad usage
Ulincsys Jun 28, 2024
ec84836
Merge pull request #2835 from chaoss/optimize-core-recollection-2
sgoggins Jun 28, 2024
249cf37
updating ignore files
sgoggins Jun 28, 2024
ec99c31
Use key manager in requests
ABrain7710 Jun 29, 2024
59abdea
Make api calls with key
ABrain7710 Jun 29, 2024
628a1a2
Make changes recommend by linter
ABrain7710 Jun 29, 2024
9ba79f0
Merge pull request #2838 from chaoss/use-key-manager
sgoggins Jun 29, 2024
97cbf45
Merge pull request #2837 from chaoss/migrate-more-things-to-github-da…
sgoggins Jun 29, 2024
bc547d9
Merge pull request #2836 from chaoss/confirm-blank-input-make-install
sgoggins Jun 29, 2024
ab5b5a0
Remove empty files
ABrain7710 Jun 29, 2024
86c8a68
Move contributors tasks out of folder
ABrain7710 Jun 29, 2024
3cf11de
Move events tasks out of folder
ABrain7710 Jun 29, 2024
da49d9e
Move issues tasks out of folder
ABrain7710 Jun 29, 2024
dd4175e
Move messages tasks out of folder
ABrain7710 Jun 29, 2024
1f7723e
Move traffic tasks out of folder
ABrain7710 Jun 29, 2024
9579840
Fix issues url
ABrain7710 Jun 29, 2024
bfd6b23
Fix import
ABrain7710 Jun 29, 2024
d858c00
Add missing file
ABrain7710 Jun 29, 2024
4003fda
Merge pull request #2839 from chaoss/remove-empty-files
sgoggins Jun 30, 2024
9bd9889
Merge remote-tracking branch 'origin/fix-issues-recollect-url' into dev
sgoggins Jun 30, 2024
a2a26e3
version bump
sgoggins Jun 30, 2024
65ba252
Merge pull request #2841 from chaoss/dev-versionupdate
sgoggins Jun 30, 2024
2b8c819
Fix syntax error
ABrain7710 Jul 1, 2024
f07a971
add empty output handle
IsaacMilarky Jul 1, 2024
f0f7059
Merge branch 'dev-fixes' into add-json-parse-handle
ABrain7710 Jul 1, 2024
c7380c2
check null
IsaacMilarky Jul 1, 2024
9e8795e
Merge branch 'add-json-parse-handle' of github.com:CHAOSS/augur into …
IsaacMilarky Jul 1, 2024
c1b7a84
Merge pull request #2855 from chaoss/add-json-parse-handle
sgoggins Jul 1, 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
18 changes: 18 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
default:
@ echo "Installation Commands:"
@ echo " install Installs Augur's full stack for production"
@ echo " wizard Install Augur and launch the graphical setup wizard"
@ echo " clean Removes potentially troublesome compiled files"
@ echo " rebuild Removes build/compiled files & binaries and reinstalls the project"
@ echo
Expand Down Expand Up @@ -34,6 +35,9 @@ default:
install:
@ ./scripts/install/install.sh dev

wizard:
@ ./scripts/install/install.sh graphical

install-spdx:
@ ./scripts/install/install-spdx.sh

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.71.0
# Augur NEW Release v0.76.0

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.71.0
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.76.0

- 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.
Expand Down
2 changes: 1 addition & 1 deletion augur/api/view/server/Environment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os

Check warning on line 1 in augur/api/view/server/Environment.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 C0114: Missing module docstring (missing-module-docstring) Raw Output: augur/api/view/server/Environment.py:1:0: C0114: Missing module docstring (missing-module-docstring)

class Environment:
"""
Expand Down Expand Up @@ -31,7 +31,7 @@
result[arg] = self[arg]
return result

def as_type(self, type, key):

Check warning on line 34 in augur/api/view/server/Environment.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0622: Redefining built-in 'type' (redefined-builtin) Raw Output: augur/api/view/server/Environment.py:34:22: W0622: Redefining built-in 'type' (redefined-builtin)
if self[key]:
return type(self[key])
return None
Expand All @@ -49,4 +49,4 @@
return str(os.environ)

def __iter__(self):
return (item for item in os.environ.items)
return (item for item in os.environ.items())
3 changes: 1 addition & 2 deletions augur/api/view/server/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
from .Environment import Environment
from .ServerThread import ServerThread
from .LoginException import LoginException
from .Environment import Environment
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
C0114: Missing module docstring (missing-module-docstring)

6 changes: 3 additions & 3 deletions augur/application/cli/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
@test_db_connection
@with_database
@click.pass_context
def start(ctx, disable_collection, development, port):

Check warning on line 46 in augur/application/cli/backend.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 R0912: Too many branches (15/12) (too-many-branches) Raw Output: augur/application/cli/backend.py:46:0: R0912: Too many branches (15/12) (too-many-branches)

Check warning on line 46 in augur/application/cli/backend.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 R0915: Too many statements (60/50) (too-many-statements) Raw Output: augur/application/cli/backend.py:46:0: R0915: Too many statements (60/50) (too-many-statements)
"""Start Augur's backend server."""

try:
Expand Down Expand Up @@ -73,13 +73,13 @@
worker_vmem_cap = get_value("Celery", 'worker_process_vmem_cap')

gunicorn_command = f"gunicorn -c {gunicorn_location} -b {host}:{port} augur.api.server:app --log-file gunicorn.log"
server = subprocess.Popen(gunicorn_command.split(" "))

Check warning on line 76 in augur/application/cli/backend.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 R1732: Consider using 'with' for resource-allocating operations (consider-using-with) Raw Output: augur/application/cli/backend.py:76:13: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

time.sleep(3)
logger.info('Gunicorn webserver started...')
logger.info(f'Augur is running at: {"http" if development else "https"}://{host}:{port}')

processes = start_celery_worker_processes(float(worker_vmem_cap), disable_collection)

Check warning on line 82 in augur/application/cli/backend.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0621: Redefining name 'processes' from outer scope (line 367) (redefined-outer-name) Raw Output: augur/application/cli/backend.py:82:4: W0621: Redefining name 'processes' from outer scope (line 367) (redefined-outer-name)

if os.path.exists("celerybeat-schedule.db"):
logger.info("Deleting old task schedule")
Expand All @@ -88,7 +88,7 @@
log_level = get_value("Logging", "log_level")
celery_beat_process = None
celery_command = f"celery -A augur.tasks.init.celery_app.celery_app beat -l {log_level.lower()}"
celery_beat_process = subprocess.Popen(celery_command.split(" "))

Check warning on line 91 in augur/application/cli/backend.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 R1732: Consider using 'with' for resource-allocating operations (consider-using-with) Raw Output: augur/application/cli/backend.py:91:26: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

if not disable_collection:

Expand Down Expand Up @@ -154,7 +154,7 @@

frontend_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=1 -n frontend:{uuid.uuid4().hex}@%h -Q frontend"
max_process_estimate -= 1
process_list.append(subprocess.Popen(frontend_worker.split(" ")))

Check warning on line 157 in augur/application/cli/backend.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 R1732: Consider using 'with' for resource-allocating operations (consider-using-with) Raw Output: augur/application/cli/backend.py:157:24: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
sleep_time += 6

if not disable_collection:
Expand All @@ -162,25 +162,25 @@
#2 processes are always reserved as a baseline.
scheduling_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=2 -n scheduling:{uuid.uuid4().hex}@%h -Q scheduling"
max_process_estimate -= 2
process_list.append(subprocess.Popen(scheduling_worker.split(" ")))

Check warning on line 165 in augur/application/cli/backend.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 R1732: Consider using 'with' for resource-allocating operations (consider-using-with) Raw Output: augur/application/cli/backend.py:165:28: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
sleep_time += 6

#60% of estimate, Maximum value of 45 : Reduced because it can be lower
core_num_processes = determine_worker_processes(.15, 10)
core_num_processes = determine_worker_processes(.40, 50)
logger.info(f"Starting core worker processes with concurrency={core_num_processes}")
core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency={core_num_processes} -n core:{uuid.uuid4().hex}@%h"
process_list.append(subprocess.Popen(core_worker.split(" ")))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

sleep_time += 6

#20% of estimate, Maximum value of 25
secondary_num_processes = determine_worker_processes(.70, 60)
secondary_num_processes = determine_worker_processes(.39, 50)
logger.info(f"Starting secondary worker processes with concurrency={secondary_num_processes}")
secondary_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency={secondary_num_processes} -n secondary:{uuid.uuid4().hex}@%h -Q secondary"
process_list.append(subprocess.Popen(secondary_worker.split(" ")))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

sleep_time += 6

#15% of estimate, Maximum value of 20
facade_num_processes = determine_worker_processes(.15, 20)
facade_num_processes = determine_worker_processes(.17, 20)
logger.info(f"Starting facade worker processes with concurrency={facade_num_processes}")
facade_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency={facade_num_processes} -n facade:{uuid.uuid4().hex}@%h -Q facade"

Expand Down Expand Up @@ -308,7 +308,7 @@
SET facade_status='Pending', facade_task_id=NULL
WHERE facade_status='Failed Clone' OR facade_status='Initializing';
"""))
#TODO: write timestamp for currently running repos.

Check warning on line 311 in augur/application/cli/backend.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0511: TODO: write timestamp for currently running repos. (fixme) Raw Output: augur/application/cli/backend.py:311:5: W0511: TODO: write timestamp for currently running repos. (fixme)

def assign_orphan_repos_to_default_user(session):
query = s.sql.text("""
Expand Down
6 changes: 3 additions & 3 deletions augur/application/cli/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,21 @@ def determine_worker_processes(ratio,maximum):
sleep_time += 6

#60% of estimate, Maximum value of 45: Reduced because not needed
core_num_processes = determine_worker_processes(.15, 10)
core_num_processes = determine_worker_processes(.40, 50)
logger.info(f"Starting core worker processes with concurrency={core_num_processes}")
core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency={core_num_processes} -n core:{uuid.uuid4().hex}@%h"
process_list.append(subprocess.Popen(core_worker.split(" ")))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

sleep_time += 6

#20% of estimate, Maximum value of 25
secondary_num_processes = determine_worker_processes(.70, 60)
secondary_num_processes = determine_worker_processes(.39, 50)
logger.info(f"Starting secondary worker processes with concurrency={secondary_num_processes}")
secondary_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency={secondary_num_processes} -n secondary:{uuid.uuid4().hex}@%h -Q secondary"
process_list.append(subprocess.Popen(secondary_worker.split(" ")))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

sleep_time += 6

#15% of estimate, Maximum value of 20
facade_num_processes = determine_worker_processes(.15, 20)
facade_num_processes = determine_worker_processes(.17, 20)
logger.info(f"Starting facade worker processes with concurrency={facade_num_processes}")
facade_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency={facade_num_processes} -n facade:{uuid.uuid4().hex}@%h -Q facade"

Expand Down
25 changes: 24 additions & 1 deletion augur/application/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import json
import logging

from augur.application.db.models import Config
from augur.application.db.session import DatabaseSession
from augur.application.config import AugurConfig
from augur.application.cli import DatabaseContext, test_connection, test_db_connection, with_database
Expand Down Expand Up @@ -160,7 +161,7 @@ def add_section(ctx, section_name, file):
@click.option('--section', required=True)
@click.option('--setting', required=True)
@click.option('--value', required=True)
@click.option('--data-type', required=True)
@click.option('--data-type')
@test_connection
@test_db_connection
@with_database
Expand All @@ -169,6 +170,12 @@ def config_set(ctx, section, setting, value, data_type):

with DatabaseSession(logger, engine=ctx.obj.engine) as session:
config = AugurConfig(logger, session)

if not data_type:
result = session.query(Config).filter(Config.section_name == section, Config.setting_name == setting).all()
if not result:
return click.echo("You must specify a data-type if the setting does not already exist")
data_type = result[0].type

if data_type not in config.accepted_types:
print(f"Error invalid type for config. Please use one of these types: {config.accepted_types}")
Expand Down Expand Up @@ -218,6 +225,22 @@ def config_get(ctx, section, setting):
else:
print(f"Error: {section} section not found in config")

@cli.command('get_all_json')
def config_get_all_json():
data = {}
try:
with DatabaseSession(logger) as session:
sections = session.query(Config.section_name).distinct().all()
for section in sections:
data[section[0]] = {}

for row in session.query(Config).all():
data[row.section_name][row.setting_name] = row.value
except:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
W0702: No exception type(s) specified (bare-except)

pass

print(json.dumps(data, indent=4))

@cli.command('clear')
@test_connection
@test_db_connection
Expand Down
4 changes: 2 additions & 2 deletions augur/application/cli/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def start():
secondary_worker_process = None

scheduling_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=1 -n scheduling:{uuid.uuid4().hex}@%h -Q scheduling"
core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=20 -n core:{uuid.uuid4().hex}@%h"
secondary_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=60 -n secondary:{uuid.uuid4().hex}@%h -Q secondary"
core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=50 -n core:{uuid.uuid4().hex}@%h"
secondary_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=50 -n secondary:{uuid.uuid4().hex}@%h -Q secondary"

scheduling_worker_process = subprocess.Popen(scheduling_worker.split(" "))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

core_worker_process = subprocess.Popen(core_worker.split(" "))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

Expand Down
4 changes: 2 additions & 2 deletions augur/application/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def get_section(self, section_name) -> dict:
Returns:
The section data as a dict
"""
query = self.session.query(Config).filter_by(section_name=section_name)
query = self.session.query(Config).filter_by(section_name=section_name).order_by(Config.setting_name.asc())
section_data = execute_session_query(query, 'all')

section_dict = {}
Expand Down Expand Up @@ -213,7 +213,7 @@ def load_config(self) -> dict:
The config from the database
"""
# get all the sections in the config table
query = self.session.query(Config.section_name)
query = self.session.query(Config.section_name).order_by(Config.section_name.asc())
section_names = execute_session_query(query, 'all')

config = {}
Expand Down
33 changes: 30 additions & 3 deletions augur/application/db/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from psycopg2.errors import DeadlockDetected
from typing import List, Any, Optional, Union

from augur.application.db.models import Config, Repo, Commit, WorkerOauth, Issue, PullRequest, PullRequestReview, ContributorsAlias, UnresolvedCommitEmail, Contributor, CollectionStatus
from augur.application.db.models import Config, Repo, Commit, WorkerOauth, Issue, PullRequest, PullRequestReview, ContributorsAlias,UnresolvedCommitEmail, Contributor, CollectionStatus
from augur.tasks.util.collection_state import CollectionState
from augur.application.db import get_session, get_engine
from augur.application.db.util import execute_session_query
Expand All @@ -25,7 +25,7 @@ def convert_type_of_value(config_dict, logger=None):
if data_type == "str" or data_type is None:
return config_dict

elif data_type == "int":
if data_type == "int":
config_dict["value"] = int(config_dict["value"])

elif data_type == "bool":
Expand Down Expand Up @@ -509,4 +509,31 @@ def update_issue_closed_cntrbs_by_repo_id(repo_id):
WHERE issue_id = :issue_id
AND repo_id = :repo_id
""")
connection.execute(update_stmt, update_data)
connection.execute(update_stmt, update_data)

def get_core_data_last_collected(repo_id):

with get_session() as session:
try:
return session.query(CollectionStatus).filter(CollectionStatus.repo_id == repo_id).one().core_data_last_collected
except s.orm.exc.NoResultFound:
return None

def get_secondary_data_last_collected(repo_id):

with get_session() as session:
try:
return session.query(CollectionStatus).filter(CollectionStatus.repo_id == repo_id).one().secondary_data_last_collected
except s.orm.exc.NoResultFound:
return None

def get_updated_prs(repo_id, since):

with get_session() as session:
return session.query(PullRequest).filter(PullRequest.repo_id == repo_id, PullRequest.pr_updated_at >= since).order_by(PullRequest.pr_src_number).all()

def get_updated_issues(repo_id, since):

with get_session() as session:
return session.query(Issue).filter(Issue.repo_id == repo_id, Issue.updated_at >= since).order_by(Issue.gh_issue_number).all()

64 changes: 58 additions & 6 deletions augur/static/css/first_time.css
Original file line number Diff line number Diff line change
@@ -1,50 +1,102 @@
:root {
--color-bg: #1A233A;
--color-bg-light: #272E48;
--color-bg-contrast: #646683;
--color-fg: white;
--color-fg-dark: #b0bdd6;
--color-fg-contrast: black;
--color-accent: #6f42c1;
--color-accent-dark: #6134b3;
--color-notice: #00ddff;
--color-notice-contrast: #006979;
}

body{
margin-top:20px;
color: #bcd0f7;
background: #1A233A;
background-color: var(--color-bg);
color: var(--color-fg);
}

h1 {
font-size: 2rem;
}

.sidebar .sidebar-top {
margin: 0 0 1rem 0;
padding-bottom: 1rem;
text-align: center;
}

.sidebar .sidebar-top .brand-logo {
margin: 0 0 1rem 0;
}

.sidebar .sidebar-top .brand-logo img {
height: 90px;
-webkit-border-radius: 100px;
-moz-border-radius: 100px;
border-radius: 100px;
}

.sidebar .about {
margin: 1rem 0 0 0;
font-size: 0.8rem;
text-align: center;
}

.subtitle {
color: var(--color-fg-dark);
margin-bottom: .5rem;
margin-left: 15px;
}

.no-margin-bottom {
margin-bottom: 0;
}

.card {
background: #272E48;
background: var(--color-bg-light);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
border: 0;
margin-bottom: 1rem;
}

.form-control {
border: 1px solid #596280;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
font-size: .825rem;
background: #1A233A;
color: #bcd0f7;
background: var(--color-bg-light);
color: var(--color-fg);
}

.input-textbox {
color: var(--color-fg);
background-color: var(--color-bg);
border-color: var(--color-accent-dark);
}

.input-textbox::placeholder {
color: var(--color-fg-dark);
}

.input-textbox:focus {
color: var(--color-fg);
background-color: var(--color-bg);
border-color: var(--color-accent-dark);
}

.input-textbox:focus::placeholder {
color: var(--color-fg-dark);
}

.modal-content {
color: black;
color: var(--color-fg-contrast);
}

.editor-container {
height: 300px !important;
}
Expand Down
4 changes: 2 additions & 2 deletions augur/tasks/data_analysis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from celery import chain
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
C0114: Missing module docstring (missing-module-docstring)

import logging

def machine_learning_phase(repo_git):
def machine_learning_phase(repo_git, full_collection):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
W0613: Unused argument 'full_collection' (unused-argument)

from augur.tasks.data_analysis.clustering_worker.tasks import clustering_task
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
C0415: Import outside toplevel (augur.tasks.data_analysis.clustering_worker.tasks.clustering_task) (import-outside-toplevel)

from augur.tasks.data_analysis.discourse_analysis.tasks import discourse_analysis_task
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
C0415: Import outside toplevel (augur.tasks.data_analysis.discourse_analysis.tasks.discourse_analysis_task) (import-outside-toplevel)

from augur.tasks.data_analysis.insight_worker.tasks import insight_task
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
C0415: Import outside toplevel (augur.tasks.data_analysis.insight_worker.tasks.insight_task) (import-outside-toplevel)

Expand All @@ -15,7 +15,7 @@ def machine_learning_phase(repo_git):
ml_tasks.append(discourse_analysis_task.si(repo_git))
ml_tasks.append(insight_task.si(repo_git))
ml_tasks.append(message_insight_task.si(repo_git))
ml_tasks.append(pull_request_analysis_task.si(repo_git))
#ml_tasks.append(pull_request_analysis_task.si(repo_git))

logger.info(f"Machine learning sequence: {ml_tasks}")
return chain(*ml_tasks)
6 changes: 3 additions & 3 deletions augur/tasks/data_analysis/clustering_worker/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ def read(filename):
packages=find_packages(),
install_requires=[
'Flask==2.0.2',
'Flask-Cors==3.0.10',
'Flask-Cors==4.0.1',
'Flask-Login==0.5.0',
'Flask-WTF==1.0.0',
'requests==2.28.0',
'requests==2.32.0',
'psycopg2-binary==2.9.3',
#'sklearn==0.0.0',
'scikit-learn==1.1.3',
'scikit-learn==1.5.0',
'numpy==1.26.0',
'nltk==3.6.6',
'seaborn==0.11.1',
Expand Down
Loading
Loading