GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - sertansenturk/coding-challenge-template: Template repository to kickstart a Python/Docker environment for coding/take-home challenges.

BranchesTags
Open more actions menu

Latest commit

 

History

21 Commits
21 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docker
docker
 
 
integration-tests
integration-tests
 
 
notebooks
notebooks
 
 
src/challenge_template
src/challenge_template
 
 
tests
tests
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
.pylintrc
.pylintrc
 
 
Changelog.md
Changelog.md
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
docker-compose.api.yaml
docker-compose.api.yaml
 
 
docker-compose.batch.yaml
docker-compose.batch.yaml
 
 
docker-compose.jupyter.yaml
docker-compose.jupyter.yaml
 
 
docker-compose.python-dev.yaml
docker-compose.python-dev.yaml
 
 
requirements.txt
requirements.txt
 
 
setup.py
setup.py
 
 

Repository files navigation

challenge_template

Template repository to kickstart a Python/Docker environment for coding/take-home challenges.

Technology Stack

  • Language: Python 3.8
  • Containerization: Docker
  • Serving: flask
  • Continous Integration: Github Actions

Prerequisites

  • Docker: Please refer to the documentation for installation instructions.

How to run

Starting the API

To build & start the application, execute in the terminal:

make api

The above command will start a Docker-compose stack. The stack has a single container with the challenge_template package installed behind flask.

Once the stack is up and running, the template API will be exposed at localhost:5000/template.

Posting queries

Open a new terminal window and enter a query, e.g.:

curl -X POST localhost:5000/template -d 'some message'

In the above case, the (dummy) template API returns the message back with additional information as the response.

If you are lazy to remember the full curl command, you could run:

make post QUERY='some message'
# Received POST request: 'some message'

Running the batch app in Docker

For batch use cases, you could run the workflow built on the functionality in challenge_template package as:

make batch

Currently, the (dummy) template driver prints out the command line arguments passed to the driver.

Running notebooks

It is typical to carry out exploratory data analysis (EDA) on the data and test different approaches alongside implementing a solution. Jupyter is a good ecosystem for such work.

If you want to run the notebooks locally, you can start Jupyter Lab by running in the terminal:

make jupyter

Above command builds a docker-compose stack and runs a container with Jupyter installed. Once the Jupyter is up and running, you should see a URL looking like http://127.0.0.1:8888/lab?token=9f59... in the terminal screen.

Clicking the URL should take you the Jupyter Lab on your browser of choice.

Note the first build could take around 6-7 minutes, depending on your machine and internet connection.

Running unittests

Run in the terminal:

make unit-tests 

which runs unit tests using pytest.

The unittests are also run on Github actions after each push: link.

Code formatting

In the terminal run:

make format

which formats the Python code in the repo using black.

Code linting

In the terminal run:

make lint

which shows Python code style / linting issues using flake8 and pylint.

About

Template repository to kickstart a Python/Docker environment for coding/take-home challenges.

Topics

coding-challengecoding-interviewcontinuous-integrationdockerflask-apigithub-actionsjupyterpython3take-home-assignmenttake-home-test

Resources

Readme
Activity

Stars

3 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.