Writing #python tests with Hypothesis frees you from the tedium of deciding on and writing out specific inputs to test. Now, the
The idea is to provide an easy way to start property-based testing, and a seamless transition to more complex test code - because ghostwritten tests are source code that you could have written for yourself.
So just pick a function you’d like tested, and feed it to one of the functions below or our command-line interface hypothesis write
https://hypothesis.readthedocs.io/en/latest/ghostwriter.html
hypothesis.extra.ghostwriter module can write your test functions for you too!The idea is to provide an easy way to start property-based testing, and a seamless transition to more complex test code - because ghostwritten tests are source code that you could have written for yourself.
So just pick a function you’d like tested, and feed it to one of the functions below or our command-line interface hypothesis write
-h! They follow imports, use but do not require type annotations, and generally do their best to write you a useful test.https://hypothesis.readthedocs.io/en/latest/ghostwriter.html
Klipse is a #js plugin for embedding interactive code snippets in tech blogs.
Technically, Klipse is a small piece of javascript code that evaluates code snippets in the browser and it is pluggable on any web page.
Supports lots of languages like Python, Ruby, Lua, SQL, PHP, etc
https://github.com/viebel/klipse
Technically, Klipse is a small piece of javascript code that evaluates code snippets in the browser and it is pluggable on any web page.
Supports lots of languages like Python, Ruby, Lua, SQL, PHP, etc
https://github.com/viebel/klipse
Convert poetry projects to #nix automagically.
poetry2nix turns Poetry projects into Nix derivations without the need to actually write Nix expressions. It does so by parsing
https://github.com/nix-community/poetry2nix
#python
poetry2nix turns Poetry projects into Nix derivations without the need to actually write Nix expressions. It does so by parsing
pyproject.toml and poetry.lock and converting them to Nix derivations on the fly.https://github.com/nix-community/poetry2nix
#python
Github action that uses machine learning to detect potential toxic comments added to PRs and issues so authors can have a chance to edit them and keep repos a safe space.
It uses the Tensorflow.js toxicity classification model.
It currently works when comments are posted on issues and PRs, as well as when pull request reviews are submitted.
https://github.com/charliegerard/safe-space
#ds #js #github
It uses the Tensorflow.js toxicity classification model.
It currently works when comments are posted on issues and PRs, as well as when pull request reviews are submitted.
https://github.com/charliegerard/safe-space
#ds #js #github
👍1
Echelon - hierarchical logs in terminal on steroids.
Cross-platform #go library to organize logs in a hierarchical structure.
Features:
- Customizable and works with any VT100 compatible terminal
- Supports simplified output for dump terminals
- Implements incremental drawing algorithm to optimize drawing performance
- Can be used from multiple goroutines
- Pluggable and customizable renderers
- Works on Windows!
https://github.com/cirruslabs/echelon
Cross-platform #go library to organize logs in a hierarchical structure.
Features:
- Customizable and works with any VT100 compatible terminal
- Supports simplified output for dump terminals
- Implements incremental drawing algorithm to optimize drawing performance
- Can be used from multiple goroutines
- Pluggable and customizable renderers
- Works on Windows!
https://github.com/cirruslabs/echelon
Django Ninja is a web framework for building APIs with Django and #python 3.6+ based type hints.
Key features:
- Easy: Designed to be easy to use and intuitive.
- Fast: Very high performance thanks to Pydantic and async support.
- Fast to code: Type hints and automatic docs let's you focus only on business logic.
- Standards-based: Based on the open standards for APIs: OpenAPI (previously known as Swagger) and JSON Schema.
https://github.com/vitalik/django-ninja
This code:
Turns into:
Key features:
- Easy: Designed to be easy to use and intuitive.
- Fast: Very high performance thanks to Pydantic and async support.
- Fast to code: Type hints and automatic docs let's you focus only on business logic.
- Standards-based: Based on the open standards for APIs: OpenAPI (previously known as Swagger) and JSON Schema.
https://github.com/vitalik/django-ninja
This code:
from ninja import NinjaAPI
api = NinjaAPI()
@api.get("/add")
def add(request, a: int, b: int):
return {"result": a + b}
Turns into:
⚡Breking news!
TypeScript 4 is out!
https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/
#ts
TypeScript 4 is out!
https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/
#ts
Microsoft News
Announcing TypeScript 4.0
Today we are thrilled to announce the availability of TypeScript 4.0! This version of the language represents our next generation of TypeScript releases, as we dive deeper into expressivity, productivity, and scalability. If you’re not familiar with TypeScript…
fubectl: Reduces repetitive interactions with kubectl, because it's fancy-kubectl!
Can also be used to add the current kubecontext in your prompt.
https://github.com/kubermatic/fubectl
#go #k8s #devops
Can also be used to add the current kubecontext in your prompt.
https://github.com/kubermatic/fubectl
#go #k8s #devops
Quality assurance for Jupyter Notebooks.
Adapter to run any code-quality tool on a Jupyter notebook. This is intended to be run as a pre-commit hook and/or during continuous integration.
Can run: flake8, mypy, black, isort, doctest.
Also works with
https://github.com/nbQA-dev/nbQA
#ds #python
Adapter to run any code-quality tool on a Jupyter notebook. This is intended to be run as a pre-commit hook and/or during continuous integration.
Can run: flake8, mypy, black, isort, doctest.
Also works with
wemake-python-styleguide!https://github.com/nbQA-dev/nbQA
#ds #python
Forwarded from Binary Tree
Python libraries to make your code readable, reliable and maintainable
An experienced programmer understands perfectly well that a developer spends most of his time reading code and therefore treats the process of writing code with the deepest trepidation (and sometimes with fanaticism). To write quality and maintainable code, you need to take the time to write tests and integrate QA tools. There is a whole technique aimed at test-driven development (TDD) and I will not devote this article to the topic of testing as such. Tests are absolutely necessary and there is nothing to discuss. In this article, we are going to talk about tools that help you write quality Python code.
#python, #testing, #libraries, #blog, #QA, #isaak
An experienced programmer understands perfectly well that a developer spends most of his time reading code and therefore treats the process of writing code with the deepest trepidation (and sometimes with fanaticism). To write quality and maintainable code, you need to take the time to write tests and integrate QA tools. There is a whole technique aimed at test-driven development (TDD) and I will not devote this article to the topic of testing as such. Tests are absolutely necessary and there is nothing to discuss. In this article, we are going to talk about tools that help you write quality Python code.
#python, #testing, #libraries, #blog, #QA, #isaak
A tool to help migrate #js code quickly and conveniently to #ts.
ts-migrate is intended to accelerate the TypeScript migration process. The resulting code will pass the build, but a followup is required to improve type safety. There will be lots of // @ts-expect-error, and any that will need to be fixed over time. In general, it is a lot nicer than starting from scratch.
ts-migrate is designed as a set of plugins so that it can be pretty customizable for different use-cases. Potentially, more plugins can be added for addressing things like improvements of type quality or libraries-related things (like prop-types in React).
https://github.com/airbnb/ts-migrate
We have examples of the three categories of plugins:
-
-
-
Produces:
ts-migrate is intended to accelerate the TypeScript migration process. The resulting code will pass the build, but a followup is required to improve type safety. There will be lots of // @ts-expect-error, and any that will need to be fixed over time. In general, it is a lot nicer than starting from scratch.
ts-migrate is designed as a set of plugins so that it can be pretty customizable for different use-cases. Potentially, more plugins can be added for addressing things like improvements of type quality or libraries-related things (like prop-types in React).
https://github.com/airbnb/ts-migrate
We have examples of the three categories of plugins:
-
example-plugin-jscodeshift simply reverses the names of all identifiers.-
example-plugin-text will add a console.log before each return statement.-
example-plugin-ts is a simple TypeScript AST-based plugin, which shows how we can add simple types to the JavaScript code with the usage of TypeScript compiler API.Produces:
Ever wanted to work with async functions in #python the same way you do in #js?
Me neither! But, today I had a use-case for it to try. Features:
- Ultra-performant Promise implementation in Python
- It is a super set of Promises/A+ designed to have readable code
- Familiar API
- Works with async / await
- Has partial typing support
- Works on multiple python versions
https://github.com/syrusakbary/promise
Me neither! But, today I had a use-case for it to try. Features:
- Ultra-performant Promise implementation in Python
- It is a super set of Promises/A+ designed to have readable code
- Familiar API
- Works with async / await
- Has partial typing support
- Works on multiple python versions
https://github.com/syrusakbary/promise
GitHub
GitHub - syrusakbary/promise: Ultra-performant Promise implementation in Python
Ultra-performant Promise implementation in Python. Contribute to syrusakbary/promise development by creating an account on GitHub.
A terminal-based presentation tool with colors and effects.
Present your stuff without leaving your terminal!
Personal opinion: this might be a really cool thing for live-coding sessions for people using vim/emacs. The context switch would be minimal.
https://github.com/vinayak-mehta/present
#python
Present your stuff without leaving your terminal!
Personal opinion: this might be a really cool thing for live-coding sessions for people using vim/emacs. The context switch would be minimal.
https://github.com/vinayak-mehta/present
#python
Simple tool to evolve PostgreSQL schema easily. PostgreSQL migrations made easy!
PGmigrate has the following key-features:
- Transactional and nontransactional migrations: you can enjoy whole power of PostgreSQL DDL
- Callbacks: you can run some DDL on specific steps of migration process (e.g. drop some code before executing migrations, and create it back after migrations were applied)
- Online migrations: you can execute series of transactional migrations and callbacks in a single transaction (so, if something goes wrong simple ROLLBACK will bring you in consistent state)
https://github.com/yandex/pgmigrate
#python
PGmigrate has the following key-features:
- Transactional and nontransactional migrations: you can enjoy whole power of PostgreSQL DDL
- Callbacks: you can run some DDL on specific steps of migration process (e.g. drop some code before executing migrations, and create it back after migrations were applied)
- Online migrations: you can execute series of transactional migrations and callbacks in a single transaction (so, if something goes wrong simple ROLLBACK will bring you in consistent state)
https://github.com/yandex/pgmigrate
#python
High-confidence browser testing.
This is like QuickCheck, but for E2E tests.
Features:
- Reduce testing effort: Generate thousands of test cases instead of writing them manually. Lower the maintenance burden of your browser testing by writing concise specifications with looser coupling to your implementation.
- Find complex bugs: Quickstrom simulates complex and unexpected user behavior using generative random testing. When the specification is violated, Quickstrom finds a minimal failing example.
- Understand your system: Focus on specifying your system, not on writing test cases. A specification lets you run Quickstrom, but can also increase your team's understanding of the system.
- Adopt gradually: Quickstrom works with any web application that renders DOM elements. Start simple, and gradually refine your specification to increase coverage and confidence.
https://github.com/quickstrom/quickstrom
#haskell
This is like QuickCheck, but for E2E tests.
Features:
- Reduce testing effort: Generate thousands of test cases instead of writing them manually. Lower the maintenance burden of your browser testing by writing concise specifications with looser coupling to your implementation.
- Find complex bugs: Quickstrom simulates complex and unexpected user behavior using generative random testing. When the specification is violated, Quickstrom finds a minimal failing example.
- Understand your system: Focus on specifying your system, not on writing test cases. A specification lets you run Quickstrom, but can also increase your team's understanding of the system.
- Adopt gradually: Quickstrom works with any web application that renders DOM elements. Start simple, and gradually refine your specification to increase coverage and confidence.
https://github.com/quickstrom/quickstrom
#haskell
Fully automated python fuzzer built to test if code actually is production ready in seconds.
#python allows you to do pretty much whatever you want. This is a good thing for the most part however it creates the opportunity for unexpected events to occur. One of battletested's strongest assets is its ability to show you all of those possibilities so there are no surprises. In a way, it surpasses learning about the behavior of code by reading docstrings because all behaviors are recorded during a fuzz.
https://github.com/CodyKochmann/battle_tested
For example, the image below shows just how much is brought to light about a piece of code without needing to read a textbook's worth of documentation (which almost never exists) just to learn about the full behavior of a single function.
#python allows you to do pretty much whatever you want. This is a good thing for the most part however it creates the opportunity for unexpected events to occur. One of battletested's strongest assets is its ability to show you all of those possibilities so there are no surprises. In a way, it surpasses learning about the behavior of code by reading docstrings because all behaviors are recorded during a fuzz.
https://github.com/CodyKochmann/battle_tested
For example, the image below shows just how much is brought to light about a piece of code without needing to read a textbook's worth of documentation (which almost never exists) just to learn about the full behavior of a single function.
❤1
Gitpod is an open-source #k8s application providing fully-baked, collaborative development environments in your browser - powered by VS Code.
Tightly integrated with GitLab, GitHub, and Bitbucket, Gitpod automatically and continuously prebuilds dev environments for all your branches. As a result, team members can instantly start coding with fresh, ephemeral and fully-compiled dev environments - no matter if you are building a new feature, want to fix a bug or do a code review.
Features:
- Dev environment as code
- Prebuilt dev environments - automatically prepare environments on every Git push
- Professional developer experience in a browser tab (VS Code Extensions, full Linux terminals)
- Integrated Docker build
- GitLab, GitHub, and Bitbucket integration
- Integrated code reviews
- Snapshots - Snapshot any state of your dev environment and let others create clones
- Collaboration - Invite team members to your environments
- Gitpod CLI to automate your experience
https://github.com/gitpod-io/gitpod
#ts #go #devops
Tightly integrated with GitLab, GitHub, and Bitbucket, Gitpod automatically and continuously prebuilds dev environments for all your branches. As a result, team members can instantly start coding with fresh, ephemeral and fully-compiled dev environments - no matter if you are building a new feature, want to fix a bug or do a code review.
Features:
- Dev environment as code
- Prebuilt dev environments - automatically prepare environments on every Git push
- Professional developer experience in a browser tab (VS Code Extensions, full Linux terminals)
- Integrated Docker build
- GitLab, GitHub, and Bitbucket integration
- Integrated code reviews
- Snapshots - Snapshot any state of your dev environment and let others create clones
- Collaboration - Invite team members to your environments
- Gitpod CLI to automate your experience
https://github.com/gitpod-io/gitpod
#ts #go #devops
Futuristic Sci-Fi and Cyberpunk graphical user interface framework for web apps
Arwes is a web framework to build user interfaces for web applications based on futuristic science fiction and cyberpunk styles, animations, and sound effects. The concepts behind are opinionated and try to inspire advanced space technology and alien influence. It is built on top of #react, JSS, Anime, and Howler.
https://github.com/arwes/arwes
#js #css #html
Arwes is a web framework to build user interfaces for web applications based on futuristic science fiction and cyberpunk styles, animations, and sound effects. The concepts behind are opinionated and try to inspire advanced space technology and alien influence. It is built on top of #react, JSS, Anime, and Howler.
https://github.com/arwes/arwes
#js #css #html