Skip to content

Commit ab6da28

Browse files
committed
Merge pull request #46 from jacebrowning/release/v0.4
Release v0.4
2 parents 421f895 + 668c550 commit ab6da28

23 files changed

Lines changed: 661 additions & 285 deletions

.pylintrc

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
[MESSAGES CONTROL]
22

3-
# I0011: Locally disabling warning
4-
# W0142: Used * or ** magic
5-
# W0511: TODO in comments
6-
# RO903: Too few public methods
7-
# R0904: Too many public methods
8-
# C0103: Invalid constant name
9-
# R0901: Too many ancestors
10-
disable=I0011,W0142,W0511,R0903,R0904,C0103,R0901
11-
12-
[REPORTS]
13-
14-
reports=no
15-
16-
msg-template={msg_id}:{line:3d},{column}:{msg}
3+
disable=locally-disabled,fixme,too-few-public-methods,too-many-public-methods,invalid-name,global-statement,too-many-ancestors
174

185
[FORMAT]
196

207
max-line-length=80
218

229
ignore-long-lines=^.*((https?:)|(pragma:)|(TODO:)).*$
10+
11+
[REPORTS]
12+
13+
reports=no
14+
15+
msg-template={msg_id} ({symbol}):{line:3d},{column}: {msg}

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ language: python
44
python:
55
- 3.3
66
- 3.4
7+
- 3.5
78

89
cache: pip
910

1011
before_install:
1112
- sudo add-apt-repository ppa:git-core/ppa -y
1213
- sudo apt-get update
14+
env:
15+
global:
16+
- RANDOM_SEED=12345
1317

1418
install:
1519
- sudo apt-get install git; git --version

CHANGES.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Revision History
22
================
33

4+
0.4 (2015/09/18)
5+
----------------
6+
7+
- Replaced 'install' command with 'update'.
8+
- Updated 'install' command to use locked dependency versions.
9+
- Now sorting sources after a successful 'update'.
10+
- Now requiring '--force' to 'uninstall' with uncommitted changes.
11+
- Updated 'list' command to show full shell commands.
12+
413
0.3.1 (2015/09/09)
514
------------------
615

@@ -9,34 +18,34 @@ Revision History
918
0.3 (2015/06/26)
1019
----------------
1120

12-
- Add '--no-clean' option to disable removing untracked files.
13-
- Add support for `rev-parse` dates as the dependency `rev`.
21+
- Added '--no-clean' option to disable removing untracked files.
22+
- Added support for `rev-parse` dates as the dependency `rev`.
1423

1524
0.2.5 (2015/06/15)
1625
------------------
1726

18-
- Hide warnings with '--quiet' option.
27+
- Added '--quiet' option to hide warnings.
1928

2029
0.2.4 (2015/05/19)
2130
------------------
2231

23-
- Hide YORM logging bellow warnings.
32+
- Now hiding YORM logging bellow warnings.
2433

2534
0.2.3 (2015/05/17)
2635
------------------
2736

28-
- Upgrade to YORM v0.4
37+
- Upgraded to YORM v0.4.
2938

3039
0.2.2 (2015/05/04)
3140
------------------
3241

33-
- Require YORM < v0.4
42+
- Specified YORM < v0.4.
3443

3544
0.2.1 (2015/03/12)
3645
------------------
3746

38-
- Automatically track dependencies that are on branches.
39-
- Require '--force' when there are untracked files.
47+
- Added automatic remote branch tracking in dependencies.
48+
- Now requiring '--force' when there are untracked files.
4049

4150
0.2 (2015/03/10)
4251
----------------

Makefile

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PYTHON_MAJOR ?= 3
99
PYTHON_MINOR ?= 4
1010

1111
# Test settings
12-
UNIT_TEST_COVERAGE := 77
12+
UNIT_TEST_COVERAGE := 72
1313
INTEGRATION_TEST_COVERAGE := 52
1414
COMBINED_TEST_COVERAGE := 94
1515

@@ -82,6 +82,11 @@ $(ALL_FLAG): $(SOURCES)
8282
.PHONY: ci
8383
ci: check test tests
8484

85+
.PHONY: watch
86+
watch: depends-dev .clean-test
87+
@ rm -rf $(FAILED_FLAG)
88+
$(SNIFFER)
89+
8590
# Development Installation #####################################################
8691

8792
.PHONY: env
@@ -163,39 +168,44 @@ check: pep8 pep257 pylint
163168

164169
.PHONY: pep8
165170
pep8: depends-ci
166-
$(PEP8) $(PACKAGE) --config=.pep8rc
171+
$(PEP8) $(PACKAGE) tests --config=.pep8rc
167172

168173
.PHONY: pep257
169174
pep257: depends-ci
170-
# D102: docstring missing (checked by PyLint)
171-
# D202: No blank lines allowed *after* function docstring
172-
$(PEP257) $(PACKAGE) --ignore=D102,D202
175+
# D102/D103: docstring missing (checked by PyLint)
176+
# D202: No blank lines allowed *after* function docstring (personal preference)
177+
# D203: 1 blank line required before class (deprecated warning)
178+
$(PEP257) $(PACKAGE) tests --ignore=D102,D103,D202,D203
173179

174180
.PHONY: pylint
175181
pylint: depends-ci
176-
$(PYLINT) $(PACKAGE) --rcfile=.pylintrc --disable=C0111
182+
# These warnings shouldn't fail builds, but warn in editors:
183+
# C0111: Line too long
184+
# R0913: Too many arguments
185+
# R0914: Too many local variables
186+
$(PYLINT) $(PACKAGE) tests --rcfile=.pylintrc --disable=missing-docstring,too-many-statements
177187

178188
.PHONY: fix
179189
fix: depends-dev
180190
$(PEP8RADIUS) --docformatter --in-place
181191

182192
# Testing ######################################################################
183193

184-
TIMESTAMP := $(shell date +%s)
194+
RANDOM_SEED ?= $(shell date +%s)
185195

186196
PYTEST_CORE_OPTS := --doctest-modules --verbose -r X --maxfail=3
187197
PYTEST_COV_OPTS := --cov=$(PACKAGE) --cov-report=term-missing --no-cov-on-fail
188-
PYTEST_RANDOM_OPTS := --random --random-seed=$(TIMESTAMP)
198+
PYTEST_RANDOM_OPTS := --random --random-seed=$(RANDOM_SEED)
189199

190200
PYTEST_OPTS := $(PYTEST_CORE_OPTS) $(PYTEST_COV_OPTS) $(PYTEST_RANDOM_OPTS)
191201
PYTEST_OPTS_FAILFAST := $(PYTEST_OPTS) --failed --exitfirst
192202

193-
FAILED := .pytest/failed
203+
FAILED_FLAG := .pytest/failed
194204

195205
.PHONY: test test-unit
196206
test: test-unit
197207
test-unit: depends-ci
198-
@ if test -e $(FAILED); then $(MAKE) test-all; fi
208+
@ if test -e $(FAILED_FLAG); then $(MAKE) test-all; fi
199209
@ $(COVERAGE) erase
200210
$(PYTEST) $(PYTEST_OPTS) $(PACKAGE)
201211
ifndef TRAVIS
@@ -204,39 +214,34 @@ endif
204214

205215
.PHONY: test-int
206216
test-int: depends-ci
207-
@ if test -e $(FAILED); then $(MAKE) test-all; fi
217+
@ if test -e $(FAILED_FLAG); then $(MAKE) test-all; fi
208218
@ $(COVERAGE) erase
209219
TEST_INTEGRATION=1 $(PYTEST) $(PYTEST_OPTS_FAILFAST) tests
210220
ifndef TRAVIS
211-
@ rm -rf $(FAILED) # next time, don't run the previously failing test
221+
@ rm -rf $(FAILED_FLAG) # next time, don't run the previously failing test
212222
$(COVERAGE) html --directory htmlcov --fail-under=$(INTEGRATION_TEST_COVERAGE)
213223
endif
214224

215225
.PHONY: tests test-all
216226
tests: test-all
217227
test-all: depends-ci
218-
@ if test -e $(FAILED); then $(PYTEST) --failed $(PACKAGE) tests; fi
228+
@ if test -e $(FAILED_FLAG); then $(PYTEST) --failed $(PACKAGE) tests; fi
219229
@ $(COVERAGE) erase
220230
TEST_INTEGRATION=1 $(PYTEST) $(PYTEST_OPTS_FAILFAST) $(PACKAGE) tests
221231
ifndef TRAVIS
222-
@ rm -rf $(FAILED) # next time, don't run the previously failing test
232+
@ rm -rf $(FAILED_FLAG) # next time, don't run the previously failing test
223233
$(COVERAGE) html --directory htmlcov --fail-under=$(COMBINED_TEST_COVERAGE)
224234
endif
225235

226236
.PHONY: read-coverage
227237
read-coverage:
228238
$(OPEN) htmlcov/index.html
229239

230-
.PHONY: watch
231-
watch: depends-dev .clean-test
232-
@ rm -rf $(FAILED)
233-
$(SNIFFER)
234-
235240
# Cleanup ######################################################################
236241

237242
.PHONY: clean
238243
clean: .clean-dist .clean-test .clean-doc .clean-build
239-
rm -rf $(ALL)
244+
rm -rf $(ALL_FLAG)
240245

241246
.PHONY: clean-env
242247
clean-env: clean
@@ -274,7 +279,7 @@ register-test: doc
274279
$(PYTHON) setup.py register --strict --repository https://testpypi.python.org/pypi
275280

276281
.PHONY: upload-test
277-
upload-test: .git-no-changes register-test
282+
upload-test: register-test
278283
$(PYTHON) setup.py sdist upload --repository https://testpypi.python.org/pypi
279284
$(PYTHON) setup.py bdist_wheel upload --repository https://testpypi.python.org/pypi
280285
$(OPEN) https://testpypi.python.org/pypi/$(PROJECT)
@@ -291,7 +296,7 @@ upload: .git-no-changes register
291296

292297
.PHONY: .git-no-changes
293298
.git-no-changes:
294-
@if git diff --name-only --exit-code; \
299+
@ if git diff --name-only --exit-code; \
295300
then \
296301
echo Git working copy is clean...; \
297302
else \

README.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,28 @@ $ echo .gdm >> .gitignore
5757
Basic Usage
5858
===========
5959

60-
Get the specified versions of all dependencies:
60+
See the available commands:
6161

6262
```
63-
$ gdm install
63+
$ gdm --help
64+
```
65+
66+
Updating Dependencies
67+
---------------------
68+
69+
Get the latest versions of all dependencies:
70+
71+
```
72+
$ gdm update
6473
```
6574

6675
which will essentially:
6776

6877
1. create a working tree at _root_/`location`/`dir`
6978
2. fetch from `repo` and checkout the specified `rev`
70-
3. symbolicly link each `location`/`dir` from _root_/`link` (optional)
79+
3. symbolically link each `location`/`dir` from _root_/`link` (optional)
7180
4. repeat for all nested working trees containing a configuration file
81+
5. record the actual commit SHAs that were checked out
7282

7383
where `rev` can be:
7484

@@ -77,13 +87,25 @@ where `rev` can be:
7787
* a branch: `master`
7888
* a `rev-parse` date: `'develop@{2015-06-18 10:30:59}'`
7989

80-
To display the specific versions installed:
90+
Restoring Previous Versions
91+
---------------------------
92+
93+
Display the specific revisions that are currently installed:
8194

8295
```
8396
$ gdm list
8497
```
8598

86-
To remove all installed dependencies:
99+
Reinstall these specific versions at a later time:
100+
101+
```
102+
$ gdm install
103+
```
104+
105+
Deleting Dependencies
106+
---------------------
107+
108+
Remove all installed dependencies:
87109

88110
```
89111
$ gdm uninstall

gdm/__init__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@
33
import sys
44

55
__project__ = 'GDM'
6-
__version__ = '0.3.1'
6+
__version__ = '0.4'
77

88
CLI = 'gdm'
9-
VERSION = __project__ + '-' + __version__
10-
DESCRIPTION = 'A very basic language-agnostic "dependency manager" using Git.'
9+
VERSION = __project__ + ' v' + __version__
10+
DESCRIPTION = "A language-agnostic \"dependency manager\" using Git."
1111

1212
PYTHON_VERSION = 3, 3
1313

1414
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (manual test)
1515
exit("Python {}.{}+ is required.".format(*PYTHON_VERSION))
1616

1717
try:
18-
from .commands import install, uninstall
18+
from .commands import install
19+
from .commands import update
20+
from .commands import display as list # pylint: disable=redefined-builtin
21+
from .commands import delete as uninstall
1922
except ImportError: # pragma: no cover (manual test)
2023
pass

0 commit comments

Comments
 (0)