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

Updating dev with hot fixes applied #2968

Merged
merged 13 commits into from
Jan 14, 2025
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Augur NEW Release v0.76.5
# Augur NEW Release v0.76.7

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 [here](https://metrix.chaoss.io) - this is tied to a public instance of [Augur](https://ai.chaoss.io).
Expand All @@ -12,7 +12,7 @@ We follow the [First Timers Only](https://www.firsttimersonly.com/) philosophy o
**If you want to jump right in, the updated docker, docker-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.76.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.76.7).


- The `main` branch is a stable version of our new architecture, which features:
Expand Down Expand Up @@ -152,4 +152,4 @@ GSoC 2019 participants

GSoC 2018 participants
-----------------------
- `Keanu Nichols <https://github.com/kmn5409/>`_
- `Keanu Nichols <https://github.com/kmn5409/>`_
4 changes: 2 additions & 2 deletions augur/application/db/models/augur_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ def parse_github_org_url(url):
return result.groups()[0]

@staticmethod
def insert_gitlab_repo(session, url: str, repo_group_id: int, tool_source, repo_src_id):
def insert_gitlab_repo(session, url: str, repo_group_id: int, tool_source, repo_src_id = None):
"""Add a repo to the repo table.

Args:
Expand Down Expand Up @@ -1116,7 +1116,7 @@ def insert_gitlab_repo(session, url: str, repo_group_id: int, tool_source, repo_
return result[0]["repo_id"]

@staticmethod
def insert_github_repo(session, url: str, repo_group_id: int, tool_source, repo_type, repo_src_id):
def insert_github_repo(session, url: str, repo_group_id: int, tool_source, repo_type, repo_src_id = None):
"""Add a repo to the repo table.

Args:
Expand Down
13 changes: 11 additions & 2 deletions augur/tasks/git/facade_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,27 @@

for hash in missing_message_hashes:
#Get the huge list of commits to process.
logger.debug(f"The hash object is: {hash}. It has a type of: {type(hash)}")

try:
escaped_hash = hash['cmt_commit_hash']
except (TypeError, IndexError):
escaped_hash = hash

absolute_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path, repo.repo_name)
repo_loc = (f"{absolute_path}/.git")

try:
commit_message = check_output(
f"git --git-dir {repo_loc} log --format=%B -n 1 {hash}".split()
f"git --git-dir {repo_loc} log --format=%B -n 1 {escaped_hash}".split()
#f"git --git-dir {repo_loc} log --format=%B -n 1 {hash}".split()
).decode('utf-8').strip()

msg_record = {
'repo_id' : repo.repo_id,
'cmt_msg' : commit_message,
'cmt_hash' : hash,
#'cmt_hash' : hash,
'cmt_hash': escaped_hash if isinstance(escaped_hash, str) else escaped_hash['cmt_commit_hash'],
'tool_source' : 'Facade',
'tool_version' : '0.78?',
'data_source' : 'git',
Expand Down Expand Up @@ -239,7 +248,7 @@
facade_helper.log_activity('Debug',f"Commits missing from repo {repo_id}: {len(missing_commits)}")


if not len(missing_commits) or repo_id is None:

Check warning on line 251 in augur/tasks/git/facade_tasks.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 C1802: Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len) Raw Output: augur/tasks/git/facade_tasks.py:251:7: C1802: Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len)
#session.log_activity('Info','Type of missing_commits: %s' % type(missing_commits))
return

Expand Down
3 changes: 2 additions & 1 deletion augur/tasks/github/util/populate_repo_src_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def populate_repo_src_id_task(repo_git):
repo_src_id = get_repo_src_id(owner, repo, logger)

update_repo_src_id(repo_id, repo_src_id)


return 0

def update_repo_src_id(repo_id, repo_src_id):

Expand Down
5 changes: 3 additions & 2 deletions docker/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM python:3.11-slim-bullseye

LABEL maintainer="[email protected]"
LABEL version="0.76.5"
LABEL version="0.76.6"

ENV DEBIAN_FRONTEND=noninteractive
ENV PATH="/usr/bin/:/usr/local/bin:/usr/lib:${PATH}"
Expand Down Expand Up @@ -100,9 +100,10 @@ RUN set -x \
&& /opt/venv/bin/pip install wheel \
&& /opt/venv/bin/pip install .

RUN ./scripts/docker/install-go.sh
ENV PATH="${PATH}:/usr/local/go/bin"
RUN ./scripts/docker/install-workers-deps.sh

RUN ./scripts/docker/install-go.sh
# RUN ./scripts/install/workers.sh

RUN mkdir -p repos/ logs/ /augur/facade/
Expand Down
2 changes: 1 addition & 1 deletion docker/database/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM postgres:16

LABEL maintainer="[email protected]"
LABEL version="0.76.5"
LABEL version="0.76.6"

ENV POSTGRES_DB "test"
ENV POSTGRES_USER "augur"
Expand Down
2 changes: 1 addition & 1 deletion docker/rabbitmq/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM rabbitmq:3.12-management-alpine

LABEL maintainer="574/[email protected]"
LABEL version="0.76.5"
LABEL version="0.76.6"

ARG RABBIT_MQ_DEFAULT_USER=augur
ARG RABBIT_MQ_DEFAULT_PASSWORD=password123
Expand Down
4 changes: 2 additions & 2 deletions metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

__short_description__ = "Python 3 package for free/libre and open-source software community metrics, models & data collection"

__version__ = "0.76.5"
__release__ = "v0.76.5 (Pumpkin Home Companion)"
__version__ = "0.76.7"
__release__ = "v0.76.7 (Captain Tuttle)"

__license__ = "MIT"
__copyright__ = "University of Missouri, University of Nebraska-Omaha, CHAOSS, Brian Warner & Augurlabs 2112"
16 changes: 8 additions & 8 deletions scripts/docker/install-go.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
# install Go
installGo() (
cd "$(mktemp -d)"
wget https://golang.org/dl/go1.16.5.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.16.5.linux-amd64.tar.gz
)
installGo
export PATH=$PATH:/usr/local/go/bin

export VERSION="1.22.9"

cd "$(mktemp -d)"
wget https://golang.org/dl/go${VERSION}.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go${VERSION}.linux-amd64.tar.gz

export PATH=$PATH:/usr/local/go/bin
23 changes: 22 additions & 1 deletion scripts/docker/install-workers-deps.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
set -x

OLD=$(pwd)
for i in $(find . | grep -i setup.py);
do

cd $(dirname $i)
/opt/venv/bin/pip install .
cd $OLD
Expand All @@ -14,3 +14,24 @@ done
for i in stopwords punkt popular universal_tagset ; do
/opt/venv/bin/python -m nltk.downloader $i
done

# Note this
CURRENT_DIR=$PWD;

# Install scc
SCC_DIR="$HOME/scc"
echo "Cloning Sloc Cloc and Code (SCC) to generate value data ..."
git clone https://github.com/boyter/scc "$SCC_DIR"
cd $SCC_DIR
go build;
echo "scc build done"
cd $CURRENT_DIR

# Install scorecard
SCORECARD_DIR="$HOME/scorecard"
echo "Cloning OSSF Scorecard to generate scorecard data ..."
git clone https://github.com/ossf/scorecard $SCORECARD_DIR
cd $SCORECARD_DIR
go build;
echo "scorecard build done"
cd $CURRENT_DIR
1 change: 1 addition & 0 deletions test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test
Loading