Skip to content

feat: prepare PyMapGIS for PyPI publication#10

Merged
nicholaskarlson merged 6 commits intomainfrom
dev
Jun 7, 2025
Merged

feat: prepare PyMapGIS for PyPI publication#10
nicholaskarlson merged 6 commits intomainfrom
dev

Conversation

@nicholaskarlson
Copy link
Member

This PR prepares PyMapGIS for publication on PyPI with comprehensive documentation, proper project structure, and community guidelines.

Changes Made

Repository Structure

  • Clean up unnecessary branches (feat/cache, feat/read-mvp)
  • Remove cache files and temporary test files
  • Update .gitignore with comprehensive Python exclusions

Documentation

  • Complete README.md with project description, features, and examples
  • Add CONTRIBUTING.md with development guidelines
  • Add CHANGELOG.md for version tracking
  • Complete MIT license text

PyPI Preparation

  • Update pyproject.toml with proper metadata and classifiers
  • Add homepage, repository, and documentation URLs
  • Set appropriate keywords and classifiers

GitHub Repository Polish

  • Add issue templates for bug reports and feature requests
  • Add pull request template
  • Maintain existing CI/CD workflows

Ready for PyPI

This PR makes PyMapGIS ready for publication on PyPI.org, enabling other developers to:

  • Install with pip install pymapgis
  • Discover the project through PyPI search
  • Contribute following clear guidelines
  • Report issues using structured templates

Testing

  • All existing tests pass
  • Code quality checks pass (ruff, black)
  • No breaking changes to existing functionality

- Add comprehensive caching system with TTL support
- Add housing cost burden and labor force gap examples
- Update dependencies and configuration
- Add GitHub Actions workflow for examples
- Fix linting issues in example code
- Update README with comprehensive project description
- Add CONTRIBUTING.md with development guidelines
- Add CHANGELOG.md for version tracking
- Update pyproject.toml with PyPI metadata and classifiers
- Complete MIT license text
- Add GitHub issue and PR templates
- Update .gitignore with comprehensive Python exclusions
- Remove cache files and temporary test files
Comment on lines +10 to +17
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: pip install -r labor_force_gap/after/requirements.txt
- run: python labor_force_gap/after/app.py --headless || true

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 10 months ago

To fix the issue, we need to add a permissions block to the workflow. Since the workflow performs basic CI tasks, the minimal required permission is contents: read. This ensures that the GITHUB_TOKEN has only read access to the repository contents, adhering to the principle of least privilege.

The permissions block should be added at the root level of the workflow, so it applies to all jobs. Alternatively, it can be added to the specific job (run-demo) if different jobs require different permissions.

Suggested changeset 1
.github/workflows/examples.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml
--- a/.github/workflows/examples.yml
+++ b/.github/workflows/examples.yml
@@ -1,2 +1,4 @@
 name: Examples smoke-test
+permissions:
+  contents: read
 on:
EOF
@@ -1,2 +1,4 @@
name: Examples smoke-test
permissions:
contents: read
on:
Copilot is powered by AI and may make mistakes. Always verify output.
- Add publish.yml workflow for automated PyPI publishing
- Enhance CI workflow with multi-Python version testing
- Add linting job to CI pipeline
- Support both PyPI and TestPyPI publishing
- Include Sigstore signing for security
@nicholaskarlson nicholaskarlson merged commit 1356355 into main Jun 7, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant