Comments (3)
Hey there! Glad you like ashes. This isn't possible with the library right this second, but I've got some ideas. Most revolve around this line here.
Would a log statement work? Or are you trying to raise a full-blown error?
from ashes.
I mainly just want to use it for testing, I want to make sure that my dataclasses have the right fields, which I turn into dictionaries and pass into ashes. So it could be a boolean, or it could be a logging context-manager that I could inspect for warnings (and get a bool). Or it could be an optional kwarg. I don't mind too much, as long as I can make my test fail if the dataclass doesn't match the template.
from ashes.
Years ago, I started work on extending ashes to track the utilized fields. I never got it to recurse correctly though.
The use-case for me was to build a model of what ashes used in the template. This would allow us to write tests where we could ensure we pass the correct data into ashes, but also optimize the data structure. Our app renders the templates in the cloud with ashes, or in a browser/app with JavaScript; being able to strip unused fields from the JavaScript payload was a big goal.
from ashes.
Related Issues (20)
- Bug - Ashes doesn't respect kw args in partials HOT 3
- Support raw ouput HOT 1
- docs update or feature request - `load_all` HOT 4
- possible feature idea - cacheable templates HOT 12
- Support partial params HOT 3
- @gt/@lt bug HOT 1
- URL encoding error HOT 2
- Compare to the LinkedIn fork HOT 4
- support linkedin extensions: $idx, $len HOT 3
- Docs - Note any custom helpers/extensions and link to javascript versions if applicable HOT 5
- TemplatePathLoader swaps order of arg/kwarg
- worrisome version numbering HOT 2
- Nested lists broken HOT 5
- [feature request] Make the start and end delimeters of a template token customizeable HOT 4
- [feature request] split out/remove bottle code HOT 5
- Question: any way to extend the library? HOT 2
- consumption tracking
- [feature request] Add @select functionality HOT 1
- Howto reference python functions in templates?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ashes.