-
Notifications
You must be signed in to change notification settings - Fork 0
Publish package to PyPI #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
19fb141
add test release workflow
copelco 3372c79
test steps in draft PR
copelco 74354ec
Apply suggestions from code review
copelco 4e59540
Update pyproject.toml
copelco 9fdee90
revert to support python3.9 for django-simple-deploy
copelco 013817a
remove dockerfile_example
copelco da96abc
add 0.1.0 to changelog
copelco a674afa
add release docs
copelco 51f8df2
update pip install command in README
copelco 2ad1d4e
set requires-python = ">=3.10"
copelco 285723f
enable uv publish
copelco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: "publish" | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| # Publish on any tag starting with a `v`, e.g., v0.1.0 | ||
| - v* | ||
|
|
||
| jobs: | ||
| run: | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: pypi | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v7 | ||
| - name: Install Python 3.13 | ||
| run: uv python install 3.13 | ||
| - name: Build | ||
| run: uv build | ||
| # Check that basic features work and we didn't miss to include crucial files | ||
| - name: Smoke test (wheel) | ||
| run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py | ||
| - name: Smoke test (source distribution) | ||
| run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py | ||
| - name: Publish | ||
| run: uv publish |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,7 @@ | ||
| Changelog: dsd-<platformname> | ||
| === | ||
| # Changelog: dsd-pythonanywhere | ||
|
|
||
| 0.1 - Provisional support for deployments | ||
| --- | ||
| ## 0.1 - Provisional support for deployments | ||
|
|
||
| ### 0.1.0 | ||
|
|
||
| #### External changes | ||
|
|
||
| - | ||
|
|
||
| #### Internal changes | ||
|
|
||
| - | ||
| - Initial testing release |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,8 @@ | ||
| try: | ||
| from importlib.metadata import version | ||
|
|
||
| __version__ = version("dsd-pythonanywhere") | ||
| except Exception: | ||
| __version__ = "unknown" | ||
|
|
||
| from .deploy import dsd_deploy, dsd_get_plugin_config # noqa: F401 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,70 +1,83 @@ | ||
| [build-system] | ||
| requires = ["setuptools"] | ||
| build-backend = "setuptools.build_meta" | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [project] | ||
| name = "dsd-pythonanywhere" | ||
| version = "0.1.0" | ||
| description = "A plugin for django-simple-deploy, supporting deployments to PythonAnywhere." | ||
| readme = "README.md" | ||
| requires-python = ">=3.10" | ||
| license = "BSD-3-Clause" | ||
| license-files = ["LICEN[CS]E.*"] | ||
|
|
||
| authors = [ | ||
| {name = "Caktus Consulting Group", email = "[email protected]" }, | ||
| ] | ||
|
|
||
| classifiers = [ | ||
| "Development Status :: 4 - Beta", | ||
| "Framework :: Django", | ||
| "Framework :: Django :: 4.2", | ||
| "Framework :: Django :: 5.0", | ||
| "Framework :: Django :: 5.1", | ||
| "Framework :: Django :: 5.2", | ||
| "Framework :: Django :: 6.0", | ||
| "Intended Audience :: Developers", | ||
| "License :: OSI Approved :: BSD License", | ||
| "Operating System :: OS Independent", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3 :: Only", | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Programming Language :: Python :: 3.13", | ||
| "Programming Language :: Python :: 3.13", | ||
| "Programming Language :: Python :: 3.14", | ||
| "Topic :: Software Development :: Build Tools", | ||
| "Topic :: System :: Software Distribution", | ||
| ] | ||
|
|
||
| keywords = ["django", "deployment"] | ||
|
|
||
| requires-python = ">=3.9" | ||
| keywords = ["django", "deployment", "pythonanywhere", "simple-deploy"] | ||
|
|
||
| dependencies = [ | ||
| "django>=4.2", | ||
| "pluggy>=1.5.0", | ||
| "toml>=0.10.2", | ||
| "requests>=2.32.2", | ||
| "django-simple-deploy>=0.9.0", | ||
| "pythonanywhere>=0.15.5", | ||
| "pythonanywhere-core>=0.2.4", | ||
| "requests>=2.32.2", | ||
| "pluggy>=1.5.0", | ||
| "tomli>=2.0.1; python_version < '3.11'", | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| dev = [ | ||
| "build>=1.2.1", | ||
| "pytest>=8.3.0", | ||
| "pytest-mock>=3.15.1", | ||
| "twine>=5.1.1", | ||
| ] | ||
| [project.urls] | ||
| Homepage = "https://github.com/caktus/dsd-pythonanywhere" | ||
| Source = "https://github.com/caktus/dsd-pythonanywhere" | ||
| Tracker = "https://github.com/caktus/dsd-pythonanywhere/issues" | ||
|
|
||
| # [project.urls] | ||
| # "Documentation" = "<documentation URL>" | ||
| # "GitHub" = "<GH repo URL>" | ||
| # "Changelog" = "<changelog URL" | ||
| # --- HATCHLING SPECIFIC CONFIGURATION --- | ||
|
|
||
| [tool.setuptools] | ||
| packages = [ | ||
| # BUILD TARGETS | ||
| # This replaces MANIFEST.in. | ||
| # Hatchling includes everything in git by default, but we can be explicit. | ||
| [tool.hatch.build.targets.sdist] | ||
| include = [ | ||
| "dsd_pythonanywhere", | ||
| "dsd_pythonanywhere.templates", | ||
| "LICENSE", | ||
| "README.md", | ||
| ] | ||
| include-package-data = true | ||
|
|
||
| [tool.hatch.build.targets.wheel] | ||
| packages = ["dsd_pythonanywhere"] | ||
|
|
||
| # --- TOOL CONFIGURATION --- | ||
|
|
||
| [tool.ruff] | ||
| line-length = 100 | ||
| exclude = ["dsd_pythonanywhere/templates/settings.py"] | ||
| exclude = [ | ||
| "dsd_pythonanywhere/templates/settings.py", | ||
| "build", | ||
| "dist", | ||
| ] | ||
|
|
||
| [dependency-groups] | ||
| dev = [ | ||
|
|
@@ -76,4 +89,5 @@ dev = [ | |
| ] | ||
|
|
||
| [tool.pytest.ini_options] | ||
| testpaths = [ "tests/unit_tests" ] | ||
| testpaths = ["tests/unit_tests"] | ||
| addopts = "--verbose" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| """Basic smoke test to verify package installation.""" | ||
|
|
||
| import sys | ||
| from pathlib import Path | ||
|
|
||
| # Verify package can be imported | ||
| import dsd_pythonanywhere | ||
|
|
||
| # Verify version is set | ||
| assert hasattr(dsd_pythonanywhere, "__version__"), "Missing __version__ attribute" | ||
| print(f"✓ Package version: {dsd_pythonanywhere.__version__}") | ||
|
|
||
| # Verify main exports exist | ||
| assert hasattr(dsd_pythonanywhere, "dsd_deploy"), "Missing dsd_deploy export" | ||
| assert hasattr(dsd_pythonanywhere, "dsd_get_plugin_config"), "Missing dsd_get_plugin_config export" | ||
| print("✓ Main exports found") | ||
|
|
||
| # Verify templates directory is included | ||
| package_path = Path(dsd_pythonanywhere.__file__).parent | ||
| templates_dir = package_path / "templates" | ||
| assert templates_dir.exists(), f"Templates directory not found at {templates_dir}" | ||
| assert templates_dir.is_dir(), f"Templates path exists but is not a directory: {templates_dir}" | ||
| print(f"✓ Templates directory found: {templates_dir}") | ||
|
|
||
| # Verify template files exist | ||
| expected_templates = ["settings.py", "wsgi.py"] | ||
| for template in expected_templates: | ||
| template_path = templates_dir / template | ||
| assert template_path.exists(), f"Missing template file: {template}" | ||
| print(f" ✓ Found: {template}") | ||
|
|
||
| print("\n✅ All smoke tests passed!") | ||
| sys.exit(0) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.