Compare commits
15
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84993fad28 | ||
|
|
292be57ab1 | ||
|
|
d479c5a667 | ||
|
|
5e4e471aaf | ||
|
|
4454dc6740 | ||
|
|
5b5787b37c | ||
|
|
183f62e6e4 | ||
|
|
a99ae9bb6d | ||
|
|
5fbb3870c0 | ||
|
|
71edaa7cc5 | ||
|
|
aa89d00744 | ||
|
|
17b7f91e8f | ||
|
|
ec639b22f2 | ||
|
|
69a466ec65 | ||
|
|
f04c04d786 |
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: "[Bug] ..."
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: "[Feature] ..."
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -0,0 +1,44 @@
|
||||
name: "Copilot Setup Steps"
|
||||
|
||||
# Automatically run the setup steps when they are changed to allow for easy validation, and
|
||||
# allow manual testing through the repository's "Actions" tab
|
||||
"on":
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- .github/workflows/copilot-setup-steps.yml
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/copilot-setup-steps.yml
|
||||
|
||||
jobs:
|
||||
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
|
||||
copilot-setup-steps:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Set the permissions to the lowest permissions possible needed for your steps.
|
||||
# Copilot will be given its own token for its operations.
|
||||
permissions:
|
||||
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
|
||||
contents: read
|
||||
|
||||
# You can define any steps you want, and they will run before the agent starts.
|
||||
# If you do not check out your code, Copilot will do this for you.
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.8"
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pytest pytest-cov
|
||||
|
||||
- name: Validate Python syntax
|
||||
run: |
|
||||
python3 -c "import ast; ast.parse(open('styles_csv_loader.py').read()); print('styles_csv_loader.py syntax valid')"
|
||||
python3 -c "import ast; ast.parse(open('__init__.py').read()); print('__init__.py syntax valid')"
|
||||
@@ -3,7 +3,7 @@ on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
paths:
|
||||
- "pyproject.toml"
|
||||
|
||||
|
||||
+8
-1
@@ -1 +1,8 @@
|
||||
from styles_csv_loader import StylesCSVLoader
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add current directory to sys.path to ensure we can import styles_csv_loader
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
if current_dir not in sys.path:
|
||||
sys.path.insert(0, current_dir)
|
||||
from styles_csv_loader import *
|
||||
|
||||
@@ -38,6 +38,8 @@ class StylesCSVLoader:
|
||||
Your current root directory is: {normalized_base_path}
|
||||
Error: {e}
|
||||
""")
|
||||
# Return the error dictionary instead of the intermediate styles list
|
||||
styles = {"Error loading styles.csv, check the console": ["", ""]}
|
||||
return styles
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -52,7 +52,9 @@ class TestStylesCSVLoader(unittest.TestCase):
|
||||
self.assertIsInstance(styles, dict)
|
||||
error_key = list(styles.keys())[0]
|
||||
self.assertIn('Error loading styles.csv', error_key)
|
||||
self.assertIsInstance(styles[error_key], str)
|
||||
# Style values should always be lists with positive and negative prompts
|
||||
self.assertIsInstance(styles[error_key], list)
|
||||
self.assertEqual(len(styles[error_key]), 2)
|
||||
|
||||
def test_load_invalid_csv_buggy_behavior(self):
|
||||
"""[BUG DOCUMENTATION] Current buggy behavior: returns a list instead of error dict for invalid CSV.
|
||||
|
||||
Reference in New Issue
Block a user