Skip to content

Commit

Permalink
Fixed handling remote compositions and git clones.
Browse files Browse the repository at this point in the history
  • Loading branch information
coordt committed Jun 17, 2022
1 parent 5f68737 commit ee142bd
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 6 deletions.
11 changes: 8 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@ repos:
hooks:
- id: interrogate
exclude: (_vendor|test).*
- repo: https://github.com/jazzband/pip-tools
rev: 6.6.2
- repo: local
hooks:
- id: pip-compile
- id: check-dependencies
name: check-dependencies
language: python
entry: make -C requirements all
files: ^requirements.*?\.(in|txt)$
pass_filenames: false
additional_dependencies:
- pip-tools
2 changes: 1 addition & 1 deletion cookie_composer/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def render_layer(
del full_context["_copy_without_render"]

context = generate_context(
context_file=Path(layer_config.template) / "cookiecutter.json",
context_file=Path(repo_dir) / "cookiecutter.json",
default_context=config_dict["default_context"],
extra_context=full_context,
)
Expand Down
2 changes: 1 addition & 1 deletion requirements/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ outputs := $(objects:.in=.txt)
all: $(outputs)

%.txt: %.in
pip-compile --verbose --output-file $@ $<
pip-compile --quiet --output-file $@ $<

prod.txt: cookiecutter.txt

Expand Down
27 changes: 27 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
#
# pip-compile --output-file=dev.txt dev.in
#
aiohttp==3.8.1
# via -r test.txt
aiosignal==1.2.0
# via
# -r test.txt
# aiohttp
alabaster==0.7.12
# via
# -r docs.txt
Expand All @@ -14,9 +20,14 @@ arrow==1.2.2
# via
# -r test.txt
# jinja2-time
async-timeout==4.0.2
# via
# -r test.txt
# aiohttp
attrs==21.4.0
# via
# -r test.txt
# aiohttp
# jsonschema
# pytest
babel==2.10.1
Expand Down Expand Up @@ -50,6 +61,7 @@ charset-normalizer==2.0.12
# via
# -r docs.txt
# -r test.txt
# aiohttp
# requests
click==8.1.3
# via
Expand Down Expand Up @@ -85,6 +97,11 @@ filelock==3.7.1
# virtualenv
flake8==4.0.1
# via -r test.txt
frozenlist==1.3.0
# via
# -r test.txt
# aiohttp
# aiosignal
fsspec==2022.5.0
# via -r test.txt
furo==2022.6.4.1
Expand Down Expand Up @@ -112,6 +129,7 @@ idna==3.3
# -r docs.txt
# -r test.txt
# requests
# yarl
imagesize==1.3.0
# via
# -r docs.txt
Expand Down Expand Up @@ -162,6 +180,11 @@ mdurl==0.1.1
# markdown-it-py
more-itertools==8.13.0
# via generate-changelog
multidict==6.0.2
# via
# -r test.txt
# aiohttp
# yarl
mypy-extensions==0.4.3
# via
# -r test.txt
Expand Down Expand Up @@ -381,6 +404,10 @@ virtualenv==20.14.1
# pre-commit
wheel==0.37.1
# via pip-tools
yarl==1.7.2
# via
# -r test.txt
# aiohttp
zipp==3.8.0
# via
# -r docs.txt
Expand Down
1 change: 1 addition & 0 deletions requirements/prod.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
-r cookiecutter.txt

aiohttp
fsspec
gitpython
pydantic
Expand Down
20 changes: 20 additions & 0 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@
#
# pip-compile --output-file=prod.txt prod.in
#
aiohttp==3.8.1
# via -r prod.in
aiosignal==1.2.0
# via aiohttp
arrow==1.2.2
# via
# -r cookiecutter.txt
# jinja2-time
async-timeout==4.0.2
# via aiohttp
attrs==21.4.0
# via aiohttp
binaryornot==0.4.4
# via -r cookiecutter.txt
certifi==2022.5.18.1
Expand All @@ -21,13 +29,18 @@ chardet==4.0.0
charset-normalizer==2.0.12
# via
# -r cookiecutter.txt
# aiohttp
# requests
click==8.1.3
# via
# -r cookiecutter.txt
# rich-click
commonmark==0.9.1
# via rich
frozenlist==1.3.0
# via
# aiohttp
# aiosignal
fsspec==2022.5.0
# via -r prod.in
gitdb==4.0.9
Expand All @@ -38,6 +51,7 @@ idna==3.3
# via
# -r cookiecutter.txt
# requests
# yarl
jinja2==3.1.2
# via
# -r cookiecutter.txt
Expand All @@ -48,6 +62,10 @@ markupsafe==2.1.1
# via
# -r cookiecutter.txt
# jinja2
multidict==6.0.2
# via
# aiohttp
# yarl
pydantic==1.9.1
# via -r prod.in
pygments==2.12.0
Expand Down Expand Up @@ -88,3 +106,5 @@ urllib3==1.26.9
# via
# -r cookiecutter.txt
# requests
yarl==1.7.2
# via aiohttp
31 changes: 30 additions & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,25 @@
#
# pip-compile --output-file=test.txt test.in
#
aiohttp==3.8.1
# via -r prod.txt
aiosignal==1.2.0
# via
# -r prod.txt
# aiohttp
arrow==1.2.2
# via
# -r prod.txt
# jinja2-time
async-timeout==4.0.2
# via
# -r prod.txt
# aiohttp
attrs==21.4.0
# via pytest
# via
# -r prod.txt
# aiohttp
# pytest
binaryornot==0.4.4
# via -r prod.txt
black==22.3.0
Expand All @@ -27,6 +40,7 @@ chardet==4.0.0
charset-normalizer==2.0.12
# via
# -r prod.txt
# aiohttp
# requests
click==8.1.3
# via
Expand All @@ -47,6 +61,11 @@ filelock==3.7.1
# via virtualenv
flake8==4.0.1
# via -r test.in
frozenlist==1.3.0
# via
# -r prod.txt
# aiohttp
# aiosignal
fsspec==2022.5.0
# via -r prod.txt
gitdb==4.0.9
Expand All @@ -61,6 +80,7 @@ idna==3.3
# via
# -r prod.txt
# requests
# yarl
iniconfig==1.1.1
# via pytest
jinja2==3.1.2
Expand All @@ -75,6 +95,11 @@ markupsafe==2.1.1
# jinja2
mccabe==0.6.1
# via flake8
multidict==6.0.2
# via
# -r prod.txt
# aiohttp
# yarl
mypy-extensions==0.4.3
# via black
nodeenv==1.6.0
Expand Down Expand Up @@ -169,3 +194,7 @@ urllib3==1.26.9
# requests
virtualenv==20.14.1
# via pre-commit
yarl==1.7.2
# via
# -r prod.txt
# aiohttp

0 comments on commit ee142bd

Please sign in to comment.