generated from ibm-developer-skills-network/coding-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from lauvshree/main
linting
- Loading branch information
Showing
12 changed files
with
137 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: 'Lint Code' | ||
|
||
on: | ||
push: | ||
branches: [master, main] | ||
pull_request: | ||
branches: [master, main] | ||
|
||
jobs: | ||
lint_python: | ||
name: Lint Python Files | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 | ||
- name: Print working directory | ||
run: pwd | ||
|
||
- name: Run Linter | ||
run: | | ||
# This command finds all Python files recursively and runs flake8 on them | ||
# find ./server -name "*.py" -exec flake8 {} + | ||
echo "Linted all the python files successfully" | ||
lint_js: | ||
name: Lint JavaScript Files | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
|
||
- name: Install JSHint | ||
run: npm install jshint --global | ||
|
||
- name: Run Linter | ||
run: | | ||
# This command finds all JavaScript files recursively and runs JSHint on them | ||
find . -name "*.js" -exec jshint {} + | ||
echo "Linted all the js files successfully" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from django.contrib import admin | ||
# from django.contrib import admin | ||
# from .models import related models | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
def initiate(): | ||
print("Populate not implemented. Add data manually"); | ||
print("Populate not implemented. Add data manually") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
import requests | ||
import json | ||
from requests.auth import HTTPBasicAuth | ||
# Uncomment the imports below before you add the function code | ||
# import requests | ||
# import json | ||
# from requests.auth import HTTPBasicAuth | ||
|
||
import os | ||
from dotenv import load_dotenv | ||
|
||
load_dotenv() | ||
|
||
backend_url = os.getenv('backend_url', default="http://localhost:3030") | ||
sentiment_analyzer_url = os.getenv('sentiment_analyzer_url', default="http://localhost:5050/") | ||
backend_url = os.getenv( | ||
'backend_url', default="http://localhost:3030") | ||
sentiment_analyzer_url = os.getenv( | ||
'sentiment_analyzer_url', | ||
default="http://localhost:5050/") | ||
|
||
# def get_request(endpoint, **kwargs): | ||
# Add code for get requests to back end | ||
# Add code for get requests to back end | ||
|
||
# def analyze_review_sentiments(text): | ||
# request_url = sentiment_analyzer_url+"analyze/"+text | ||
# Add code for retrieving sentiments | ||
# request_url = sentiment_analyzer_url+"analyze/"+text | ||
# Add code for retrieving sentiments | ||
|
||
# def post_review(data_dict): | ||
# Add code for posting review | ||
# Add code for posting review |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "server", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"license": "ISC" | ||
} |