diff --git a/.github/workflows/release.yml b/.gitea/workflows/release.yml similarity index 63% rename from .github/workflows/release.yml rename to .gitea/workflows/release.yml index 7590933..10552f1 100644 --- a/.github/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -27,7 +27,7 @@ jobs: - name: Run security scan run: bandit -r wikijs - release: + build: needs: test runs-on: ubuntu-latest steps: @@ -35,9 +35,28 @@ jobs: with: fetch-depth: 0 - - name: Create GitHub Release + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build package + run: python -m build + + - name: Check package + run: twine check dist/* + + - name: Create Release uses: softprops/action-gh-release@v1 with: generate_release_notes: true + files: | + dist/*.whl + dist/*.tar.gz env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.gitea/workflows/test.yml similarity index 79% rename from .github/workflows/test.yml rename to .gitea/workflows/test.yml index 439978a..0853858 100644 --- a/.github/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -35,10 +35,9 @@ jobs: run: mypy wikijs test: - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: @@ -55,15 +54,16 @@ jobs: pip install -e ".[dev]" - name: Run unit tests - run: pytest tests/ -v --cov=wikijs --cov-report=xml + run: pytest tests/ -v --cov=wikijs --cov-report=xml --cov-report=term-missing - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest' + - name: Upload coverage report + uses: actions/upload-artifact@v4 + if: matrix.python-version == '3.11' with: - file: ./coverage.xml - flags: unittests - name: codecov-umbrella + name: coverage-report + path: | + ./coverage.xml + ./tests/htmlcov/ security: runs-on: ubuntu-latest @@ -83,10 +83,10 @@ jobs: - name: Run security scan with bandit run: bandit -r wikijs -f json -o bandit-report.json || true - - name: Upload bandit report + - name: Upload security report uses: actions/upload-artifact@v4 with: - name: bandit-report + name: security-report path: bandit-report.json package: @@ -108,4 +108,10 @@ jobs: run: python -m build - name: Check package - run: twine check dist/* \ No newline at end of file + run: twine check dist/* + + - name: Upload package artifacts + uses: actions/upload-artifact@v4 + with: + name: python-package + path: dist/ \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 3edae61..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -name: Bug Report -about: Create a report to help us improve -title: '[BUG] ' -labels: ['bug'] -assignees: '' ---- - -## Bug Description -A clear and concise description of what the bug is. - -## Steps 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. - -## Actual Behavior -A clear and concise description of what actually happened. - -## Code Example -If applicable, add code snippets to help explain your problem. - -```python -# Your code here -``` - -## Environment -- **SDK Version**: [e.g. 0.1.0] -- **Python Version**: [e.g. 3.11.0] -- **Operating System**: [e.g. Ubuntu 22.04] -- **Wiki.js Version**: [e.g. 2.5.300] - -## Error Messages -If applicable, add any error messages or stack traces. - -``` -Paste error messages here -``` - -## Additional Context -Add any other context about the problem here. - -## Possible Solution -If you have suggestions on how to fix the bug, please describe them here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 9349662..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -name: Feature Request -about: Suggest an idea for this project -title: '[FEATURE] ' -labels: ['enhancement'] -assignees: '' ---- - -## Feature Summary -A clear and concise description of the feature you'd like to request. - -## Problem Statement -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 [...] - -## Proposed Solution -Describe the solution you'd like. -A clear and concise description of what you want to happen. - -## Use Case -Describe your use case for this feature. -- Who would benefit from this feature? -- What problem does it solve? -- How would you use it? - -## API Design (if applicable) -If you have ideas about how the API should look, include them here. - -```python -# Example of how you envision using this feature -client = WikiJSClient(...) -result = client.new_feature.do_something() -``` - -## Alternatives Considered -Describe alternatives you've considered. -A clear and concise description of any alternative solutions or features you've considered. - -## Implementation Notes -If you have ideas about implementation, include them here. -- Are there any technical challenges? -- Dependencies that might be needed? -- Breaking changes required? - -## Additional Context -Add any other context, screenshots, or examples about the feature request here. - -## Priority -How important is this feature to you? -- [ ] Nice to have -- [ ] Important for my use case -- [ ] Critical for my use case - -## Contribution -Are you willing to contribute to implementing this feature? -- [ ] Yes, I can implement this -- [ ] Yes, but I need guidance -- [ ] No, but I can help with testing -- [ ] No, I just want to request it \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 67c4a72..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,66 +0,0 @@ -# Pull Request - -## Description -Brief description of what this PR does and why. - -## Type of Change -Please delete options that are not relevant. - -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) -- [ ] Documentation update -- [ ] Performance improvement -- [ ] Code refactoring (no functional changes) -- [ ] Test improvements - -## Related Issues -Closes #(issue_number) -Relates to #(issue_number) - -## Changes Made -- -- -- - -## Testing -- [ ] Tests pass locally -- [ ] Added tests for new functionality -- [ ] Updated existing tests -- [ ] Manual testing completed - -Describe any testing you performed: - -## Documentation -- [ ] Updated docstrings -- [ ] Updated README if needed -- [ ] Updated API documentation -- [ ] Added/updated examples - -## Code Quality -- [ ] Code follows the style guidelines -- [ ] Self-review of the code completed -- [ ] Code is commented where necessary -- [ ] No new warnings introduced - -## Breaking Changes -If this introduces breaking changes, please describe them and provide migration guidance: - -## Screenshots/Examples -If applicable, add screenshots or code examples to help explain your changes. - -```python -# Example usage -``` - -## Additional Notes -Any additional information that reviewers should know. - ---- - -## Reviewer Checklist -- [ ] Code follows project style guidelines -- [ ] Changes are well documented -- [ ] Tests are adequate and pass -- [ ] No obvious bugs or performance issues -- [ ] Breaking changes are properly documented \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md index 9f47a85..c05003a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -34,7 +34,7 @@ **Name**: wikijs-python-sdk **Purpose**: Professional-grade Python SDK for Wiki.js API integration **Development Approach**: AI-powered, community-driven, open source -**Deployment Strategy**: GitHub-only installation (pip install git+https://github.com/...) +**Deployment Strategy**: Gitea-only installation (pip install git+https://gitea.hotserv.cloud/...) **Target**: Complete professional development lifecycle demonstration ### **Current Development State** @@ -50,23 +50,22 @@ Target_Date: "2 weeks from start" ``` wikijs-python-sdk/ # ✅ COMPLETE ├── README.md # ✅ COMPLETE - Central documentation hub -├── docs/wikijs_sdk_architecture.md # ✅ COMPLETE - Technical foundation -├── docs/wikijs_sdk_release_plan.md # ✅ COMPLETE - Release strategy -├── docs/RISK_MANAGEMENT.md # ✅ COMPLETE - Risk framework -├── docs/GOVERNANCE.md # ✅ COMPLETE - Community charter ├── CLAUDE.md # ✅ COMPLETE - This file -├── CONTRIBUTING.md # ✅ COMPLETE - Task 1.1 ├── LICENSE # ✅ COMPLETE - Task 1.1 ├── setup.py # ✅ COMPLETE - Task 1.1 ├── pyproject.toml # ✅ COMPLETE - Task 1.1 ├── requirements.txt # ✅ COMPLETE - Task 1.1 ├── requirements-dev.txt # ✅ COMPLETE - Task 1.1 ├── .gitignore # ✅ COMPLETE - Task 1.1 -├── CHANGELOG.md # ✅ COMPLETE - Task 1.1 -├── .github/ # ✅ COMPLETE - Task 1.1 -│ ├── workflows/ # CI/CD pipelines -│ ├── ISSUE_TEMPLATE/ # Bug & feature templates -│ └── PULL_REQUEST_TEMPLATE.md # PR template +├── .gitea/ # ✅ COMPLETE - Task 1.1 +│ └── workflows/ # CI/CD pipelines (Gitea Actions) +├── docs/ # ✅ COMPLETE - Task 1.6 +│ ├── wikijs_sdk_architecture.md # ✅ COMPLETE - Technical foundation +│ ├── wikijs_sdk_release_plan.md # ✅ COMPLETE - Release strategy +│ ├── RISK_MANAGEMENT.md # ✅ COMPLETE - Risk framework +│ ├── GOVERNANCE.md # ✅ COMPLETE - Community charter +│ ├── CONTRIBUTING.md # ✅ COMPLETE - Task 1.1 +│ └── CHANGELOG.md # ✅ COMPLETE - Task 1.1 ├── wikijs/ # ✅ COMPLETE - Task 1.2 │ ├── __init__.py # Core package initialization │ ├── version.py # Version management @@ -193,7 +192,7 @@ Subtasks: Description: "Create basic project file structure" Status: "PENDING" Files_To_Create: - - CONTRIBUTING.md + - docs/CONTRIBUTING.md - LICENSE (MIT) - .gitignore - setup.py @@ -214,18 +213,15 @@ Subtasks: Description: "Set up GitHub Actions workflows" Status: "PENDING" Files_To_Create: - - .github/workflows/test.yml - - .github/workflows/release.yml - - .github/ISSUE_TEMPLATE/bug_report.md - - .github/ISSUE_TEMPLATE/feature_request.md - - .github/PULL_REQUEST_TEMPLATE.md + - .gitea/workflows/test.yml + - .gitea/workflows/release.yml 1.1.4_Initial_Documentation: Description: "Create contributor-focused documentation" Status: "PENDING" Files_To_Create: - - CONTRIBUTING.md (detailed contribution guide) - - CHANGELOG.md (version history template) + - docs/CONTRIBUTING.md (detailed contribution guide) + - docs/CHANGELOG.md (version history template) ``` ### **Completion Criteria for Task 1.1** @@ -267,7 +263,7 @@ Files_To_Update: ```yaml Files_To_Update: - README.md: Update feature list and status badges - - CHANGELOG.md: Create v0.1.0 release notes + - docs/CHANGELOG.md: Create v0.1.0 release notes - DEVELOPMENT_PLAN.md: Mark Phase 1 complete - ARCHITECTURE.md: Update implementation status ``` @@ -409,7 +405,7 @@ Security: 1. **Create Repository Structure** (setup.py, requirements.txt, .gitignore) 2. **Configure Python Packaging** (pyproject.toml, dependencies) 3. **Set Up CI/CD Pipeline** (GitHub Actions workflows) -4. **Create Contributing Guidelines** (CONTRIBUTING.md) +4. **Create Contributing Guidelines** (docs/CONTRIBUTING.md) ### **Task Dependencies** ```yaml @@ -510,13 +506,13 @@ This document evolves based on development experience: ## 🚀 READY FOR DEVELOPMENT -**CURRENT INSTRUCTION**: Phase 1 Complete - GitHub-Only Deployment Ready +**CURRENT INSTRUCTION**: Phase 1 Complete - Gitea-Only Deployment Ready **FOCUS**: Project is ready for GitHub-only installation and usage -**SUCCESS CRITERIA**: Users can install via `pip install git+https://github.com/...` +**SUCCESS CRITERIA**: Users can install via `pip install git+https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python.git` -**DEPLOYMENT STRATEGY**: GitHub-only (no PyPI publishing required) +**DEPLOYMENT STRATEGY**: Gitea-only (no PyPI publishing required) **REMEMBER**: Always refer to documentation, update progress, and maintain quality standards! diff --git a/README.md b/README.md index 6c4c438..01d32ac 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Python Support](https://img.shields.io/badge/python-3.8+-blue.svg)](https://python.org) -[![CI Status](https://github.com/yourusername/wikijs-python-sdk/workflows/Test%20Suite/badge.svg)](https://github.com/yourusername/wikijs-python-sdk/actions) -[![Coverage](https://codecov.io/gh/yourusername/wikijs-python-sdk/branch/main/graph/badge.svg)](https://codecov.io/gh/yourusername/wikijs-python-sdk) +[![Repository](https://img.shields.io/badge/repo-Gitea-green.svg)](https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python) +[![Issues](https://img.shields.io/badge/issues-Gitea-blue.svg)](https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python/issues) **A professional Python SDK for Wiki.js API integration.** @@ -17,11 +17,11 @@ ### Installation ```bash -# Install directly from GitHub -pip install git+https://github.com/yourusername/wikijs-python-sdk.git +# Install directly from Gitea +pip install git+https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python.git # Or clone and install locally -git clone https://github.com/yourusername/wikijs-python-sdk.git +git clone https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python.git cd wikijs-python-sdk pip install -e . ``` @@ -117,8 +117,8 @@ We welcome contributions! This project showcases systematic development with pro ### Local Development ```bash -# Clone and setup (when repository is published) -git clone https://github.com/yourusername/wikijs-python-sdk +# Clone and setup +git clone https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python.git cd wikijs-python-sdk pip install -e ".[dev]" diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index bd9ea16..d24e685 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -21,8 +21,8 @@ This project was developed by leomiranda, showcasing professional development pr 1. **Fork the Repository** ```bash - # Fork on GitHub, then clone your fork - git clone https://github.com/yourusername/wikijs-python-sdk.git + # Fork on Gitea, then clone your fork + git clone https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python.git cd wikijs-python-sdk ``` @@ -55,7 +55,7 @@ This project was developed by leomiranda, showcasing professional development pr 1. **Check Current Priorities** - Review [CLAUDE.md](CLAUDE.md) for current development tasks - See [Development Plan](docs/wikijs_sdk_release_plan.md) for roadmap - - Look for issues labeled `good first issue` + - Look for issues in the Gitea repository 2. **Understand Architecture** - Read [Architecture Overview](docs/wikijs_sdk_architecture.md) @@ -275,7 +275,7 @@ def test_specific_behavior_with_expected_outcome(): Releases are managed by maintainers: 1. **Version Bump**: Update version in `wikijs/version.py` -2. **Changelog**: Update `CHANGELOG.md` with changes +2. **Changelog**: Update `docs/CHANGELOG.md` with changes 3. **Tag Release**: Create git tag `v0.1.0` 4. **Automated**: GitHub Actions handles testing and GitHub release creation @@ -336,7 +336,7 @@ Significant contributors may be invited to become maintainers. 1. Read our [Governance](docs/GOVERNANCE.md) guidelines 2. Check the [current development status](CLAUDE.md) -3. Look for [good first issues](https://github.com/yourusername/wikijs-python-sdk/labels/good%20first%20issue) +3. Look for issues in the [repository](https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python/issues) 4. Join the discussion! -**Questions?** Don't hesitate to ask in [GitHub Discussions](https://github.com/yourusername/wikijs-python-sdk/discussions) or create an issue. \ No newline at end of file +**Questions?** Don't hesitate to create an issue in the [Gitea repository](https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python/issues). \ No newline at end of file diff --git a/docs/GOVERNANCE.md b/docs/GOVERNANCE.md index 6b5817f..bf11632 100644 --- a/docs/GOVERNANCE.md +++ b/docs/GOVERNANCE.md @@ -112,18 +112,16 @@ Create a high-quality Python SDK for Wiki.js that serves developers' needs while - **Level 3**: Temporary restriction from participation - **Level 4**: Permanent ban (only for severe violations) -Report issues to: [Maintainer Contact] - all reports handled confidentially. +Report issues to: lmiranda@hotserv.cloud - all reports handled confidentially. --- ## 📞 Communication Channels -### **GitHub Issues** +### **Gitea Issues** - Bug reports and feature requests - Project planning and roadmap discussions - Technical questions about implementation - -### **GitHub Discussions** *(Coming Soon)* - General help and usage questions - Community showcase and success stories - Brainstorming new ideas and improvements @@ -131,7 +129,7 @@ Report issues to: [Maintainer Contact] - all reports handled confidentially. ### **Response Expectations** - **Issues**: Response within 48-72 hours - **Pull Requests**: Initial review within 1 week -- **Discussions**: Community-driven with maintainer backup +- **Repository discussions**: Community-driven with maintainer backup --- @@ -178,7 +176,7 @@ This lightweight governance will evolve as the community grows: - **[Development Plan](wikijs_sdk_release_plan.md)**: Current roadmap and priorities - **[Architecture](wikijs_sdk_architecture.md)**: Technical design overview - **[CLAUDE.md](../CLAUDE.md)**: Development workflow and coordination -- **[Contributing Guide](../CONTRIBUTING.md)**: Detailed contribution process *(Coming Soon)* +- **[Contributing Guide](CONTRIBUTING.md)**: Detailed contribution process --- diff --git a/docs/development.md b/docs/development.md index 401d805..9bbd589 100644 --- a/docs/development.md +++ b/docs/development.md @@ -104,7 +104,7 @@ wikijs-python-sdk/ │ ├── development.md # This file │ └── ... ├── examples/ # Usage examples -├── .github/ # GitHub workflows +├── .gitea/ # Gitea workflows │ └── workflows/ # CI/CD pipelines ├── pyproject.toml # Project configuration ├── setup.py # Package setup @@ -537,7 +537,7 @@ We use [Semantic Versioning](https://semver.org/): ### Release Steps 1. **Update version number** in `wikijs/version.py` -2. **Update CHANGELOG.md** with new version details +2. **Update docs/CHANGELOG.md** with new version details 3. **Run full test suite** and ensure all checks pass 4. **Create release commit**: ```bash @@ -560,7 +560,7 @@ We use [Semantic Versioning](https://semver.org/): - [ ] All tests pass - [ ] Code coverage meets requirements (>85%) - [ ] Documentation is updated -- [ ] CHANGELOG.md is updated +- [ ] docs/CHANGELOG.md is updated - [ ] Version number is bumped - [ ] No breaking changes without major version bump - [ ] Examples work with new version diff --git a/docs/wikijs_sdk_release_plan.md b/docs/wikijs_sdk_release_plan.md index efa9849..049dc74 100644 --- a/docs/wikijs_sdk_release_plan.md +++ b/docs/wikijs_sdk_release_plan.md @@ -1,7 +1,7 @@ # Wiki.js Python SDK - Release Plan **Project Name:** `wikijs-python-sdk` -**Repository:** `https://github.com/yourusername/wikijs-python-sdk` +**Repository:** `https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python` **License:** MIT **Target Audience:** Python developers, DevOps engineers, Data scientists @@ -66,7 +66,7 @@ gantt - **Documentation**: API documentation and usage examples ### Success Criteria -- [ ] Package installable via `pip install wikijs-python-sdk` +- [ ] Package installable via `pip install git+https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python.git` - [ ] Basic page operations work with real Wiki.js instance - [ ] >85% test coverage with passing CI/CD - [ ] Complete API documentation @@ -148,7 +148,7 @@ gantt 3. **Performance Benchmarking**: Regression testing 4. **Documentation Update**: Synchronized with code changes 5. **PyPI Publishing**: Automated package distribution -6. **GitHub Release**: Tagged release with changelog +6. **Gitea Release**: Tagged release with changelog ### Version Management - **Semantic Versioning**: MAJOR.MINOR.PATCH @@ -172,7 +172,7 @@ gantt ### Community Building - **Documentation First**: Comprehensive guides and examples -- **Issue Templates**: Structured bug reports and feature requests +- **Issue Templates**: Structured bug reports and feature requests in Gitea - **Contributing Guidelines**: Clear onboarding for new contributors - **Code of Conduct**: Inclusive community standards @@ -188,7 +188,7 @@ gantt ### Key Metrics - **PyPI Downloads**: Measure adoption growth -- **GitHub Engagement**: Stars, forks, issues, PRs +- **Gitea Engagement**: Stars, forks, issues, PRs - **Test Coverage**: Maintain >90% throughout development - **Performance**: Response time and throughput benchmarks - **Community**: Contributors, issue resolution time diff --git a/pyproject.toml b/pyproject.toml index 0090747..4d5c05b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "wikijs-python-sdk" description = "A professional Python SDK for Wiki.js API integration" -authors = [{name = "Wiki.js SDK Contributors", email = "contact@wikijs-sdk.dev"}] +authors = [{name = "leomiranda", email = "lmiranda@hotserv.cloud"}] license = {text = "MIT"} readme = "README.md" requires-python = ">=3.8" @@ -60,10 +60,10 @@ all = [ ] [project.urls] -Homepage = "https://github.com/yourusername/wikijs-python-sdk" -"Bug Reports" = "https://github.com/yourusername/wikijs-python-sdk/issues" -Source = "https://github.com/yourusername/wikijs-python-sdk" -Documentation = "https://github.com/yourusername/wikijs-python-sdk/docs" +Homepage = "https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python" +"Bug Reports" = "https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python/issues" +Source = "https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python" +Documentation = "https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python/src/branch/main/docs" [tool.setuptools.dynamic] version = {attr = "wikijs.version.__version__"} diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..9c6b643 --- /dev/null +++ b/setup.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python3 +"""Setup script for Wiki.js Python SDK.""" + +from setuptools import setup, find_packages +import os + + +def read_version(): + """Read version from wikijs/version.py.""" + version_file = os.path.join("wikijs", "version.py") + with open(version_file, "r", encoding="utf-8") as f: + for line in f: + if line.startswith("__version__"): + return line.split("=")[1].strip().strip('"').strip("'") + raise RuntimeError("Unable to find version string.") + + +def read_readme(): + """Read README.md for long description.""" + with open("README.md", "r", encoding="utf-8") as f: + return f.read() + + +def read_requirements(): + """Read requirements.txt for dependencies.""" + with open("requirements.txt", "r", encoding="utf-8") as f: + return [line.strip() for line in f if line.strip() and not line.startswith("#")] + + +def read_dev_requirements(): + """Read requirements-dev.txt for development dependencies.""" + try: + with open("requirements-dev.txt", "r", encoding="utf-8") as f: + deps = [] + for line in f: + line = line.strip() + if line and not line.startswith("#") and not line.startswith("-r"): + deps.append(line) + return deps + except FileNotFoundError: + return [] + + +setup( + name="wikijs-python-sdk", + version=read_version(), + description="A professional Python SDK for Wiki.js API integration", + long_description=read_readme(), + long_description_content_type="text/markdown", + author="leomiranda", + author_email="lmiranda@hotserv.cloud", + url="https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python", + project_urls={ + "Bug Reports": "https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python/issues", + "Source": "https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python", + "Documentation": "https://gitea.hotserv.cloud/lmiranda/wikijs-sdk-python/src/branch/main/docs", + }, + packages=find_packages(), + include_package_data=True, + package_data={ + "wikijs": ["py.typed"], + }, + install_requires=read_requirements(), + extras_require={ + "dev": read_dev_requirements(), + "async": ["aiohttp>=3.8.0"], + "cli": ["click>=8.0.0", "rich>=12.0.0"], + "all": ["aiohttp>=3.8.0", "click>=8.0.0", "rich>=12.0.0"], + }, + python_requires=">=3.8", + classifiers=[ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Documentation", + "Typing :: Typed", + ], + keywords=["wiki", "wikijs", "api", "sdk", "client", "http", "rest"], + zip_safe=False, +) \ No newline at end of file