Skip to main content

Build package from python tests.

Project description

DevOps Homework

Welcome to the Postscript DevOps take home task! This task should take you an hour or less to complete. You will be working with a simplified service with a minimal feature set.

Background

At Postscript, we run a link shortening microservice that converts long URLs into short URLs (like an in-house Bitly). To shorten links, we take the numeric identifier of the link and encode it using the Base62 encoding scheme.

This microservice is a simplified version of the encoding and decoding logic our link shortener uses. The service exposes two endpoints, encode and decode, as part of its API that another service could use to implement the link shortening logic.

Requirements

As the next step to get this microservice into production, you are working on implementing a CI/CD pipeline to test and "deploy" the service as a Docker container. Your goal is to accomplish the following with your pipeline:

  1. Test the application code on each commit and pull request using Github Actions
  • Tests are written in test_app.py and run with Pytest
  1. Implement the decode function in app.py.
  • There are tests in test_app.py that can help you validate your solution.
  • Feel free to add additional tests as well.
  1. Build a container image that runs the application as part of the CI pipeline.
  • A Dockerfile is included to use as a starting point or inspiration.
  • The container should run without errors and work as reasonably expected.
  1. Publish the container image to a container registry.
  • Any container registry (Github Packages, ECR, Dockerhub, etc.) is OK.
  • If you cannot integrate with a live container registry due to cost, authentication, or other constraints, that's OK- comment out the uploading step of your pipeline and explain how it works instead.

You can change any of the code in the application, the tests, or the Dockerfile at your discretion. You can use any tools or resources you'd like to help you accomplish this task.

At the end of the task, please summarize your experience in summary.md. Outline the steps you took and how you solved problems as they came up.

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

my-pipeline-package-1.1.25.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

my_pipeline_package-1.1.25-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file my-pipeline-package-1.1.25.tar.gz.

File metadata

  • Download URL: my-pipeline-package-1.1.25.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for my-pipeline-package-1.1.25.tar.gz
Algorithm Hash digest
SHA256 148e0c228ffb8cb5df6a885cbb0b1ae4f19ed1036c17dbb47735b8a6548c5ac3
MD5 7e3e865ceb6242a38ca83b86fc7793d2
BLAKE2b-256 8500f540e56445b3c144f5ae248846ba5e94cbe275fde027f98b2964d428d0de

See more details on using hashes here.

File details

Details for the file my_pipeline_package-1.1.25-py3-none-any.whl.

File metadata

File hashes

Hashes for my_pipeline_package-1.1.25-py3-none-any.whl
Algorithm Hash digest
SHA256 2497168a1846b9e26a64bcaecd709f107c3b47362f3fc0c6703a1a47e7e187ac
MD5 9d6144d27d3661ab978002fbfdb184bf
BLAKE2b-256 7f5601aefa53745a679289828c4858cbe7e85744f088f7ea14ee1f5c5df7b597

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