Skip to content

Commit

Permalink
Merge pull request #216 from jacebrowning/release/v2.0
Browse files Browse the repository at this point in the history
Release v2.0
  • Loading branch information
jacebrowning authored Apr 13, 2020
2 parents 9ba97be + 4afe028 commit ee7ec67
Show file tree
Hide file tree
Showing 22 changed files with 908 additions and 864 deletions.
2 changes: 0 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ environment:
global:
RANDOM_SEED: 0
matrix:
- PYTHON_MAJOR: 3
PYTHON_MINOR: 6
- PYTHON_MAJOR: 3
PYTHON_MINOR: 7
- PYTHON_MAJOR: 3
Expand Down
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ not_skip = __init__.py
multi_line_output = 3

known_standard_library = dataclasses,typing_extensions
known_third_party = click,log
known_third_party = click,log,datafiles
known_first_party = gitman

combine_as_imports = true
Expand Down
2 changes: 2 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ no_implicit_optional = true
check_untyped_defs = true

cache_dir = .cache/mypy/

plugins = datafiles.plugins:mypy
6 changes: 5 additions & 1 deletion .pylint.ini
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ disable=
redefined-builtin,
too-many-public-methods,
bad-continuation,
subprocess-run-check,
no-member,
not-an-iterable,
unsupported-assignment-operation,
unsubscriptable-object,
too-many-instance-attributes,

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ dist: xenial

language: python
python:
- 3.6
- 3.7
- 3.8

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 2.0 (2020-04-13)

- **BREAKING**: Removed legacy `gdm` CLI entry point.
- **BREAKING**: Dropped support for Python 3.6.
- Switched to `datafiles` for YAML serialization.

# 1.8 (2020-04-04)

- Added support Python 3.8.
Expand Down
168 changes: 84 additions & 84 deletions gitman.yml
Original file line number Diff line number Diff line change
@@ -1,88 +1,88 @@
location: demo
sources:
- name: gitman_1
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: example-branch
link:
scripts:
- cat .noserc
- make foobar
- name: gitman_2
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: example-tag
link:
scripts:
-
- name: gitman_3
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: master@{2015-06-18 11:11:11}
link:
scripts:
- echo "Hello, World!"
- pwd
- name: gitman_4
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: example-branch-2
link:
scripts:
-
- name: gitman_1
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: example-branch
link:
scripts:
- cat .noserc
- make foobar
- name: gitman_2
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: example-tag
link:
scripts:
-
- name: gitman_3
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: master@{2015-06-18 11:11:11}
link:
scripts:
- echo "Hello, World!"
- pwd
- name: gitman_4
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: example-branch-2
link:
scripts:
-
sources_locked:
- name: gitman_1
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: 1de84ca1d315f81b035cd7b0ecf87ca2025cdacd
link:
scripts:
- cat .noserc
- make foobar
- name: gitman_2
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: 7bd138fe7359561a8c2ff9d195dff238794ccc04
link:
scripts:
-
- name: gitman_3
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: 2da24fca34af3748e3cab61db81a2ae8b35aec94
link:
scripts:
- echo "Hello, World!"
- pwd
- name: gitman_4
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: f50c1ac8bf27377625b0cc93ea27f8069c7b513a
link:
scripts:
-
- name: gitman_1
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: 1de84ca1d315f81b035cd7b0ecf87ca2025cdacd
link:
scripts:
- cat .noserc
- make foobar
- name: gitman_2
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: 7bd138fe7359561a8c2ff9d195dff238794ccc04
link:
scripts:
-
- name: gitman_3
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: 2da24fca34af3748e3cab61db81a2ae8b35aec94
link:
scripts:
- echo "Hello, World!"
- pwd
- name: gitman_4
type: git
repo: https://github.com/jacebrowning/gitman-demo
sparse_paths:
-
rev: f50c1ac8bf27377625b0cc93ea27f8069c7b513a
link:
scripts:
-
groups:
- name: group_a
members:
- gitman_1
- gitman_4
- name: group_b
members:
- gitman 2
- gitman_3
- name: group_a
members:
- gitman_1
- gitman_4
- name: group_b
members:
- gitman 2
- gitman_3
1 change: 0 additions & 1 deletion gitman/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ def _run_command(function, args, kwargs):


def _show_error(exception):
# TODO: require level=, evaluate all calls to dedent()
common.dedent(0)
common.newline()
common.show(str(exception), color='error')
Expand Down
4 changes: 2 additions & 2 deletions gitman/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ def init():
else:
config = Config()
source = Source(
'git',
type='git',
name="sample_dependency",
repo="https://github.com/githubtraining/hellogitworld",
)
config.sources.append(source)
source = source.lock(rev="ebbbf773431ba07510251bb03f9525c7bab2b13a")
config.sources_locked.append(source)
config.save()
config.datafile.save()

msg = "Created sample config file: {}".format(config.path)
common.show(msg, color='success')
Expand Down
3 changes: 2 additions & 1 deletion gitman/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ def configure_logging(count=0):
verbose_format = settings.VERBOSE2_LOGGING_FORMAT

# Set a custom formatter
log.reset()
log.init(level=level)
log.silence('yorm', allow_warning=True)
log.silence('datafiles', allow_warning=True)
logging.captureWarnings(True)
formatter = WarningFormatter(
default_format, verbose_format, datefmt=settings.LOGGING_DATEFMT
Expand Down
4 changes: 2 additions & 2 deletions gitman/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def clone(type, repo, path, *, cache=settings.CACHE, sparse_paths=None, rev=None
if not settings.CACHE_DISABLE and not os.path.isdir(reference):
git('clone', '--mirror', repo, reference)

if sparse_paths:
if sparse_paths and sparse_paths[0]:
os.mkdir(normpath)
git('-C', normpath, 'init')
git('-C', normpath, 'config', 'core.sparseCheckout', 'true')
Expand Down Expand Up @@ -256,7 +256,7 @@ def get_branch():

def _get_sha_from_rev(rev):
"""Get a rev-parse string's hash."""
if '@{' in rev: # TODO: use regex for this
if '@{' in rev:
parts = rev.split('@')
branch = parts[0]
date = parts[1].strip("{}")
Expand Down
Loading

0 comments on commit ee7ec67

Please sign in to comment.