Software Development Resources
private-package = {version = "^0.1.0", source = "artifactory"}
[[tool.poetry.source]]
name = "artifactory"
secondary = true
url = "https://artifactory.whatever.com/artifactory/some-repository/"
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.python.sh | bash
pip install git-lfs
git init
git lfs install
git lfs track "*.pickle"
Numerical Computing Techniques
- Pytest
- mock and patch
- Test Doubles:
- A dummy is a placeholder to fill some required parameters.
- A fake simulates a real dependency with a simplified working implementation.
- A stub behaves exactly as instructed.
- A spy records interactions with the production code, allowing tests to extract the interaction history when required.
- A mock additionally includes assertions (expectations) about the interactions with the production code.
- Clean Code
- OOP
- Inheritance and Composition
- Domain-Driven Design:
- Ubiquitous Language: Creating a shared vocabulary and terminology that both developers and domain experts can use to discuss the domain.
- Bounded Contexts: Defining specific boundaries around parts of the domain to isolate them and manage complexity.
- Entities and Value Objects: Modeling domain entities and value objects that represent key concepts in the domain.
- Aggregates: Clustering related entities and value objects together to enforce consistency and invariants.
- Repositories: Providing a structured way to access and persist domain objects.
- Hexagonal Architecture (a.k.a. Ports & Adapters):
- separate business logic (the hexagon) from its external dependencies (the ports & adapters)
- this separation allows for improved flexibility and testability
- Event Sourcing:
- Events: Immutable records of something that has happened in the system. Events capture both state changes and the intent behind those changes.
- Event Store: A data store that stores the events in an append-only fashion.
- Projections: Mechanisms to build read models (current state) from the event stream for querying purposes.
- Event Handlers: Components responsible for updating the read models in response to events.
- Command-Query Responsibility Segretation (CQRS):
- Command Handlers: Components responsible for processing commands and updating the write-side (event sourcing) of the system.
- Query Handlers: Components responsible for handling queries and providing data from the read-side (projections) of the system.
- Command and Query Models: These are often distinct from each other, tailored to the specific needs of commands and queries.