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 слични објави

Пребарај: #buildonton

当前筛选 #buildonton清除筛选
DWF Labs Broadcast

@Dwflabs · Post #173 · 22.01.2023 г., 09:54

​Now is the time and we are building!💎 The Open Network (TON) is growing strong developer communities in countries across the globe as our Hackathon provides developers with the necessary resources and guidance to build something incredible.🔥 Super excited to announce our INVITE-ONLY, on-site events. During our Hackathon this February, we will invite 6~10 teams that are looking to #buidl on #TON in a city that could be near you! Our goal is to empower builders and developers in local communities to create innovative applications, services and protocols with The Open Network. For the event, builders and developers will get a chance to meet and ask questions to a member of The TON Foundation and local TON developer specialist(s). The Q&A session will ensure that builders and developers are well equipped with knowledge about TON tools, incubation opportunities and building on TON mainnet. Join us on our mission to unite all blockchains and Web2 internet into one open network! If you want to attend and are excited to #BuildOnTon, please submit an introduction and your BUIDL idea! 🤓💻 To be eligible to WIN exclusive access, please abide by the following criteria: - Max. two people per team - Max. 150~250 words per pitch - Keep it concise and clear - Focus on value for the TON community - Submission period: Jan 18 (Wed) ~ Jan 25 (Wed) We are super keen to have developers from all over the world join us on our mission to build the next-gen internet. So, what are you waiting for? 💎SUBMITyour idea! The schedule of offline events during the TON global hackathon: Feb. 11-12: Taipei Seoul Bangkok Prague Feb. 18-19: Dubai Tel Aviv Tokyo Istanbul Singapore Feb. 25-26: Hong Kong Melbourne Saint Petersburg Hyderabad London

DWF Labs Broadcast

@Dwflabs · Post #165 · 20.01.2023 г., 00:00

​Now is the time and we are building!💎 The Open Network (TON) is growing strong developer communities in countries across the globe as our Hackathon provides developers with the necessary resources and guidance to build something incredible.🔥 Super excited to announce our INVITE-ONLY, on-site events. During our Hackathon this February, we will invite 6~10 teams that are looking to #buidl on #TON in a city that could be near you! Our goal is to empower builders and developers in local communities to create innovative applications, services and protocols with The Open Network. For the event, builders and developers will get a chance to meet and ask questions to a member of The TON Foundation and local TON developer specialist(s). The Q&A session will ensure that builders and developers are well equipped with knowledge about TON tools, incubation opportunities and building on TON mainnet. Join us on our mission to unite all blockchains and Web2 internet into one open network! If you want to attend and are excited to #BuildOnTon, please submit an introduction and your BUIDL idea! 🤓💻 To be eligible to WIN exclusive access, please abide by the following criteria: - Max. two people per team - Max. 150~250 words per pitch - Keep it concise and clear - Focus on value for the TON community - Submission period: Jan 18 (Wed) ~ Jan 25 (Wed) We are super keen to have developers from all over the world join us on our mission to build the next-gen internet. So, what are you waiting for? 💎SUBMITyour idea! The schedule of offline events during the TON global hackathon: Feb. 11-12: Taipei Seoul Bangkok Prague Feb. 18-19: Dubai Tel Aviv Tokyo Istanbul Singapore Feb. 25-26: Hong Kong Melbourne Saint Petersburg Hyderabad London