Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
- To improve our Python, go to [`python/README.md`](python/README.md)
- To improve our JVM, Javascript, or WASM implementations, go to [`jvm/README.md`](jvm/README.md)
- To improve the webpage of our published kdoc, [kdoc.selfie.dev](https://kdoc.selfie.dev), go to [`jvm/gradle/dokka/README.md`](jvm/gradle/dokka/README.md)
- To contribute for a different platform (python, go, etc.) we're happy to help! It should probably live in a different repo until it's close to `1.0`, but once it's near completion we're happy to maintain it here if you would like. Discuss in [selfie#85](https://github.com/diffplug/selfie/issues/85), but also feel free to open a PR with any ideas you have.
- To contribute for a different platform (python, go, etc.) we're happy to help! It should probably live in a different repo until it's close to `1.0`, but once it's near completion we're happy to maintain it here if you would like. Discuss in [selfie#85](https://github.com/diffplug/selfie-lib/issues/85), but also feel free to open a PR with any ideas you have.

Pull requests are very welcome, preferably against `main`.

## License

By contributing your code, you agree to license your contribution under the terms of the APLv2: https://github.com/diffplug/selfie/blob/master/LICENSE
By contributing your code, you agree to license your contribution under the terms of the APLv2: https://github.com/diffplug/selfie-lib/blob/master/LICENSE

All files are released with the Apache 2.0 license as such:

Expand Down
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
# Selfie: snapshot testing and memoizing for Python, JVM, and [(your PR here)](https://github.com/diffplug/selfie/issues/85)
# Selfie: snapshot testing and memoizing for Python and JVM

> **Moved:** this library now lives at `diffplug/selfie-lib`, with docs at [lib.selfie.dev](https://lib.selfie.dev). Maven and PyPI coordinates and the API are unchanged, so you don't need to change anything. [Read the announcement](https://github.com/diffplug/selfie-lib/issues/595).

![gif demo of selfie in action](https://docs.diffplug.com/selfie/selfie-demo.gif)

## Key features

- Just add a test dependency ([py](https://selfie.dev/py/get-started#installation), [jvm](https://selfie.dev/jvm/get-started#installation)), zero setup, zero config.
- Snapshots can be [inline literals](https://selfie.dev/py#literal) or [on disk](https://selfie.dev/py#like-a-filesystem).
- Use `expect_selfie` for testing or `cache_selfie` for [memoizing expensive API calls](https://selfie.dev/py/cache).
- Disk snapshots are automatically [garbage collected](https://github.com/diffplug/selfie/blob/main/jvm/selfie-runner-junit5/src/main/kotlin/com/diffplug/selfie/junit5/SelfieGC.kt) when the test class or test method is removed.
- Snapshots are **just strings**. Use html, json, markdown, whatever. No [magic serializers](https://selfie.dev/py/cache#roundtripping-typed-data).
- Just add a test dependency ([py](https://lib.selfie.dev/py/get-started#installation), [jvm](https://lib.selfie.dev/jvm/get-started#installation)), zero setup, zero config.
- Snapshots can be [inline literals](https://lib.selfie.dev/py#literal) or [on disk](https://lib.selfie.dev/py#like-a-filesystem).
- Use `expect_selfie` for testing or `cache_selfie` for [memoizing expensive API calls](https://lib.selfie.dev/py/cache).
- Disk snapshots are automatically [garbage collected](https://github.com/diffplug/selfie-lib/blob/main/jvm/selfie-runner-junit5/src/main/kotlin/com/diffplug/selfie/junit5/SelfieGC.kt) when the test class or test method is removed.
- Snapshots are **just strings**. Use html, json, markdown, whatever. No [magic serializers](https://lib.selfie.dev/py/cache#roundtripping-typed-data).
- Record **multiple facets** of the entity under test, e.g. for a web request...
- store the HTML as one facet
- store HTML-rendered-to-markdown as another facet
- store cookies in another facet
- **assert some facets on disk, others inline**
- see gif above for live demo, detailed example [here](https://selfie.dev/py/facets#harmonizing-disk-and-inline-literals)
- see gif above for live demo, detailed example [here](https://lib.selfie.dev/py/facets#harmonizing-disk-and-inline-literals)

Python and JVM ports are both production-ready, other platforms on the way: [js](https://github.com/diffplug/selfie/issues/84), [.NET, go, ...](https://github.com/diffplug/selfie/issues/85)
Python and JVM ports are both production-ready.

## Documentation

- Quickstart **([py](https://selfie.dev/py/get-started#quickstart), [jvm](https://selfie.dev/jvm/get-started#quickstart))**
- Facets **([py](https://selfie.dev/py/facets), [jvm](https://selfie.dev/jvm/facets))**
- Caching / memoizing **([py](https://selfie.dev/py/cache), [jvm](https://selfie.dev/jvm/cache))**
- Why selfie **([py](https://selfie.dev/py), [jvm](https://selfie.dev/jvm))**
- Quickstart **([py](https://lib.selfie.dev/py/get-started#quickstart), [jvm](https://lib.selfie.dev/jvm/get-started#quickstart))**
- Facets **([py](https://lib.selfie.dev/py/facets), [jvm](https://lib.selfie.dev/jvm/facets))**
- Caching / memoizing **([py](https://lib.selfie.dev/py/cache), [jvm](https://lib.selfie.dev/jvm/cache))**
- Why selfie **([py](https://lib.selfie.dev/py), [jvm](https://lib.selfie.dev/jvm))**
- API reference **([py](https://pydoc.selfie.dev/namespacemembers_func), [jvm](https://kdoc.selfie.dev/))**

## Contributing
Expand Down
Loading
Loading