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

Резултати

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

Пребарај: #rgs

当前筛选 #rgs清除筛选

🎉The Sverdlovsk Regional Branch of the Russian Geographical Society (RGS) turns 79 today! Founded on March 5, 1946, the Sverdlovsk RGS unites researchers, travelers, and geography enthusiasts. Sergey Mazurkevich, a member of the Board of Trustees and Honorary Consul of South Africa, along with the staff of the Honorary Consul’s office, sincerely congratulate their colleagues on this special occasion! 📍 The headquarters of the Sverdlovsk RGS is located in Yekaterinburg at Ural State Pedagogical University (USPU). 🔗 The website: https://www.rgo.ru/ru/ekaterinburg #RGS#Yekaterinburg#USPU#geography#Mazurkevich

خانه روسی در تهران

@Rossotrudnichestvo_in_Iran · Post #802 · 05.09.2024 г., 10:42

🇷🇺🌊🌊🌊 🇮🇳 On September 2, Ratish Nair, Honorary Consul of Russia in Trivandrum (Karnataka, India), began a journey along the route of Afanasy Nikitin. The ambitious project is dedicated to the 555th anniversary of the famous "Journey Beyond Three Seas". 📍 The starting point of the journey was the embankment named after the famous Russian traveler Afansy Nikitin in Tver. ⚡️ Ratish Nair met Senator of the Federation Council of Russia from the Tver Region Lyudmila Skakovskaya and Rector of Tver State University Sergei Smirnov. I am sure that this is a wonderful undertaking - repeating the route of the Tver merchant Afanasy Nikitin. This will help educational and outreach work, draw attention to the traveler's personality, and strengthen ties between our countries. I am sure that in our country, preserving and studying history is one of the most important areas of work, the Senator emphasized. Even in India, not everyone knows that Afanasy Nikitin is the first foreigner who came to our country for peaceful purposes. Friendly relations between India and Russia should be strengthened. This is the main goal of my trip. I am sure that the trip, repeating the path of the Russian traveler, will help to show Russia as it is and open it to foreigners without speculation and fakes, said Ratish Nair. 🗣The meeting participants discussed the opening of Russian online educational courses in Russian in the Indian state of Karnataka, as well as other educational initiatives. 🗺 The head of the Russian House in Trivandrum will visit four more countries after Russia. His route, like 555 years ago, will lie from Tver to Astrakhan along the Volga river, then by car to Derbent, from there to 🇦🇿Azerbaijan, then to 🇮🇷 Iran, from there by plane to 🇴🇲 Oman, and then to 🇮🇳 India. This project is organized by #Rossotrudnichestvo, the Russian Ministry of Foreign Affairs (#MFA), the #RusskiyMirFoundation, and the Russian Geographical Society (#RGS, #RGO), with #Rosatom and #Sber as partners. #RussianHouse#RussianHouseTrivandrum#JourneyBeyondThreeSeas #Voyage555