This repository contains the source code and workflow for the CSMODEL Major Course Output.
To prevent Git merge conflicts and corrupted notebook files, we are strictly using Jupytext.
Do not commit .ipynb files to this repository. All notebook development will be done via
synchronized .py files.
.
├── .gitignore
├── README.md
├── requirements.txt
├── data/ # Local datasets (ignored by Git)
│ ├── anime-dataset-2023.csv
│ ├── filtered_users-score-2023.csv
│ └── users-details-2023.csv
├── notebooks/ # Development scripts
│ └── MCO_FINAL.py # Final development script (synced via Jupytext)
├── scripts/ # Automation and verification utilities
│ └── enforce_limits.py # Local/CI syllabus constraint verification
└── deliverables/ # Final exports (PDFs, compiled notebook)
Ensure you have Python installed on your system.
Install uv (our package manager) globally:
Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | shClone this repository and open the folder in your terminal. Run the following commands to create the virtual environment and install dependencies:
# Create a virtual environment uv venv # Activate the virtual environment # Windows: .venv\Scripts\activate # macOS/Linux: source .venv/bin/activate # Install dependencies from requirements.txt uv pip install -r requirements.txt
- Create a
data/folder in the root directory if it does not exist. - Download the datasets from MyAnimeList (anime-dataset-2023.csv, users-details-2023.csv, filtered_users-score-2023.csv).
- Place them inside the
data/folder. Do not commit these files to Git.
To work with the Jupytext .py files as if they were standard Jupyter Notebooks, configure
VS Code as follows:
- Install the Python and Jupyter extensions in VS Code.
- Install the Jupytext extension (by congyiwu).
- Open any
.pyfile inside thenotebooks/directory. - If you have the Jupytext extension installed, VS Code will automatically prompt you to open
it as a Notebook, or you can right-click the
.pyfile and select "Open With -> Jupytext". - Ensure your Jupyter Kernel is set to the
.venvcreated in Step 2.
- Work on your assigned section within the
notebooks/directory (e.g.,MCO_FINAL.pyor separate sandbox files as agreed). - Write all code and markdown cells directly in the
.pyfile format. - Push your changes to the repository on the
masterbranch. - Never push
.ipynbfiles. The finalMCO_FINAL.ipynbfile will be compiled locally or via the CI/CD pipeline.
To verify that your Markdown word counts, required section headers, and total figure counts comply with the strict DLSU CSMODEL syllabus before committing, run:
python scripts/enforce_limits.py
This script acts as our "Syllabus Enforcer". If any constraint is violated, it will print the exact cell index and failure details to prevent an automatic zero grade.
To manually compile the Python script into a Jupyter Notebook locally, run:
jupytext --to ipynb notebooks/MCO_FINAL.py
Alternatively, pushing your changes to master automatically compiles the notebook on
GitHub Actions and attaches the final .ipynb as a downloadable artifact.