Skip to main content

Prefect Collection Template contains all the boilerplate that you need to create a Prefect collection.

Project description

prefect-collection

Welcome to your new Prefect collection! Feel free to modify this README to fit the needs of your collection!

Getting Started

Python setup

Requires an installation of Python 3.7+

We recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.

Verify collection bootstrap

To ensure that your collection bootstrap was successful you can perform the following steps:

  1. Create an editable install of your project
    pip install -e ".[dev]
    
  2. Run the tests for the example tasks and flow in the bootstrapped collection
    pytest tests
    
  3. Serve the bootstrapped example docs with mkdocs
    mkdocs serve
    

You are now ready to start creating your Prefect collection!

Developing tasks and flows

For information about the use and development of tasks and flow, check out the flows and tasks concepts docs in the Prefect docs.

Writing documentation

This collection has been setup to with mkdocs for automatically generated documentation. The signatures and docstrings of your tasks and flow will be used to generate documentation for the users of this collection. You can make changes to the structure of the generated documentation by editing the mkdocs.yml file in this project.

Development lifecycle

CI Pipeline

This collection comes with GitHub Actions for testing and linting. To add additional actions, you can add jobs in the .github/workflows folder. On PR, the pipeline will run linting via black and flake8 and unit tests via pytest.

Package and Publish

GitHub actions will also handle packaging and publishing of your collection to PyPI so other Prefect users can your collection in their flows.

In order to publish to PyPI, you'll need a PyPI account and generate an API token to authenticate with PyPI when publishing new versions of your collection. The PyPI documentation outlines the steps needed to get an API token.

Once you've obtained a PyPI API token, create a GitHub secret named PYPI_API_TOKEN.

There is also a GitHub Action that performs a test publish to test PyPI to allow for a test deployment without affecting PyPI. You will need a separate token for test PyPI which can be saved in a GitHub secret names TEST_PYPI_API_TOKEN

Further guidance

If you run into any issues during the bootstrapping process, feel free to open an issue in the prefect-collection-template repository.

If you have any questions or issues while developing your collection, you can find help in either the Prefect Discourse forum or the Prefect Slack community

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

prefect-collection-0.2.1.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prefect_collection-0.2.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file prefect-collection-0.2.1.tar.gz.

File metadata

  • Download URL: prefect-collection-0.2.1.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for prefect-collection-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e7aac0de5f874c265dd3a9029f754806b6337df1a4d40bcd63e07b4b4d881cf2
MD5 f10d11181efa63f3d450fc79cdf4e6dc
BLAKE2b-256 6774a3d1f59995b370e9364866f3985a52cc5311a275b780187b252740ac4a97

See more details on using hashes here.

File details

Details for the file prefect_collection-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: prefect_collection-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for prefect_collection-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 06becb4510651f27520181c2ff91a0975d507e0957ff8aed41e7e6733da4fa00
MD5 0939b8bc78205132389484a1114f3286
BLAKE2b-256 3e9a92a69530c45ef60806b4a4b6dd5d10ebcff120368c96c5a3e8283bd46e80

See more details on using hashes here.

Supported by

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