Skip to content

Commit

Permalink
Merge branch 'lra:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
grigorii-horos authored Feb 18, 2024
2 parents 4e4a569 + ca38f2a commit d2bb6a1
Show file tree
Hide file tree
Showing 33 changed files with 108 additions and 690 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ jobs:
- macos-11
- macos-12
- macos-13
- macos-14
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: pip install .
- run: pip3 install .
- run: mackup --help
2 changes: 1 addition & 1 deletion .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:

mdl:
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/lint.yaml → .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ on:

jobs:

black:
ruff:
runs-on: ubuntu-latest
container: python
steps:
- run: pip install black
- uses: actions/checkout@v4
- run: black --check --target-version py310 .
- uses: chartboost/ruff-action@v1
12 changes: 2 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@ on:

jobs:

nose-2_7:
runs-on: ubuntu-latest
container: python:2.7
steps:
- run: pip install docopt six nose
- uses: actions/checkout@v4
- run: nosetests --with-coverage --cover-tests --cover-inclusive --cover-branches --cover-package=mackup

nose:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -24,7 +16,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
# - "3.12" # Installing numpy (1.24.4): Failed
- "3.12"
container: python:${{ matrix.python-version }}
steps:
- run: echo "${HOME}/.local/bin" >> $GITHUB_PATH
Expand Down
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@
*.pyc

# Generated by make release
/mackup.egg-info/
/dist/

# Generated by make test
/.coverage

# Used by pyenv
/.python-version
1 change: 1 addition & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/
4 changes: 0 additions & 4 deletions .mdl_style.rb

This file was deleted.

1 change: 0 additions & 1 deletion .mdlrc

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
## WIP

- Added support for DBeaver (via @or-tal-0)
- Added support for rtx (via @dnicolson)
- Add support for new TOML config for Alacritty (via @syphar)
- Remove dependency on the six package
- Add support for JankyBorders (via @LarsRefsgaard)
- Add support for AeroSpace (via @LarsRefsgaard)
- Add support for SketchyBar (via @LarsRefsgaard)

## Mackup 0.8.40

Expand Down
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
lint:
# Install mdl with "gem install mdl"
mdl .
markdownlint -c .markdownlint.yaml '**/*.md'

test:
poetry install --with dev
poetry run nosetests --with-coverage --cover-branches --cover-package=mackup
poetry run pytest

clean:
rm -rf __pycache__
rm -rf mackup/__pycache__
rm -rf tests/__pycache__
rm -rf dist/
Expand All @@ -16,5 +14,5 @@ release: clean
poetry build
poetry publish

black:
black --target-version py310 .
ruff:
ruff check .
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

Keep your application settings in sync.

[![Run tests](https://github.com/lra/mackup/actions/workflows/test.yaml/badge.svg)](https://github.com/lra/mackup/actions/workflows/test.yaml)
[![snapcraft](https://snapcraft.io/mackup/badge.svg)](https://snapcraft.io/mackup)

## Table of content

- [Mackup](#mackup)
Expand Down Expand Up @@ -178,6 +175,7 @@ See the [README](doc/README.md) file in the doc directory for more info.
- [Adobe Photoshop Lightroom CC](https://www.adobe.com/products/photoshop-lightroom.html)
- [Adobe Photoshop Lightroom Classic](https://www.adobe.com/de/products/photoshop-lightroom-classic.html)
- [aerc](https://aerc-mail.org/)
- [AeroSpace](https://github.com/nikitabobko/AeroSpace)
- [Affinity Designer](https://affinity.serif.com/designer)
- [Affinity Photo](https://affinity.serif.com/photo)
- [Affinity Publisher](https://affinity.serif.com/publisher)
Expand Down Expand Up @@ -390,6 +388,7 @@ See the [README](doc/README.md) file in the doc directory for more info.
- [iTerm2](https://www.iterm2.com/)
- [iTermocil](https://github.com/TomAnthony/itermocil)
- [iTunes Scripts](https://www.apple.com/)
- [JankyBorders](https://github.com/FelixKratz/JankyBorders)
- [Janus](https://github.com/carlhuda/janus)
- [Jitouch](http://www.jitouch.com/)
- [Joplin](https://joplinapp.org/)
Expand Down Expand Up @@ -563,7 +562,6 @@ See the [README](doc/README.md) file in the doc directory for more info.
- [R](http://www.r-project.org/)
- [Rails](http://rubyonrails.org/)
- [Ranger](https://ranger.github.io/)
- [Raycast](https://raycast.com/)
- [Rbenv](https://www.github.com/rbenv/rbenv)
- [Rclone](https://rclone.org/)
- [Rectangle](https://rectangleapp.com/)
Expand All @@ -579,6 +577,7 @@ See the [README](doc/README.md) file in the doc directory for more info.
- [Royal TSX](http://www.royaltsx.com/ts/osx/features)
- [RStudio](https://www.rstudio.com/)
- [rTorrent](http://libtorrent.rakshasa.no/)
- [rtx](https://github.com/jdx/rtx)
- [rubiTrack 5](https://www.rubitrack.com)
- [Rubocop](https://github.com/bbatsov/rubocop)
- [Ruby Version Manager](https://rvm.io/)
Expand Down Expand Up @@ -608,6 +607,7 @@ See the [README](doc/README.md) file in the doc directory for more info.
- [Shuttle](http://fitztrev.github.io/shuttle/)
- [SizeUp](http://www.irradiatedsoftware.com/sizeup/)
- [Sizzy](https://sizzy.co/)
- [SketchyBar](https://felixkratz.github.io/SketchyBar/)
- [skhd](https://github.com/koekeishiya/skhd/)
- [Skim](http://skim-app.sourceforge.net/)
- [Skitch](https://evernote.com/skitch/)
Expand Down
1 change: 0 additions & 1 deletion codecov.yml

This file was deleted.

12 changes: 1 addition & 11 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vi ~/.mackup.cfg
You can specify the storage type Mackup will use to store your configuration
files.

For now, you have 4 options: `dropbox`, `google_drive`, `icloud`, `copy` and `file_system`.
For now, you have 4 options: `dropbox`, `google_drive`, `icloud` and `file_system`.

If none is specified, Mackup will try to use the default: `dropbox`.
With the `dropbox` storage engine, Mackup will automatically figure out your
Expand Down Expand Up @@ -47,16 +47,6 @@ configuration files in the `~/Library/Mobile\ Documents/com\~apple\~CloudDocs/`
engine = icloud
```

### Copy

If you choose the `copy` storage engine, Mackup will figure out
where your Copy folder is and store your configuration files in it.

```ini
[storage]
engine = copy
```

### File System

If you want to specify another directory, you can use the `file_system` engine
Expand Down
23 changes: 7 additions & 16 deletions doc/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,17 @@
# Install a recent non-system python
brew install python

# Install pyenv to be able to easily switch Python versions
brew install pyenv
# Install pipx to be able to easily run isolated Python packages
brew install pipx

# Install the package and virtualenv manager
brew install pipenv

# Install the most recent Python
pyenv install 3.7.4
# Install the tool for dependency management and packaging in Python
pipx install poetry

# Setup local dev
cd .../mackup
pyenv local 3.7.4
pipenv install
pipenv shell
make develop
poetry install --with dev

# You can now edit files and see the impact of your changes
mackup --version
nosetests

# Cleanup
make undevelop
poetry run mackup --version
make test
```
2 changes: 1 addition & 1 deletion mackup/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
An Application Profile contains all the information about an application in
Mackup. Name, files, ...
"""

import os

from .mackup import Mackup
from . import utils


class ApplicationProfile(object):

"""Instantiate this class with application specific data."""

def __init__(self, mackup, files, dry_run, verbose):
Expand Down
5 changes: 5 additions & 0 deletions mackup/applications/aerospace.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[application]
name = aerospace

[configuration_files]
.aerospace.toml
2 changes: 2 additions & 0 deletions mackup/applications/alacritty.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = Alacritty

[configuration_files]
.alacritty.yml
.alacritty.toml

[xdg_configuration_files]
alacritty/alacritty.yml
alacritty/alacritty.toml
5 changes: 5 additions & 0 deletions mackup/applications/jankyborders.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[application]
name = Janky Borders

[xdg_configuration_files]
borders/bordersrc
5 changes: 0 additions & 5 deletions mackup/applications/raycast.cfg

This file was deleted.

16 changes: 16 additions & 0 deletions mackup/applications/rtx.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[application]
name = rtx

[xdg_configuration_files]
rtx

[configuration_files]
.rtx.toml
.tool-versions
.default-go-packages
.default-gems
.default-nodejs-packages
.default-node-packages
.default-npm-packages
.default-python-packages
.default-mix-commands
6 changes: 6 additions & 0 deletions mackup/applications/sketchybar.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[application]
name = SketchyBar

[xdg_configuration_files]
sketchybar/sketchybarrc
sketchybar/plugins
2 changes: 1 addition & 1 deletion mackup/appsdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
The Applications Database provides an easy to use interface to load application
data from the Mackup Database (files).
"""

import os

try:
Expand All @@ -17,7 +18,6 @@


class ApplicationsDatabase(object):

"""Database containing all the configured applications."""

def __init__(self):
Expand Down
2 changes: 0 additions & 2 deletions mackup/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@


class Config(object):

"""The Mackup Config class."""

def __init__(self, filename=None):
Expand Down Expand Up @@ -276,7 +275,6 @@ def _parse_apps_to_sync(self):


class ConfigError(Exception):

"""Exception used for handle errors in the configuration."""

pass
1 change: 1 addition & 0 deletions mackup/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Constants used in Mackup."""

# Current version
VERSION = "0.8.40"

Expand Down
2 changes: 1 addition & 1 deletion mackup/mackup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
runtime. It also provides easy to use interface that is used by the Mackup UI.
The only UI for now is the command line.
"""

import os
import os.path
import shutil
Expand All @@ -16,7 +17,6 @@


class Mackup(object):

"""Main Mackup class."""

def __init__(self):
Expand Down
1 change: 1 addition & 0 deletions mackup/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
See https://github.com/lra/mackup/tree/master/doc for more information.
"""

from docopt import docopt
from .appsdb import ApplicationsDatabase
from .application import ApplicationProfile
Expand Down
2 changes: 1 addition & 1 deletion mackup/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""System static utilities being used by the modules."""

import base64
import os
import platform
Expand All @@ -7,7 +8,6 @@
import subprocess
import sys
import sqlite3
from six.moves import input

from . import constants

Expand Down
Loading

0 comments on commit d2bb6a1

Please sign in to comment.