From 0064ac3b00ed62c757354827487f2c1a7beefd03 Mon Sep 17 00:00:00 2001 From: INNOCENT-ops806 <240418541@tut4life.ac.za> Date: Wed, 6 Aug 2025 07:14:18 +0200 Subject: [PATCH 01/48] fix: corrected a spelling error in the readme file The word was previously mispelled as 'araound' --- README.md | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 45a4777..314a638 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -
|
@@ -15,37 +14,43 @@
[](https://github.com/Glimmr-Lang/PicassoCode/actions/workflows/maven.yml)
## About
+
Piccasso code is an image editor that uses code to create/edit an image. This allows powerful designs to be created with ease and
-automation. The editor uses *glimr* as the scripting language for writing the image editing code.
+automation. The editor uses _glimr_ as the scripting language for writing the image editing code.
## Download
->> Coming soon
+
+> > Coming soon
## Building
```sh
-$ git clone git@github.com:hexaredecimal/Piccode.git
-$ cd Piccode
-$ mvn package
+git clone git@github.com:hexaredecimal/Piccode.git
+cd Piccode
+mvn package
```
+
### Test your build
+
```sh
-$ java -jar target/Piccode-1.0-SNAPSHOT-jar-with-dependencies.jar
+java -jar target/Piccode-1.0-SNAPSHOT-jar-with-dependencies.jar
```
-
## Inspired by
+
Piccassocode is heavily inspired by the [OpenSCAD](https://openscad.org/) program and tries to mimic its functionality
as much as it can while still being an image editor. I was stoked when I tried OpenSCAD for the first time and ended up
-challenging myself to start a new project based araound the idea. A friend suggested something that has to do with graphics
-and my first though was OpenSCAD, but 2D. The idea quickly grew and the small program became an image editor.
+challenging myself to start a new project based around the idea. A friend suggested something that has to do with graphics
+and my first though was OpenSCAD, but 2D. The idea quickly grew and the small program became an image editor.
## References
+
[java image filters](http://www.jhlabs.com/ip/filters/index.html)
[Icons8 Pack](https://icons8.com/icons/parakeet--style-parakeet)
## License
+
```sh
drawString("
+-----------------------------------+
@@ -56,7 +61,5 @@ drawString("
+-----------------------------------+
", 0, 0) // Released under the MIT LICENSE
```
->> Thank you for viewing.
-
-
+> > Thank you for viewing.
From 26bd5a7a8556321cea2bc81793b356d5fd3940a3 Mon Sep 17 00:00:00 2001
From: "coderabbitai[bot]"
<136622811+coderabbitai[bot]@users.noreply.github.com>
Date: Wed, 6 Aug 2025 05:23:31 +0000
Subject: [PATCH 02/48] =?UTF-8?q?=F0=9F=93=9D=20CodeRabbit=20Chat:=20Add?=
=?UTF-8?q?=20pytest=20test=20suite=20for=20README=20validation=20with=20s?=
=?UTF-8?q?upporting=20files=20and=20docs?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pytest.ini | 10 +
requirements-test.txt | 4 +
run_readme_tests.py | 36 +++
tests/test_readme_validation.py | 427 ++++++++++++++++++++++++++++++++
4 files changed, 477 insertions(+)
create mode 100644 pytest.ini
create mode 100644 requirements-test.txt
create mode 100644 run_readme_tests.py
create mode 100644 tests/test_readme_validation.py
diff --git a/pytest.ini b/pytest.ini
new file mode 100644
index 0000000..2b397c4
--- /dev/null
+++ b/pytest.ini
@@ -0,0 +1,10 @@
+[tool:pytest]
+testpaths = tests
+python_files = test_*.py
+python_classes = Test*
+python_functions = test_*
+addopts = -v --tb=short --strict-markers
+markers =
+ slow: marks tests as slow (deselect with '-m "not slow"')
+ integration: marks tests as integration tests
+ unit: marks tests as unit tests
\ No newline at end of file
diff --git a/requirements-test.txt b/requirements-test.txt
new file mode 100644
index 0000000..9e14c88
--- /dev/null
+++ b/requirements-test.txt
@@ -0,0 +1,4 @@
+pytest>=7.0.0
+pytest-mock>=3.6.1
+requests>=2.25.1
+pathlib2>=2.3.7; python_version < '3.4'
\ No newline at end of file
diff --git a/run_readme_tests.py b/run_readme_tests.py
new file mode 100644
index 0000000..e2d8d2f
--- /dev/null
+++ b/run_readme_tests.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python3
+"""
+Simple test runner for README validation tests.
+Run this script to execute all README-related tests.
+"""
+
+import subprocess
+import sys
+import os
+
+def main():
+ """Run the README validation tests."""
+ try:
+ # Change to the repository root directory
+ repo_root = os.path.dirname(os.path.abspath(__file__))
+ os.chdir(repo_root)
+
+ # Run pytest with verbose output
+ result = subprocess.run([
+ sys.executable, "-m", "pytest",
+ "tests/test_readme_validation.py",
+ "-v", "--tb=short"
+ ], capture_output=False)
+
+ return result.returncode
+
+ except FileNotFoundError:
+ print("Error: pytest not found. Please install pytest:")
+ print("pip install -r requirements-test.txt")
+ return 1
+ except Exception as e:
+ print(f"Error running tests: {e}")
+ return 1
+
+if __name__ == "__main__":
+ sys.exit(main())
\ No newline at end of file
diff --git a/tests/test_readme_validation.py b/tests/test_readme_validation.py
new file mode 100644
index 0000000..d16d2b7
--- /dev/null
+++ b/tests/test_readme_validation.py
@@ -0,0 +1,427 @@
+import pytest
+import re
+import requests
+from pathlib import Path
+from unittest.mock import patch, Mock
+
+
+class TestReadmeValidation:
+ """Comprehensive test suite for README.md validation and content verification."""
+
+ @pytest.fixture
+ def readme_content(self):
+ """Fixture to load README.md content for testing."""
+ readme_path = Path("README.md")
+ if readme_path.exists():
+ return readme_path.read_text(encoding='utf-8')
+ return ""
+
+ def test_readme_file_exists(self):
+ """Test that README.md file exists in the repository root."""
+ readme_path = Path("README.md")
+ assert readme_path.exists(), "README.md file should exist in repository root"
+ assert readme_path.is_file(), "README.md should be a file, not a directory"
+
+ def test_readme_is_not_empty(self, readme_content):
+ """Test that README.md is not empty and has meaningful content."""
+ assert readme_content.strip(), "README.md should not be empty"
+ assert len(readme_content.strip()) > 100, "README.md should have substantial content"
+
+ def test_project_title_present(self, readme_content):
+ """Test that the project title 'Piccaso Code' is present in README."""
+ assert "Piccaso Code" in readme_content, "Project title 'Piccaso Code' should be present"
+ # Also test for the correct spelling variant
+ assert "Piccasso code" in readme_content, "Alternative spelling 'Piccasso code' should be present"
+
+ def test_project_description_present(self, readme_content):
+ """Test that key project description elements are present."""
+ assert "image editor" in readme_content.lower(), "Should mention 'image editor'"
+ assert "java" in readme_content.lower(), "Should mention 'java' as the programming language"
+ assert "glimr" in readme_content.lower(), "Should mention 'glimr' scripting language"
+ assert "code to create/edit an image" in readme_content.lower(), "Should describe core functionality"
+
+ def test_html_table_structure(self, readme_content):
+ """Test that HTML table structure is valid and well-formed."""
+ # Test for table opening and closing tags
+ assert " | |
| .*? | ", readme_content, re.DOTALL) + assert len(table_cells) >= 2, "Should have at least two table cells" + + def test_app_icon_reference(self, readme_content): + """Test that app icon image reference is properly formatted.""" + img_pattern = r'
|
- |
-
- Piccaso Code-Creativity + Logic + Math-A code based image editor created 100% in java - |
-
|
+ |
+
+ Picasso Code+Creativity + Logic + Math+A code based image editor created 100% in java + |
+