Skip to content

[wip] Admin portal as gwp library#750

Open
mrchrisadams wants to merge 4 commits into
masterfrom
ca-admin-portal-as-gwp-library
Open

[wip] Admin portal as gwp library#750
mrchrisadams wants to merge 4 commits into
masterfrom
ca-admin-portal-as-gwp-library

Conversation

@mrchrisadams

@mrchrisadams mrchrisadams commented May 30, 2026

Copy link
Copy Markdown
Member

This PR is an experiment in making the admin portal a python library so it can easily be imported into external python scripts, or making using easier in notebooks.

it's not ready for merging in

This is intended to make it easy to import this project in external python scripts
This commit restructures the project to use the standard Python src/ layout
for packaging, making it installable as a library via pip/uv while preserving
development workflows.

Changes:
- Move apps/ and greenweb/ into src/
- Update pyproject.toml with hatchling build system
- Update manage.py to add src/ to sys.path
- Update conftest.py to add src/ to sys.path
- Update Dockerfile PYTHONPATH and static paths
- Update justfile and ansible deploy paths
- Update greenweb/settings/common.py ROOT calculation
- Remove old gwp/ namespace package attempt
- Keep all import paths unchanged (apps.accounts, greenweb.settings)

Verified:
- pytest apps/accounts/tests: 196 passed, 5 skipped
- pytest apps/greencheck/tests: 174 passed, 1 skipped
- Library import from wheel: Hostingprovider.objects.all().count() == 1336
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