Skip to content

Commit

Permalink
Blog - How to Create a Python Virtual Environment with uv (#851)
Browse files Browse the repository at this point in the history
* Created new blog, added content, author, and resolved lint

* Added CTA

* Added keywords for internal links

* Added header image
  • Loading branch information
msali123 authored Jun 14, 2024
1 parent 567ae18 commit 83ff9cf
Show file tree
Hide file tree
Showing 15 changed files with 315 additions and 23 deletions.
5 changes: 4 additions & 1 deletion .github/styles/HouseStyle/tech-terms/phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@ dsn
bom
ko
dpkg
apk
apk

uv
cmd
24 changes: 12 additions & 12 deletions blog/_posts/2021-07-27-continuous-testing-in-devops.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Extending the CI process by adding automated tests is referred to as continuous

A good CI/CT process always contains at least the following steps:

- build
- deployment
- Build
- Deployment
- Integration tests
- End-to-end tests

Expand Down Expand Up @@ -81,7 +81,7 @@ A GitHub Actions workflow contains three elements:

It's straightforward to extend a workflow once you understand those three concepts. Here's a sample workflow for a Python application:

```yaml
~~~
name: Python application
on:
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
- name: Test with pytest
run: |
pytest
```
~~~

This what a basic workflow looks like:

Expand All @@ -132,7 +132,7 @@ But let's not rely on a third party yet. Instead, generate a badge to display in
- Generate the badge and add it to your README. Follow the setup step in the documentation of [schneegans/[email protected]](https://github.com/Schneegans/dynamic-badges-action).
{% raw %}

```yml
~~~
# This workflow will install Python dependencies, run tests, and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
label: coverage
message: ${{ env.COVERAGE }}
color: ${{ env.COLOR }}
```
~~~

{% endraw %}

Expand Down Expand Up @@ -238,7 +238,7 @@ Now edit your workflow configuration:
- Run Newman using the Action you just found in the Marketplace.
- Move the gating job at the end of the workflow by changing the `needs` property.

```yaml
~~~
name: Python application
on:
Expand All @@ -262,7 +262,7 @@ jobs:
gating:
needs: tests_api
[...] # we move the gating at the end of the workflow
```
~~~

Now your workflow should contain four sequential jobs:

Expand All @@ -288,7 +288,7 @@ Have a look at the result:

Your configuration should look along those lines to achieve this workflow:

```yaml
~~~
name: Python application
on:
Expand Down Expand Up @@ -328,7 +328,7 @@ jobs:
gating:
needs: [tests_api, test_e2e]
[...] # move the gating at the end of the workflow
```
~~~

### Add Performance Testing

Expand All @@ -350,7 +350,7 @@ As before, create a new job (called `test_performance`). This time I did not fin

Here is the workflow I came up with for my Python application:

```yml
~~~
name: Python application
on:
Expand Down Expand Up @@ -396,7 +396,7 @@ jobs:
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@xNok'
```
~~~

Your final workflow must look like this:

Expand Down
2 changes: 1 addition & 1 deletion blog/_posts/2021-11-24-spinnaker-kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ Spinnaker allows you to define providers that are integrated into the cloud plat
- Google App Engine
- AWS
- Azure
- cloud Foundry
- Cloud Foundry
- DC/OS
- Google Compute Engine
- Kubernetes
Expand Down
2 changes: 1 addition & 1 deletion blog/_posts/2022-03-09-golang-monorepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ monorepo.

**Cons:**

- build tooling can be more complicated in a monorepo
- Build tooling can be more complicated in a monorepo
- It can be easy to accidentally tightly-couple components that should be decoupled
- Components may be less autonomous, and developers may have less freedom to do things "their own way"

Expand Down
2 changes: 1 addition & 1 deletion blog/_posts/2022-04-8-docker-vagrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ However, this involves configuring inter-container networking, service access, p
There are some great benefits of using Dockerized application containers. For example:

- Dockerfiles, their associated images and the containers are lightweight and portable.
- containers use fewer resources than VMs.
- Containers use fewer resources than VMs.
- Building and deploying containers takes less time than deploying VMs.
- A physical host can run many more containers than virtual machines.

Expand Down
2 changes: 1 addition & 1 deletion blog/_posts/2022-07-25-pongo.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ In this **first article** we will learn how to:

- Start working with the tcell package
- Write text to the terminal
- make text move
- Make text move
- Create a ball that "bounces" when it reaches the edge of the screen

[The complete code for part one](https://github.com/jalletto/pongo).
Expand Down
2 changes: 1 addition & 1 deletion blog/_posts/2023-05-10-logging-in-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ In order to effectively use logging in Python, you should consider the following
- Log at the appropriate level to ensure that your logs contain the necessary information without being cluttered with unnecessary details.
- Consider using custom loggers to help organize and categorize your logs based on different parts of your code or different components of your application.
- Rotate your logs to save disk space and ensure that you can easily find and analyze relevant logs from different points in time.
- make sure to handle errors and exceptions appropriately in your logging code to avoid unexpected behavior and ensure that you capture all relevant information.
- Make sure to handle errors and exceptions appropriately in your logging code to avoid unexpected behavior and ensure that you capture all relevant information.
- Consider using structured logging formats like [JSON](/blog/convert-to-from-json) or XML to make it easier to parse and analyze your logs with automated tools.

## Conclusion
Expand Down
2 changes: 1 addition & 1 deletion blog/_posts/2023-05-11-oauth-2-in-non-web-clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ Recall that the browser flow does not occur on the non-web client. So, the non-w

The `get_access_token_from_login_code` function involves the following steps:

- makes an API call to the Facebook access token endpoint with the device code and access token passed as query params.
- Makes an API call to the Facebook access token endpoint with the device code and access token passed as query params.
- Calls the `_handle_error_from_login_code` function if there is an error. If the error is not a `PendingActionError` it raises an exception that terminates the function execution and if otherwise, delays the code by the 5s using `await asyncio.sleep()`.
- The polling is achieved by using [recursion](https://users.cs.utah.edu/~germain/PPS/Topics/recursion.html). You can also use a loop to achieve the polling.

Expand Down
2 changes: 1 addition & 1 deletion blog/_posts/2023-06-12-using-bazel-with-typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ The previous rules in the `BUILD` file tell Bazel the following:

- The rule is named `transpile`.
- The input files that need to be compiled are to be found in the path `src/index.ts`.
- bazel should fetch the compiler configuration from the `tsconfig.json` file in the current directory, as denoted by `//`.
- Bazel should fetch the compiler configuration from the `tsconfig.json` file in the current directory, as denoted by `//`.
- `allow_js` is set as `True`, which means that TypeScript should allow JavaScript files to be imported within the `.ts` project files.
- `resolve_json_module` is set as `True`, which means that Bazel should allow the import of `.json` extension files within the `.ts` project files.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Storing media in Cloudinary brings advantages like improved performance, scalabi
To implement an image upload system in Golang, you need the following prerequisites:

- Basic understanding of REST APIs in Golang
- cloudinary account
- Cloudinary account
- [Go installation](https://go.dev/doc/install) in a local environment.
The code used in this tutorial can be found on [my GitHub repository](https://github.com/Tee-Stark/go-image-uploader), in case you'd like to use it as a reference as you follow along.
Let's get started!
Expand Down
2 changes: 1 addition & 1 deletion blog/_posts/2023-09-12-shutting-down-earthly-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ It seems that Earthly Satellites are taking off, not just because we are deliver

- Satellite metrics – including CPU, memory, disk, and network I/O usage.

- build history – for both local and Satellites builds – in the web UI.
- Build history – for both local and Satellites builds – in the web UI.

- Auto-skip – the ability to skip a build instantly if the changed files don't impact it.

Expand Down
2 changes: 1 addition & 1 deletion blog/_posts/2024-06-04-earthly-cloud-ui-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The Earthly Cloud home dashboard isn't new, but it's a great entry point to Eart

## New Build Details Screen

The new Build Details screen aims to give you more information about your builds, including what commands were executed, how long different parts of the build took to execute, the build graph, and build logs. It has 4 tabs: Overview, Timings, Graph, and Logs.
The new Build Details screen aims to give you more information about your builds, including what commands were executed, how long different parts of the build took to execute, the build graph, and build logs. It has 4 tabs: Overview, Timings, Graph, and Logs.

### Overview

Expand Down
Loading

0 comments on commit 83ff9cf

Please sign in to comment.