Skip to content

Commit

Permalink
python-leap -> cosmicpython
Browse files Browse the repository at this point in the history
  • Loading branch information
hjwp committed Nov 9, 2019
1 parent 79eb73b commit 3509720
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,3 +1,3 @@
[submodule "code"]
path = code
url = git@github.com:python-leap/code.git
url = git@github.com:cosmicpython/code.git
32 changes: 16 additions & 16 deletions Readme.md
Expand Up @@ -2,7 +2,7 @@

| Book | Code |
| ---- | ---- |
| [![Book Build Status](https://travis-ci.org/python-leap/book.svg?branch=master)](https://travis-ci.org/python-leap/book) | [![Code build status](https://travis-ci.org/python-leap/code.svg?branch=master)](https://travis-ci.org/python-leap/code) |
| [![Book Build Status](https://travis-ci.org/cosmicpython/book.svg?branch=master)](https://travis-ci.org/cosmicpython/book) | [![Code build status](https://travis-ci.org/cosmicpython/code.svg?branch=master)](https://travis-ci.org/cosmicpython/code) |


## Table of Contents
Expand All @@ -16,24 +16,24 @@ In the meantime, pull requests, typofixes, and more substantial feedback + sugge
| [Acknowledgements](acknowledgements.asciidoc) | |
| [Introduction: Why do our designs go wrong?](introduction.asciidoc)| ||
| [**Part 1 Intro**](part1.asciidoc) | |
| [Chapter 1: Domain Model](chapter_01_domain_model.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=chapter_01_domain_model)](https://travis-ci.org/python-leap/code) |
| [Chapter 2: Repository](chapter_02_repository.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=chapter_02_repository)](https://travis-ci.org/python-leap/code) |
| [Chapter 1: Domain Model](chapter_01_domain_model.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=chapter_01_domain_model)](https://travis-ci.org/cosmicpython/code) |
| [Chapter 2: Repository](chapter_02_repository.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=chapter_02_repository)](https://travis-ci.org/cosmicpython/code) |
| [Chapter 3: Interlude: Abstractions](chapter_03_abstractions.asciidoc) | |
| [Chapter 4: Service Layer (and Flask API)](chapter_04_service_layer.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=chapter_04_service_layer)](https://travis-ci.org/python-leap/code) |
| [Chapter 5: Unit of Work](chapter_05_uow.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=chapter_05_uow)](https://travis-ci.org/python-leap/code) |
| [Chapter 6: Aggregates](chapter_06_aggregate.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=chapter_06_aggregate)](https://travis-ci.org/python-leap/code) |
| [Chapter 4: Service Layer (and Flask API)](chapter_04_service_layer.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=chapter_04_service_layer)](https://travis-ci.org/cosmicpython/code) |
| [Chapter 5: Unit of Work](chapter_05_uow.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=chapter_05_uow)](https://travis-ci.org/cosmicpython/code) |
| [Chapter 6: Aggregates](chapter_06_aggregate.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=chapter_06_aggregate)](https://travis-ci.org/cosmicpython/code) |
| [**Part 2 Intro**](part2.asciidoc) | |
| [Chapter 7: Domain Events and a Simple Message Bus](chapter_07_events_and_message_bus.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=chapter_07_events_and_message_bus)](https://travis-ci.org/python-leap/code) |
| [Chapter 8: Going to Town on the MessageBus](chapter_08_all_messagebus.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=chapter_08_all_messagebus)](https://travis-ci.org/python-leap/code) |
| [Chapter 9: Commands](chapter_09_commands.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=chapter_09_commands)](https://travis-ci.org/python-leap/code) |
| [Chapter 10: External Events for Integration](chapter_10_external_events.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=chapter_10_external_events.asciidoc)](https://travis-ci.org/python-leap/code) |
| [Chapter 11: CQRS](chapter_11_cqrs.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=chapter_11_cqrs)](https://travis-ci.org/python-leap/code) |
| [Chapter 12: Dependency Injection](chapter_12_dependency_injection.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=chapter_12_dependency_injection)](https://travis-ci.org/python-leap/code) |
| [Chapter 7: Domain Events and a Simple Message Bus](chapter_07_events_and_message_bus.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=chapter_07_events_and_message_bus)](https://travis-ci.org/cosmicpython/code) |
| [Chapter 8: Going to Town on the MessageBus](chapter_08_all_messagebus.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=chapter_08_all_messagebus)](https://travis-ci.org/cosmicpython/code) |
| [Chapter 9: Commands](chapter_09_commands.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=chapter_09_commands)](https://travis-ci.org/cosmicpython/code) |
| [Chapter 10: External Events for Integration](chapter_10_external_events.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=chapter_10_external_events.asciidoc)](https://travis-ci.org/cosmicpython/code) |
| [Chapter 11: CQRS](chapter_11_cqrs.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=chapter_11_cqrs)](https://travis-ci.org/cosmicpython/code) |
| [Chapter 12: Dependency Injection](chapter_12_dependency_injection.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=chapter_12_dependency_injection)](https://travis-ci.org/cosmicpython/code) |
| [Epilogue: How do I get there from here?](epilogue_1_how_to_get_there_from_here.asciidoc) | |
| [Appendix B: Project Structure](appendix_project_structure.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=appendix_project_structure)](https://travis-ci.org/python-leap/code) |
| [Appendix C: A major infrastructure change, made easy](appendix_csvs.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=appendix_csvs)](https://travis-ci.org/python-leap/code) |
| [Appendix D: Django](appendix_django.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=appendix_django)](https://travis-ci.org/python-leap/code) |
| [Appendix E: Bootstrap](appendix_bootstrap.asciidoc) | [![Build Status](https://travis-ci.org/python-leap/code.svg?branch=appendix_bootstrap)](https://travis-ci.org/python-leap/code) |
| [Appendix B: Project Structure](appendix_project_structure.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=appendix_project_structure)](https://travis-ci.org/cosmicpython/code) |
| [Appendix C: A major infrastructure change, made easy](appendix_csvs.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=appendix_csvs)](https://travis-ci.org/cosmicpython/code) |
| [Appendix D: Django](appendix_django.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=appendix_django)](https://travis-ci.org/cosmicpython/code) |
| [Appendix E: Bootstrap](appendix_bootstrap.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=appendix_bootstrap)](https://travis-ci.org/cosmicpython/code) |
| [Appendix F: Validation](appendix_validation.asciidoc) | |


Expand Down
2 changes: 1 addition & 1 deletion appendix_project_structure.asciidoc
Expand Up @@ -145,7 +145,7 @@ Ed:
where the config just gets imported anywhere, and anything remotely related to
configuration gets put in there.
https://github.com/python-leap/book/issues/52
https://github.com/cosmicpython/book/issues/52
////
// TODO (DS): I reckon configuration patterns are an important part of the architecture your outlining, i wonder if they belong in the main book?

Expand Down
2 changes: 1 addition & 1 deletion chapter_01_domain_model.asciidoc
Expand Up @@ -243,7 +243,7 @@ code.
We've got some placeholder unit tests here, but you could just start from
scratch, or combine/rewrite these however you like:
https://github.com/python-leap/code/tree/chapter_01_domain_model_exercise
https://github.com/cosmicpython/code/tree/chapter_01_domain_model_exercise
******************************************************************************

Expand Down
2 changes: 1 addition & 1 deletion chapter_02_repository.asciidoc
Expand Up @@ -768,7 +768,7 @@ used an ORM in 10 years." Repository pattern and an ORM both act as abstraction
in front of raw SQL, so using one behind the other isn't really necessary. Why
not have a go at implementing our repository without using the ORM?
https://github.com/python-leap/code/tree/chapter_02_repository_exercise
https://github.com/cosmicpython/code/tree/chapter_02_repository_exercise
We've left the repository tests, but figuring out what SQL to write is up
to you. Perhaps it'll be harder than you think, perhaps it'll be easier,
Expand Down
2 changes: 1 addition & 1 deletion chapter_04_service_layer.asciidoc
Expand Up @@ -1154,7 +1154,7 @@ We've now got services for `add_batch` and `allocate`, why not build out
a service for `deallocate`? We've added an E2E test and a few stub
service-layer tests for you to get started here:
https://github.com/python-leap/code/tree/chapter_04_service_layer_exercise
https://github.com/cosmicpython/code/tree/chapter_04_service_layer_exercise
If that's not enough, continue into the E2E tests and _flask_app.py_, and
refactor the Flask adapter to be more RESTful. Notice how doing so doesn't
Expand Down
6 changes: 3 additions & 3 deletions chapter_05_uow.asciidoc
Expand Up @@ -297,12 +297,12 @@ TODO: Defend the mocking point
////
TODO:
https://github.com/python-leap/book/blame/master/chapter_05_uow.asciidoc#L238
https://github.com/cosmicpython/book/blame/master/chapter_05_uow.asciidoc#L238
Maybe "Only mock your immediate neighbors" is more applicable?
I think of "Don't mock what you don't own" as referring specifically to "mock verification" (e.g. assert mock_session.commit.assert_called_once()), with the reason for this advice being that you cannot change those interfaces. So the mock has no value in providing feedback to your design.
https://github.com/python-leap/book/issues/44
https://github.com/cosmicpython/book/issues/44
////

=== Using the UoW in the Service Layer
Expand Down Expand Up @@ -555,7 +555,7 @@ or rollback on exit. If you feel like going all-functional rather than
messing about with all these classes, you could use `@contextmanager` from
`contextlib`.
https://github.com/python-leap/code/tree/chapter_05_uow_exercise
https://github.com/cosmicpython/code/tree/chapter_05_uow_exercise
We've stripped out both the actual UoW and the fakes, as well as paring back
the abstract UoW. Why not send us a link to your repo if you come up with
Expand Down
2 changes: 1 addition & 1 deletion chapter_06_aggregate.asciidoc
Expand Up @@ -441,7 +441,7 @@ if you do that, you'll still have to solve a few challenges on your own,
like adding the model to the ORM and making sure all the moving parts can
talk to each other, which we hope will be instructive.
https://github.com/python-leap/code/tree/chapter_06_aggregate_exercise
https://github.com/cosmicpython/code/tree/chapter_06_aggregate_exercise
We've put in a "cheating" implementation in that delegates to the existing
`allocate()` function, so you should be able to evolve that towards the real
Expand Down
2 changes: 1 addition & 1 deletion introduction.asciidoc
Expand Up @@ -207,7 +207,7 @@ to do I/O it must depend on the adapter layer above it, which it can’t do, so
it creates a DAO abstraction, depends on that, and has that implemented in the
adapter layer.
https://github.com/python-leap/book/issues/49
https://github.com/cosmicpython/book/issues/49
////

You might be familiar with the dependency inversion principle already, because
Expand Down
6 changes: 3 additions & 3 deletions preface.asciidoc
Expand Up @@ -125,7 +125,7 @@ your way to a free online version, we want to ask you one, hugely important favo
Please, please send feedback. It might be something as simple as a quick shout
out on twitter (we are https://twitter.com/hjwp/[@hjwp] and
https://twitter.com/bob_the_mighty/[@bob_the_mighty]), a quick email via
mailto:python-leap@gmail.com[python-leap@gmail.com], or opening up issues
mailto:cosmicpython@gmail.com[cosmicpython@gmail.com], or opening up issues
or PRs on GitHub. Even just hearing that people are reading it, with no
actual feedback, cheers us on and validates that we have an audience. And
if you have time to tell us your impressions, then we absolutely want to
Expand Down Expand Up @@ -221,8 +221,8 @@ we're explaining what we're doing and why at each step.

But to really get to grips with these patterns, you need to mess about with the
code and actually get a feel for how it works. You'll find all the code on
GitHub; each chapter has its own branch. You can find a list of them here:
https://github.com/python-leap/code/branches/all
GitHub; each chapter has its own branch. You can find a list of them at
https://github.com/cosmicpython/code/branches/all[github.com/cosmicpython/code/branches/all]

Here's three different ways you might code along with the book:

Expand Down

0 comments on commit 3509720

Please sign in to comment.