Ambient package update tool for clean and swift maintenance
Project description
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 release
- 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]
Installation
- Ensure you have installed Python >=3.11 and the binary is in your system path
- Clone this package from GitHub
- Navigate into the project directory
- Execute scripts/setup_venv.ps1 on Windows or scripts/setup_venv_unix.sh on Unix/macOS
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 this package
- Activate your virtualenv
- Run
python .\main.py render-templates [PACKAGE_NAME]
- Open your target package in the IDE, 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"),
],
)
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ambient-package-update-23.5.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5e57c48be6d488a76aadf83ae999d8f4c55601d6b6ff14cc6f65fabdfd6b812 |
|
MD5 | 9470d6a24d66e1adaf99c6769ffa8dba |
|
BLAKE2b-256 | 54f8f4b1eb44c8d952aaad498537ceaef44db49cb683feb484baf612a54c0926 |
Hashes for ambient_package_update-23.5.9-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cad3f4916e2f9ab883d7244ed2a9d09c74da3cae78415c977293f58cc382fde |
|
MD5 | b8a8e199429aa0954fa7e847f589396e |
|
BLAKE2b-256 | 6af00ef10125e9044da28060b93477150e906a021a3def0ee65f28c98875fc7f |