Code Monkey home page Code Monkey logo

first-steps-in-ddd-solutions-python's Introduction

First Steps in Domain-Driven Design - Python Solution

Build

This is the starter project for the exercises in the "First Steps in Domain-Driven Design" course for O'Reilly. If you are more of a Java person, take a look at the Java version of this codebase. If you prefer dotnet, take a look at the C# version (Thanks to @BAPostma for contributing this).

You should be able to fork and then clone this repo to get an almost-empty python project ready to work with.

Pre-requisites

  • python 3.7+
  • pytest 6.2.4+ (pip install -r requirements.txt)
  • IDE of your choice
  • Git client (unless you already have one in your IDE)

What you get

A directory first-steps-in-ddd-python containing this README.md, a solution file with the code and test projects. Source files in src and the unit tests that live in tests directory containing some example unit tests (test_a_police_investigation.py, test_a_precharge_decision.py and test_a_criminal_case.py) and associated starter classes found in src/justice_app.py (e.g. PoliceInvestigation, PNCId, Suspect.py) and an Enum, CriminalOffence.

Up and running

The training relies entirely on your writing unit tests (ideally you use test-driven development), so you want to be able to run them very quickly.

Open the newly checked out project in your IDE (point it at the top-level project directory). Install the requirements from requirements.txt Then check you can execute all the tests with the click of a single mouse button, or ideally a single keyboard shortcut. Make sure you are running the tests with pytest instead of the default unittest

Additionally, you can run the tests from the command line. Open a terminal and change to the top-level project directory. Then run the command pytest.

You ought to see your tests running, and all but one of the tests run successfully.

The failing test is where we will start exercise one.

Get ahead of the game

We're going to work on this code based on a Domain Expert Statement from a Public Prosecutor. If you want to read it in advance, that'll help you in the first workshop exercise and beyond.

first-steps-in-ddd-solutions-python's People

Contributors

andreipradan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

first-steps-in-ddd-solutions-python's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.