Skip to content

Al-Scripting/Anime-Wiki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

History
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 AniWiki - A Community-Driven Anime Encyclopedia

Python CI/CD Pipeline

AniWiki is an open-source project designed to help anime fans search, explore, and track anime series. This project was developed as part of a DevOps class under Josh Lowe to apply best practices in CI/CD, automation, and containerization.


πŸ“Œ Features

πŸ‘‰ Top Anime Ranking
πŸ‘‰ Seasonal New Releases
πŸ‘‰ Search by Name
πŸ‘‰ Search by Studio
πŸ‘‰ Search by Genre

πŸ“Œ Backlog Features

πŸ‘‰ Upcoming Anime Section

πŸ‘‰ Manga Explorer


πŸ› οΈ Backlog Features (Future Enhancements)

  • Create a Watchlist for Favorite Anime
  • User Account System (Login & Registration)
  • Personalized Anime Recommendations
  • Community Ratings & Reviews

🏠 Installation & Setup (Local Deployment)

1️⃣ Install Python

Windows

Download and install Python from python.org.
Ensure Python is added to your system path by selecting "Add Python to PATH" during installation.
Verify installation:

python --version

Linux/macOS

Most Linux/macOS systems have Python pre-installed. To install/update, run:

sudo apt update && sudo apt install python3
sudo apt install python3-pip

Verify installation:

python3 --version

2️⃣ Clone the Repository

git clone https://github.com/Ontario-Tech-NITS/final-project-group-effort-group-3.git
cd final-project-group-effort-group-3

3️⃣ Set Up a Virtual Environment (Optional)

python -m venv env

Activate the virtual environment:

  • Windows:
    env\Scripts\activate
  • Linux/macOS:
    source env/bin/activate

4️⃣ Install Dependencies

pip install -r requirements.txt 

5️⃣ Run the Flask Server

python app.py | python3 app.py 

Then visit http://127.0.0.1:5000/ in your browser.


πŸš€ CI/CD Pipeline

This project uses a CI/CD pipeline to automatically test and ensure the quality of the code on every push, pull request, or manual trigger. Below are the steps that the pipeline performs:

Pipeline Steps

  1. Build:

    • The application is built using Python 3.10 to ensure the environment is correctly set up.
    • This ensures that no structural issues exist in the codebase.
    • The pipeline runs on Ubuntu as the enviroment based on the phase 2 requirments
    • Checks out the latest version of the repository
    • This ensures the enviroment is properly setup before running tests and validations
  2. Linting:

    • The code is analyzed using Pylint, a static code analysis tool.
    • This step ensures the code follows consistent coding practices and checks for potential errors. Line too long warnings are disabled
    • installs all project dependencies listed in the requirments.txt
    • detects coding errors, styling mismatches and overall consistency
  3. Tests:

    • Unit tests are run to verify the functionality of the code.
    • The tests are executed using the unittest framework to ensure that no new code introduces bugs.
    • It searches for test files inside the static/scripts/test directory and runs them to ensure they are all passing

Workflow Summary:

  • Trigger: The pipeline runs automatically on every push, pull request, or manual trigger.
  • Tasks:
    1. Set up Python 3.10: Prepares the environment.
    2. Install dependencies: Installs the required libraries.
    3. Lint the code: Ensures code quality and consistency.
    4. Run unit tests: Verifies the correctness of the code.

πŸ›  Troubleshooting & Common Issues:

❌ Pipeline Fails at Linting Step:

  • Run pylint locally before committing changes: pylint static/scripts/test
  • Check for syntax errors, unused variables, or formatting issues.

❌ Tests Fail in CI/CD but Pass Locally:

  • Ensure that all dependencies are correctly listed in requirements.txt.
  • Run tests locally before pushing


🏠 Project Structure

πŸ“ final-project-group-effort-group-3
│── πŸ“ static  # Static assets (CSS, JS, Images)
β”‚   │── πŸ“ images  # Image assets
β”‚   β”‚   │── 🌞 404.png    
β”‚   β”‚   │── 🌞 Factsheet.png
β”‚   β”‚   │── 🌞 Logo.png
β”‚   │── πŸ“ scripts  # JavaScript files
|   │── │── πŸ“ tests # Unit tests
|   │── │── │── πŸ“ test_search_by_name.py
|   │── │── │── πŸ“ test_search_by_studio.py
|   │── │── │── πŸ“ test_search_by_genre.py
|   │── │── │── πŸ“ test_season_new_releases.py
|   │── │── │── πŸ“ test_top_anime.py
|   │── │── │── πŸ“ test_manga_explorer.py
|   │── │── │── πŸ“ test_upcoming_anime.py
β”‚   |   |── πŸ“ search_by_name.py
β”‚   |   |── πŸ“ search_by_studio.py
β”‚   |   |── πŸ“ search_by_genre.py
β”‚   |   |── πŸ“ season_new_releases.py
β”‚   |   |── πŸ“ top_anime.py
β”‚   |   |── πŸ“ manga_explorer.py
β”‚   |   |── πŸ“ upcoming_anime.py
β”‚   │── πŸ“ styles  # CSS Stylesheets
β”‚   |   |── πŸ“ main.css
β”‚   |   |── πŸ“ 404.css
β”‚   |   |── πŸ“ search_by_name.css
β”‚   |   |── πŸ“ search_by_studio.css
β”‚   |   |── πŸ“ search_by_genre.css
β”‚   |   |── πŸ“ season_new_releases.css
β”‚   |   |── πŸ“ top_anime.css
β”‚   |   |── πŸ“ upcoming.css
β”‚   |   |── πŸ“ manga_explorer.css
│── πŸ“ templates  # HTML templates
β”‚   │── πŸ“ 404.html       # Custom 404 Page
β”‚   │── πŸ“ index.html     # Homepage
β”‚   │── πŸ“ search_by_name.html
β”‚   │── πŸ“ search_by_studio.html
β”‚   │── πŸ“ search_by_genre.html
β”‚   │── πŸ“ season_new_releases.html
β”‚   │── πŸ“ upcoming_search.html
β”‚   │── πŸ“ manga_explorer.html
β”‚   │── πŸ“ top_anime.html
│── πŸ“ app.py             # Flask Backend Application
│── πŸ“ README.md          # Project Documentation
│── πŸ“ requirements.txt   # Python Dependencies
│── πŸ“ .github/workflows  # GitHub Actions CI/CD Pipeline

πŸš€ Running Unit Tests

To run the unit tests, navigate to the project directory and execute:

python -m unittest discover -s ./static/scripts/test

This will automatically discover and run all test cases inside the static/scripts/test directory.


πŸ’ͺ Contributing

We welcome contributions! Fork the repo, create a branch, and submit a PR.


πŸ“š License

This project is licensed under the MIT License. You are free to use, modify, and distribute it.



🀝 Meet the Team | Group Effort

πŸ‘¨β€πŸ’» Developers: Al, Yousif, Caleb, Faraz, Sam πŸ“š Instructor: Josh Lowe

Want to contribute? Fork the repo and send us a pull request! πŸš€

πŸ‘€ References


🌟 If you like the project, don't forget to star it on GitHub!

About

AniWiki is an open-source project designed to help anime fans search, explore, and track anime series. This project was developed as part of a DevOps class under Josh Lowe to apply best practices in CI/CD, automation, and containerization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages