Skip to main content

Ambient package update tool for clean and swift maintenance

Project description

pypi Downloads

Ambient Package Update

This repository will help keep all Python packages maintained by Ambient Digital tidy and up-to-date.

This package will render all required configuration and installation files for your target package.

Typical use-cases:

  • A new Python or Django version was released
  • A Python or Django version was deprecated
  • You want to update the Sphinx documentation builder
  • You want to update the linter versions
  • You want to add the third-party dependencies

Versioning

This project follows the CalVer versioning pattern: YY.MM.[RELEASE]

How to update a package

These steps will tell you how to update a package which was created by using this updater.

  • Navigate to the main directory of your package
  • Activate your virtualenv
  • Run python -m ambient_package_update.cli render-templates
  • Validate the changes and increment the version accordingly
  • Release a new version of your target package

How to create a new package

Just follow these steps if you want to create a new package and maintain it using this updater.

  • Create a new repo at GitHub
  • Check out the new repository in the same directory this updater lives in (not inside the updater!)
  • Create a directory ".ambient-package-update" and create a file "metadata.py" inside.
from ambient_package_update.metadata.author import PackageAuthor
from ambient_package_update.metadata.constants import DEV_DEPENDENCIES
from ambient_package_update.metadata.package import PackageMetadata
from ambient_package_update.metadata.readme import ReadmeContent
from ambient_package_update.metadata.ruff_ignored_inspection import RuffIgnoredInspection

METADATA = PackageMetadata(
    package_name='my_package_name',
    authors=[
        PackageAuthor(
            name='Ambient Digital',
            email='hello@ambient.digital',
        ),
    ],
    development_status='5 - Production/Stable',
    readme_content=ReadmeContent(
        tagline='A fancy tagline for your new package',
        content="""A multiline string containing specific things you want to have in your package readme.
""",
    ),
    dependencies=[
        'my_dependency>=1.0',
    ],
    optional_dependencies={
        'dev': [
            *DEV_DEPENDENCIES,
        ],
        # you might add further extras here
    },
    ruff_ignore_list=[
        RuffIgnoredInspection(key='XYZ', comment="Reason why we need this exception"),

    ],
)
  • Install the ambient_package_update package
    # ideally in a virtual environment
    pip install ambient-package-update
    
  • Finally, follow the steps of the section above (How to update a package).

Contribution

Publish to PyPi

  • Update documentation about new/changed functionality

  • Update the Changelog

  • Increment version in main __init__.py

  • Increment version of this package in dependencies in ambient_package_update/metadata/constants.py

  • Create pull request / merge to master

  • This project uses the flit package to publish to PyPI. Thus publishing should be as easy as running:

    flit publish
    

    To publish to TestPyPI use the following ensure that you have set up your .pypirc as shown here and use the following command:

    flit publish --repository testpypi
    

Changelog

Can be found at GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ambient-package-update-23.5.11.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

ambient_package_update-23.5.11-py2.py3-none-any.whl (18.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ambient-package-update-23.5.11.tar.gz.

File metadata

File hashes

Hashes for ambient-package-update-23.5.11.tar.gz
Algorithm Hash digest
SHA256 f42e22385015524e999032c3d6edd9dab88d9ded4518a77bd117a4d87df64d53
MD5 747cce5fd91b82e6df7e5888788c354f
BLAKE2b-256 825399bcd2a8944d15175ea5f66c3e48905bca596286c89f79adfca64008ee0e

See more details on using hashes here.

File details

Details for the file ambient_package_update-23.5.11-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ambient_package_update-23.5.11-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e016007fa3c9edbf0b070eaacaebf91ad2f1d36da99e74270c3f9a4a5b5f22a6
MD5 beae4c1c41aac655316883dc4a1ebe80
BLAKE2b-256 774912ff27858af100e597c3bfb12d9b6200e71529bb766bba34f5eeea9124f8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page