Skip to content

Commit a23057b

Browse files
committed
Make codebase python 3.7 safe, version bump 0.1.5
1 parent 4dc028f commit a23057b

8 files changed

Lines changed: 188 additions & 139 deletions

File tree

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export TWINE_USERNAME=nonlogicaldev
2+
export VERSION=$(shell pipenv run python -c 'exec(open("dotter/version.py").read()); print(__version__)')
23

34
.PHONY: install
45
install:
@@ -18,6 +19,9 @@ clean:
1819
-rm -rf dist
1920
-rm -rf *.egg-info
2021

22+
pip.tag:
23+
git tag $(VERSION)
24+
2125
pip.release: clean dist
2226
pipenv run twine upload --repository testpypi dist/*
2327

Pipfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[requires]
2-
python_version = "3.8"
3-
4-
[script]
5-
dotter = "python bin/dotter"
2+
python_version = "3.7"
63

74
[[source]]
85
name = "pypi"
96
url = "https://pypi.org/simple"
107
verify_ssl = true
118

12-
[dev-packages]
13-
twine = "*"
9+
[script]
10+
dotter = "python bin/dotter"
1411

1512
[packages]
16-
dotter = {editable = true,path = "."}
13+
dotter = {editable = true, path = "."}
14+
15+
[dev-packages]
16+
twine = "*"

Pipfile.lock

Lines changed: 84 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dotter/__init__.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from dataclasses import asdict
66
from pprint import pprint
77

8-
from .config import Config, compute_operations, LINK_MODE_COPY
8+
from .config import compute_operations, Config
99
from .sync_plan import SyncError
1010
from .version import __version__
1111

@@ -86,6 +86,11 @@ def run(cls, parser: ArgumentParser):
8686
)
8787
config_list_cmd.set_defaults(run=App.run_config_list)
8888

89+
config_list_cmd.add_argument(
90+
"--detailed", action="store_true",
91+
help="print detailed sync plan"
92+
)
93+
8994
config_list_cmd.add_argument("path", metavar="PATHS", nargs="?")
9095

9196
##################################################
@@ -132,7 +137,7 @@ def run_config_root(**kwargs):
132137
return
133138

134139
@staticmethod
135-
def run_config_list(path: Optional[str], **kwargs):
140+
def run_config_list(path: Optional[str], detailed: bool, **kwargs):
136141
if path is None:
137142
for category in Config.categories():
138143
print(f"Category({category}):")
@@ -157,10 +162,9 @@ def run_config_list(path: Optional[str], **kwargs):
157162
print(f" Path({op.src_path})")
158163
print(f" {op}")
159164

160-
# compute_operations(conf).items()
161-
#
162-
# for f in filter(lambda p: p.is_file(), path.glob("**/*")):
163-
# print(f"Path({f.relative_to(conf.config.root)})")
165+
if detailed:
166+
for plan in op.reconcile():
167+
print(f" {plan}")
164168

165169
@staticmethod
166170
def run_config_dump(category: str, **kwargs):

0 commit comments

Comments
 (0)