Azure pipelines cross-platform python scripting
Azure pipelines cross-platform python scripting This post is a continuation of Azure pipelines cross-platform scripts for Self-Hosted Azure agents. If you’ve missed it make sure to read this first, since we’re going to extend on it.
I can hear you think, “but Python is already cross platform … ?”. Yes, though this is going to be about how to setup Azure Pipelines to invoke Python in a cross-platform way.
The problem The problem that you’re going to face is that not all Python installations have the same executables python and python3.
published on Thu, 01 Aug 2024
Azure pipelines cross-platform scripts
Azure pipelines cross-platform scripts To keep things simple when setting up a CI/CD pipeline for a cross-platform application we cautiously have to consider our options for running the steps in what scripting language, because we don’t want to end up with scripts that do the same thing functionally, but are different for each platform, which means extra maintenance and complexity for the maintainers.
So we have to consider languages like Powershell, Bash, Zsh or Python for to run on Windows, macOS and Linux.
published on Thu, 01 Aug 2024
How to typed command line arguments in python
How to typed command line arguments in python Creating tools with python is a common practice due to its ease of use and productivity. Now python already has good built-in support for parsing command-line arguments, but we can take it one step further.
Let’s take the following example where we would like to create a platform independent build script that should be able to accept the build type and an option to rebuild.
published on Mon, 22 Apr 2024
How to call a function of a file in python
How to call a function of a file in python Take the following use case, where I have a script that I use in my Continues Integration (CI) pipeline and I would like to call a function in that file from the command-line with parameters.
The inspect module provides several useful functions to help get information about live objects such as modules, classes, methods, functions, tracebacks, frame objects, and code objects.
published on Fri, 17 Nov 2023
Practical cppstd 17 highlights by example
Practical cppstd 17 highlights by example Language Features Library Features Language Features Nested namespace definitions namespace A::B::C { // ... } // Rather than: namespace A { namespace B { namespace C { // ... } } } Structured bindings #include <map>#include <string>#include <iostream> struct Vector3 { float X; float Y; float Z; }; using MappingPair = std::pair<int, std::string>; int main() { const auto [x, y, z] = Vector3{1.
published on Mon, 06 Mar 2023