TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #421 · 23 мар.

Мы используем Makefile думая, что нет альтернатив, что это стандарт и всё такое. Но make это не запускалка команд, а система сборки. Мы фактически используем его не по назначению. И на самом деле альтернатива есть! Некоторое время назад я открыл для себя прекрасный инструмент - just. Он решает все проблемы make. just - это не система сборки как make, это именно исполнитель команд! Больше никаких Phony Targets и табуляций, привет нормальный синтаксис и передача аргументов!!! 😎 ⭐️Что умеет just: ✅ Автодокументирование команд Не нужно делать отдельную команду с докой, просто добавь комментарий # команда сборки build: ... $ just --list Available recipes: build # команда сборки Команда с именем default запускается по умолчанию если не указано другое, так что я обычно делаю так: default: just --list Теперь просто выполняем just и получаем доку из текущего файла. ✅ Удобная работа с переменными окружения # загрузить из .env set dotenv-load # глобальная переменная export PYTHONPATH := "./src" # переменная для команды test $TESTUNG="true": pytest ✅ Передача аргументов build target: @echo 'Build {{target}}...' команда запуска $ just build dev # Build dev... ✅ Выбор интерпретатора прямо в команде Пример с инлайн-скриптом на python: system: #!/usr/bin/env python3 import platform print(platform.system()) Эта же функция позволит выполнить скрипт как одну команду вместо перезапуска шела для каждой строки foo: #!/usr/bin/env sh for file in ls .; do echo $file done ✅ Выполнение команды в определенной директории. Можно указать как релятивный путь так и абсолютный [working-directory: 'backend'] build: docker compose build Также можно задать рабочую директорию глобально Там еще много интересного: - поддержка функций - автокомплиты и интеграции - экспрешены - алиасы команд - группировка команд - альтернативы команды под разные ОС - импорт других just-файлов - цветной вывод - ... и другие штуковины! Так что вперёд - ➡️ читать доку! Репозиторий: ➡️https://github.com/casey/just Статья: ➡️https://www.chicks.net/reference/file_formats/just/ ЗЫ. Кажется, на Makefile я уже не вернусь) #tools

Hashtags

Резултати

Пронајдени 4 слични објави

Пребарај: #ilva

当前筛选 #ilva清除筛选
Ultimora.net - POLITICS

@ULTIMORAPOLITICS · Post #42198 · 17.11.2022 г., 12:56

È terminato al ministero delle Imprese e del Made in Italy il tavolo sull'ex #Ilva convocato dal ministro Adolfo #Urso in merito alla sospensione delle attività fino al 16 gennaio 2023. @UltimoraPolitics

Hashtags

Maurizio Vezzosi

@mauriziovezzosi · Post #118 · 30.11.2019 г., 15:20

Il mio - altro - videoracconto della giornata della manifestazione che si è svolta ieri a Taranto. Per Ruptly. Taranto (Italy) 29th november 2019 - Hundreds of Ilva workers, Europe's largest steel plant owned by the French-Indian multinational Arcelor-Mittal, held a general strike in Taranto on Friday, to protest against the company's plans to layoff thousands of workers as well as the toxic waste the plant has spewed over the city. "As has always been the case, we demand two basic rights that are written in our Constitution; the right to work and the right to the health," Vincenzo Mercurio a worker and a trade union delegate said. Reports say the protest was joined by a large number of students and activists associated with 'Fridays for Future' and 'Youth for Climate' groups. "The reason why we, students and citizens, are protesting is that we are tired of speaking with people that refuse to respect our rights and to listen to us; people that are busy worrying about their interests, not the people's ones. And we are tired of people showing that they are representing us, although they are just trying to gain our votes," Sara Pierpoli a student and protester said. The Italian government and the world's largest steelmaker Arcelor-Mittal are in dispute over pollution levels and the company's legal position while Rome is considering options to keep the plant open and save thousands of jobs. Video and text by Maurizio Vezzosi #steel#ilva#italsider#italy#climatestrike#fridayforfuture#strikeforclimate https://youtu.be/7xS2zjstqKs

Maurizio Vezzosi

@mauriziovezzosi · Post #116 · 29.11.2019 г., 17:10

#Taranto. I lavoratori del polo siderurgico ex-Ilva (ex-Italsider) scioperano con un'adesione sopra al 70% e scendono in piazza insieme ai giovani per l'ambiente, la salute, il lavoro: una battaglia per l'#Italia contro i saccheggi delle multinazionali. Il mio video-racconto per Il Fatto Quotidiano. #acciaio#ilva#italsider#iri#climatestrike#fridayforfuture#strikeforclimate