This guide will help you upload this project to GitHub and make it ready for others to download and use.
- Go to GitHub.com and sign in
- Click the "+" icon in the top right corner
- Select "New repository"
- Repository name:
from-protege-to-production-python(or your preferred name) - Description: "From Protégé to Production: Integrating OWL Ontologies with Python using Owlready2 and Flask"
- Choose Public (or Private if you prefer)
- DO NOT check "Initialize with README" (we already have one)
- Click "Create repository"
Open terminal/command prompt in your project directory and run:
# Check if git is already initialized
git status
# If not initialized, run:
git init# Add all files
git add .
# Check what will be committed
git status
# Commit the files
git commit -m "Initial commit: Complete DineWise project with tests"# Add the remote repository (replace YOUR_USERNAME with your GitHub username)
git remote add origin https://github.com/YOUR_USERNAME/from-protege-to-production-python.git
# Or if using SSH:
git remote add origin git@github.com:YOUR_USERNAME/from-protege-to-production-python.git
# Verify the remote
git remote -v# Push to GitHub (first time)
git branch -M main
git push -u origin main- Go to your GitHub repository page
- Verify all files are uploaded:
- ✅ README.md
- ✅ QUICKSTART.md
- ✅ All Python files (.py)
- ✅ restaurant-ontology.owl
- ✅ requirements.txt
- ✅ tests/ directory
- ✅ LICENSE
After pushing, update the repository URL in these files:
- README.md - Replace
<your-repository-url>with your actual URL - QUICKSTART.md - Replace
<your-repository-url>with your actual URL - CONTRIBUTING.md - Update repository URL if needed
Example:
# Before
git clone <your-repository-url>
# After
git clone https://github.com/YOUR_USERNAME/from-protege-to-production-python.gitThen commit and push:
git add README.md QUICKSTART.md
git commit -m "Update repository URLs in documentation"
git pushOn GitHub, click the ⚙️ gear icon next to "About" section and add topics:
pythonowl-ontologyowlready2flaskrest-apisemantic-webontology-reasoningtutorial
The project includes a GitHub Actions workflow for automated testing.
- Go to the "Actions" tab in your repository
- Click "I understand my workflows, go ahead and enable them"
- The workflow will run automatically on push and pull requests
On GitHub repository page, edit the description to:
A complete tutorial project demonstrating OWL ontology integration with Python, from Protégé to production-ready REST API. Includes Owlready2, Flask, and comprehensive test suite.
- Repository created on GitHub
- Git initialized locally
- All files added and committed
- Remote repository connected
- Code pushed to GitHub
- Files visible on GitHub
- Repository URLs updated in documentation
- README.md displays correctly
- Topics added (optional)
- GitHub Actions enabled (optional)
- Description added (optional)
When you make changes:
# 1. Check what changed
git status
# 2. Add changed files
git add .
# 3. Commit with a descriptive message
git commit -m "Description of your changes"
# 4. Push to GitHub
git push# 1. Initialize git (if needed)
git init
# 2. Add all files
git add .
# 3. Make initial commit
git commit -m "Initial commit: Complete DineWise project"
# 4. Add remote (replace YOUR_USERNAME)
git remote add origin https://github.com/YOUR_USERNAME/from-protege-to-production-python.git
# 5. Push to GitHub
git branch -M main
git push -u origin mainOnce uploaded, share the repository URL:
Repository URL format:
https://github.com/YOUR_USERNAME/from-protege-to-production-python
Clone command for others:
git clone https://github.com/YOUR_USERNAME/from-protege-to-production-python.gitBefore pushing, ensure these files exist:
- ✅
README.md- Main documentation - ✅
QUICKSTART.md- Quick start guide - ✅
CONTRIBUTING.md- Contribution guidelines - ✅
LICENSE- MIT License - ✅
requirements.txt- Dependencies - ✅
.gitignore- Git ignore file - ✅
restaurant-ontology.owl- Base ontology - ✅ All Python scripts (
.pyfiles) - ✅
tests/directory with all test files - ✅
pytest.ini- Pytest configuration - ✅
.github/workflows/- CI/CD workflows (optional)
Solution: Check that you've added the correct remote URL and have access to the repository.
Solution: Make sure you're authenticated with GitHub:
- For HTTPS: Use personal access token
- For SSH: Set up SSH keys
Solution: Check .gitignore is working. Some files should be excluded (like __pycache__, .pyc files).
Solution:
# Pull first, then push
git pull origin main --rebase
git push origin mainOnce uploaded, anyone can:
- Clone your repository
- Follow
QUICKSTART.mdto set up and run the project - Run tests to verify everything works
- Contribute improvements
Your project is now on GitHub! 🚀