Skip to main content

An Execution Framework for pyPhase projects

Project description

phases

CLI for pyPhases — scaffold projects with phases create and run pipelines with phases run.

Documentation

Install

pip install phases

Quick start

phases create -o my-project   # interactive wizard
phases run TrainModel         # run a phase

Setup

pip install phases

create project.yaml

minimal

name: myProject
namespace: myGroup
phases:
    - name: Phase1
      description: my first phase
      exports: [myData]
    - name: Phase2
      description: my second phase

run with python myProject

complete

name: "sleepClassificationCNN"
namespace: tud.ibmt
exporter:
    - ObjectExporter
    - KerasExporter
phases:
    prepareData:
        - name: DataWrapper
          description: get EDF Data
          exports:
            - trainingRaw
            - validationRaw
            - evaluationRaw
        - name: EDF4SleepStages
          description: Prepare EDF Data for sleep stage recognition
          exports:
            - trainingTransformed
            - validationTransformed
    train:
        - name: SleepPhaseDetectionModel
          description: Create Model for sleep stage recognition
          exports:
            - model
    evaluate:
        - name: SleepPhaseDetectionModel
          description: Create Model for sleep stage recognition

Generate

phases create

Development

The generator will create stubs for each phase, exporter and generator that does not exists in the pyPhase-Package. The stubs are in the project folder and implement empty method that are required.

To implement your project, you only need to fill those methods. For the minimal example you need to fill the main-methods of Phase1 (myProject/phases/Phase1.py) and Phase2.

Execute

If you want to run the whole Project run: python [ProjectName] for the minimal example: python myProject

To run a single stage: python [ProjectName] [StageName] for the minimal example: python myProject stage2

additional files

  • doc/ placeholder for documentation

  • .editorconfig some settings for supporting IDE about File encoding and formats (see https://editorconfig.org/)

  • .gitignore some folders and files that should be ignored by git (see https://git-scm.com/docs/gitignore)

  • requirements.txt the python requirements (just pyPhases in an empty project)

  • README.md an Readme file

  • Dockerfile a simple dockerfile that can be used to run the project in a container (The FROM image should properly changed)

  • docker-compose.yml this is a helper to create and run the container. simply run docker-compose up or docker compose run --rm [projectname] [stagename]

  • .gitlab-ci.yml a Configuration for the Gitlab-CI Pipeline, that will be automaticly run if there is a push to gitlab

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

phases-0.7.1.tar.gz (36.4 kB view details)

Uploaded Source

File details

Details for the file phases-0.7.1.tar.gz.

File metadata

  • Download URL: phases-0.7.1.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for phases-0.7.1.tar.gz
Algorithm Hash digest
SHA256 69a038882f346001bd9fc6c15494c602889683bae82adc0fc831a32a85af37af
MD5 764b4023d79d2010a186d665a9afcb42
BLAKE2b-256 5bf5f9e909d13a280a849025f16fdc5cb55f2ea69ab8a23d5f7926c1599b0f9b

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