Dev is a Makefile replacement for modern development environments

Overview

Dev

Continous integration

Dev is a Makefile replacement for modern development environments. Dev let's you manage cloned repositories, setup or teardown environments, execute commands, open pull requests and more. Dev is currently only supported on macOS.

Installation

Install dev by running the installer:

curl -s https://raw.githubusercontent.com/MasonData/dev/main/install.sh | sh

Getting started

Dev commands are defined in a Devfile, it maps a command to pre-defined tasks. Here is an example file:

name: dev

up:
    - python: 3.10.0
    - pip: requirements/development.txt
commands:
    test: py.test --color=yes
    style:
        - run: yapf -rip dev
        - run: flake8 .
    upload:
        - pypi: upload

Running a command:

$ dev test
=> Running command: py.test --color=yes
============================= test session starts ==============================
platform darwin -- Python 3.10.0, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /Users/alex/src/github.com/MasonData/dev
collected 5 items

tests/test_cli.py .....                                                  [100%]

============================== 5 passed in 0.27s ===============================

Managing git clones

Clone and navigate repositores with clone and cd commands. Clone repositores in a unified way and navigate between them using fuzzy search.

~/src/github.com/MasonData/dev $ dev clone hookit
Cloning into '/Users/alex/src/github.com/MasonData/hookit'...
remote: Enumerating objects: 153, done.
remote: Total 153 (delta 0), reused 0 (delta 0), pack-reused 153
Receiving objects: 100% (153/153), 23.12 KiB | 3.30 MiB/s, done.
Resolving deltas: 100% (69/69), done.
~/src/github.com/MasonData/hookit $ dev cd dev
~/src/github.com/MasonData/dev $

Helpful fuzzy search for faster repository navigation:

$ dev cd heroku
Found multiple matches, select which one you meant:
┏━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Index ┃ Repository                ┃ Organization ┃ Host       ┃ Path                                                           ┃
┡━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│   1   │ heroku-buildpack-yarn     │ MasonData    │ github.com │ /Users/alex/src/github.com/MasonData/heroku-buildpack-yarn     │
│   2   │ heroku-buildpack-swig-lib │ MasonData    │ github.com │ /Users/alex/src/github.com/MasonData/heroku-buildpack-swig-lib │
└───────┴───────────────────────────┴──────────────┴────────────┴────────────────────────────────────────────────────────────────┘
Which one? (1):

Browser links

Dev provide a way to open links related to your project. A new pull request or issue can easily be opened if your project is hosted on Github. Custom links are added to your Devfile.

open:
    actions: https://github.com/MasonData/dev/actions

Open links using the dev open command:

$ dev open actions
=> Running command: open https://github.com/MasonData/dev/actions

$ dev open pr
=> Running command: open https://github.com/MasonData/dev/pull/open-url

$ dev open issue
=> Running command: open https://github.com/MasonData/dev/issues/new

Bundled tasks

You can list all tasks available to Dev using the --tasks flag. This will list all bundled tasks and locally provided custom tasks.

$ dev --tasks
                            Tasks
┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Task                ┃ Description                          ┃
┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ docker_compose      │ Manage docker-compose                │
│ docker_compose_exec │ Run shell commands in docker-compose │
│ homebrew            │ Install formulas on macOS            │
│ homebrew_cask       │ Install cask formulas on macOS       │
│ python              │ Install a specific Python version    │
│ run                 │ Run shell commands                   │
│ pip                 │ Run pip install                      │
│ pypi                │ Manage packages on PyPi              │
└─────────────────────┴──────────────────────────────────────┘

Custom tasks

Dev provides a handful of common and useful tasks by default, but you might want to define your own to simplify your Devfile. A new task can easily be defined in your project by placing it in a devs module.

  1. Create devs.custom_task and define a class named CustomTask with a up and optionally a down method:

    from dev.task import Task
    
    
    class CustomTask(Task):
        __description__ = 'Demo custom task'
    
        def up(self, args, extra_args):
            print('Hello world!')
    
        def down(self, args, extra_args):
            print('Bye world!')
  2. Reference your new task in your Devfile:

    name: project
    
    up:
        - custom_task
    commands:
        hello:
            - custom_task
    
  3. Try using it:

    $ dev up
    Hello world!
    
    $ dev down
    Bye world!
    
    $ dev hello
    Hello world!
    

Uninstall

Simply remove your /opt/dev directory and any reference in your shell config. Restart your shell to clear loaded environment functions.

License

This project is licensed under the terms of the MIT license.

Inspiration for building this tool comes from an internal tool at Shopify. You can read more about it here: https://devproductivity.io/dev-shopifys-all-purpose-development-tool/

Owner
Mason Data
Mason Data
A Star Trek Online build tool in Python

SETS - STO Equipment and Trait Selector A Star Trek Online build tool in Python Description Pre-alpha version of build tool for STO Getting Started De

Star Trek Online Community Developers 7 Nov 12, 2022
PyPacker: a dumb little script for turning Python apps into standalone executable packages on Windows

PyPacker: a dumb little script for turning Python apps into standalone executable packages on Windows PyPacker is my attempt at creating a way to make

Serdar Yegulalp 9 Mar 15, 2022
The Pants Build System

Pants Build System Pants is a scalable build system for monorepos: codebases containing multiple projects, often using multiple programming languages

Pants Build 2.5k Jan 07, 2023
Simplified packaging of Python modules

Flit is a simple way to put Python packages and modules on PyPI. It tries to require less thought about packaging and help you avoid common mistakes.

Thomas Kluyver 1.9k Jan 05, 2023
Smaller, easier, more powerful, and more reliable than make. An implementation of djb's redo.

redo - a recursive build system Smaller, easier, more powerful, and more reliable than make. This is an implementation of Daniel J. Bernstein's redo b

1.7k Jan 04, 2023
A small clone of GNU Make based on file checksums

Pyke This weekend project is a small clone (most of the code is in a single file of just about 200LoC) of GNU Make with the twist that it rebuilds a t

Antonio De Lucreziis 3 Nov 24, 2021
🔨🐍Make-like build automation tool for Python projects with extensive DSL features.

Pyke (WIP, Beta Release) Make-like build automation tool for Python projects with extensive DSL features. Features: Users can specify tasks, subtasks,

Ire 17 Jul 05, 2022
This is a python helper package for Telebirr H5 Web payment integration helper.

Project Glow Greetings, I see you have stumbled upon project glow. Project glow is an open source bot worked on by many people to create a good and sa

24 Dec 13, 2022
The official binary distribution format for Python

wheel This library is the reference implementation of the Python wheel packaging standard, as defined in PEP 427. It has two different roles: A setupt

Python Packaging Authority 368 Dec 23, 2022
PlatformIO is a professional collaborative platform for embedded development :alien: A place where Developers and Teams have true Freedom! No more vendor lock-in!

PlatformIO Quick Links: Web | PlatformIO IDE | Project Examples | Docs | Donate | Contact Us Social: LinkedIn | Twitter | Facebook | Community Forums

PlatformIO 6.5k Jan 08, 2023
Python program for installing many tools automatically

Tool Installer is a script made with python which help user in installing tools automatically

Spider Anongreyhat 6 Mar 13, 2022
This is a simple tool for bootstrapping Chimera systems from binaries. For source builds, you want cports.

chimera-bootstrap This is a simple tool for bootstrapping Chimera systems from binaries. For source builds, you want cports. Simple usage: $ # run as

Chimera Linux 7 Feb 11, 2022
Python package used on Hardfight projects to make building, testing and deploying easy.

Hardfight Devtools Build, test and deploy Hardfight projects easly 💡 What is it Devtools is a Python tool to make building, testing and deploying int

Hardfight 1 Dec 05, 2021
Pythonic task management & command execution.

Welcome to Invoke! Invoke is a Python (2.7 and 3.4+) library for managing shell-oriented subprocesses and organizing executable Python code into CLI-i

3.8k Jan 06, 2023
bitbake tool

Bitbake ======= BitBake is a generic task execution engine that allows shell and Python tasks to be run efficiently and in parallel while working wit

openembedded 336 Dec 27, 2022
The Meson Build System

Meson® is a project to create the best possible next-generation build system. Status Dependencies Python (version 3.6 or newer) Ninja (version 1.8.2 o

The Meson Build System 4.4k Jan 02, 2023
Buildout is a deployment automation tool written in and extended with Python

Buildout Buildout is a project designed to solve 2 problems: Application-centric assembly and deployment Assembly runs the gamut from stitching togeth

buildout 552 Nov 26, 2022
the blessed package to manage your versions by scm tags

setuptools_scm setuptools_scm handles managing your Python package versions in SCM metadata instead of declaring them as the version argument or in a

Python Packaging Authority 671 Jan 08, 2023
Utilities for interacting with PyPI

twine Twine is a utility for publishing Python packages on PyPI. It provides build system independent uploads of source and binary distribution artifa

Python Packaging Authority 1.4k Jan 05, 2023
Dev is a Makefile replacement for modern development environments

Dev Dev is a Makefile replacement for modern development environments. Dev let's

Mason Data 9 Dec 09, 2022