Location via proxy:   
[Report a bug]   [Manage cookies]                

Incredible Shortcuts in Local Makefiles

Using Docker Compose is a marvel, unless you have multiple projects to manage, and they’re not running on the same ports with enormous commands. My first thought was to create a Makefile, but the project already has one! 🤡 How do I then achieve: having local shortcuts running in concise commands? The first step: creating my own Makefile and calling it MyMakefile. .PHONY: test # pega todos os argumentos da linha de comando após o alvo ARGS = $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) test: docker-compose exec app pytest project/ --no-migrations $(ARGS) To prevent it from being committed in the project, I added it to my global .

Read More →

I don’t have a private PyPI, what now?

The situation is as follows: the company you work for is small, and you want to publish a Python package internally. However, you don’t want to pay for a service to do this or add a new tool. Although this may seem like a specific situation, we can say that it can happen quite frequently. In Brazil, literally 99% of companies are small businesses. According to Forbes, the statistic is exactly the same in the USA (the first country that appeared in the search :)).

Read More →

From manual to automated: how I do it

My Strategy on When and How to Automate Things After having worked in both large and small companies, product teams and project teams, with gigantic codebases and some not so big, I feel confident to say that: every place has manual routines that could be automated. And there’s no escaping it: every process that is automated probably stemmed from some manual real-world task, gradually built up with different tasks and expectations.

Read More →

Printing Tracebacks

Sometimes you’re in a situation where you need to debug something that is inside a piece of code like this: try: [...] except Exception as e: [...] An option would be printing e but it will show only the exception message, instead of the traceback. You can solve this by adding: import traceback try: [...] except Exception as e: [...] print(''.join(traceback.format_exception(None, e, e.__traceback__))) It will show the exception and the traceback.

Read More →

Publishing your Python package in your Gitlab Package Registry

I joined iib in January and since the beginning it was clear that I’d have a lot of fun automating a few manual process. The development team is formed by three persons: the CTO, another developer and me. The team is small but step by step we’re going towards the technical excellence we want. :) One of the things that needed automation was the release of an internal library. The process to install it was basically git pull + python setup.

Read More →