Skip to content

Commit

Permalink
feat: more lint formate
Browse files Browse the repository at this point in the history
  • Loading branch information
scientiststwin committed Dec 15, 2023
1 parent e08e266 commit c15d7ca
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 185 deletions.
2 changes: 0 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@


## Running the app

You can quickly launch the application using `Docker Compose`:

```bash
docker-compose --profile flower up
```

## Lint the code

The code can be linted by using the below command

```bash
Expand Down
8 changes: 5 additions & 3 deletions dags/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,20 @@ def get_all_organization():
orgs = get_orgs_profile_from_neo4j()
return orgs

#! for testing
# !for testing
# toghether_crew_org = {
# "id": 1,
# "name": "TogetherCrew",
# "description": "TogetherCrew is a community of developers, designers, and creators who are passionate about building and learning together.",
# "description": """TogetherCrew is a community of developers, designers, and creators
# who are passionate about building and learning together.""",
# "url": "",
# "key": ""
# }
# rndao_org = {
# "id": 2,
# "name": "RnDAO",
# "description": "RnDAO is a community of developers, designers, and creators who are passionate about building and learning together.",
# "description": """RnDAO is a community of developers, designers, and creators
# who are passionate about building and learning together.""",
# "url": "",
# "key": ""
# }
Expand Down
1 change: 1 addition & 0 deletions dags/github_api_helpers/smart_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import requests


def get(url: str, params=None):
"""
Sends a GET request With Smart Proxy.
Expand Down
177 changes: 0 additions & 177 deletions dags/github_old_version.py

This file was deleted.

2 changes: 1 addition & 1 deletion dags/neo4j_storage/commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def save_commit_files_changes_to_neo4j(
session.execute_write(
lambda tx: tx.run(
f"""
MATCH (repo:{Node.Repository.value} {{id: $repository_id}}),
MATCH (repo:{Node.Repository.value} {{id: $repository_id}}),
(c:{Node.Commit.value} {{sha: $commit_sha}})
WITH repo, c
UNWIND $file_changes AS file_change
Expand Down
5 changes: 3 additions & 2 deletions dags/neo4j_storage/pull_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def save_pull_request_to_neo4j(pr: dict, repository_id: str):
f"""
MERGE (pr:{Node.PullRequest.value} {{id: $pr.id}})
SET pr += $pr, pr.repository_id = $repository_id, pr.latestSavedAt = datetime()
WITH pr
MERGE (ghu:{Node.GitHubUser.value} {{id: $repo_creator.id}})
SET ghu += $repo_creator, ghu.latestSavedAt = datetime()
Expand Down Expand Up @@ -129,7 +129,8 @@ def save_pr_files_changes_to_neo4j(pr_id: int, repository_id: str, file_changes:
session.execute_write(
lambda tx: tx.run(
f"""
MATCH (repo:{Node.Repository.value} {{id: $repository_id}}), (pr:{Node.PullRequest.value} {{id: $pr_id}})
MATCH (repo:{Node.Repository.value} {{id: $repository_id}}),
(pr:{Node.PullRequest.value} {{id: $pr_id}})
WITH repo, pr
UNWIND $file_changes AS file_change
MERGE (f:{Node.File.value} {{sha: file_change.sha, filename: file_change.filename}})
Expand Down

0 comments on commit c15d7ca

Please sign in to comment.