Skip to content

Commit

Permalink
New freeze system
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoucheiron committed Dec 28, 2023
1 parent dd5477f commit de464ff
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 11 deletions.
29 changes: 22 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ install:
pip install -r requirements.txt

install-dev: install
pip install -e ".[dev]"
pip install -r requirements-dev.txt

install-docs:
pip install -e ".[dev,docs]"
pip install -r requirements-docs.txt

format: isort-format black-format

Expand Down Expand Up @@ -42,10 +42,25 @@ test: lint unit
test-docs:
mkdocs build --strict

freeze:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile --no-emit-index-url --no-annotate --output-file requirements.txt setup.py
FREEZE_OPTIONS = --no-emit-index-url --no-annotate -v
freeze-base:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile $(FREEZE_OPTIONS) setup.py --output-file requirements.txt
freeze-dev:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile $(FREEZE_OPTIONS) setup.py --extra dev --output-file requirements-dev.txt
freeze-docs:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile $(FREEZE_OPTIONS) setup.py --extra docs --output-file requirements-docs.txt

freeze-upgrade:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile --no-emit-index-url --upgrade --no-annotate --output-file requirements.txt setup.py
freeze: freeze-base freeze-dev freeze-docs

.PHONY: install install-dev install-docs format isort-format black-format lint isort-lint black-lint flake8-lint unit coverage test freeze freeze-upgrade
freeze-base-upgrade:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile $(FREEZE_OPTIONS) --upgrade setup.py --output-file requirements.txt
freeze-dev-upgrade:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile $(FREEZE_OPTIONS) --upgrade setup.py --extra dev --output-file requirements-dev.txt
freeze-docs-upgrade:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile $(FREEZE_OPTIONS) --upgrade setup.py --extra docs --output-file requirements-docs.txt

freeze-upgrade: freeze-base-upgrade freeze-dev-upgrade freeze-docs-upgrade

.PHONY: install install-dev install-docs format isort-format black-format lint isort-lint black-lint flake8-lint unit \
coverage test freeze freeze-upgrade freeze-base freeze-dev freeze-docs freeze-base-upgrade freeze-dev-upgrade \
freeze-docs-upgrade
42 changes: 42 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# make freeze
#
anyio==4.2.0
black==23.12.1
build==1.0.3
certifi==2023.11.17
click==8.1.7
coverage[toml]==7.4.0
exceptiongroup==1.2.0
flake8==6.1.0
h11==0.14.0
httpcore==1.0.2
httpx==0.26.0
idna==3.6
iniconfig==2.0.0
isort==5.13.2
mccabe==0.7.0
mypy-extensions==1.0.0
packaging==23.2
pathspec==0.12.1
pip-tools==7.3.0
platformdirs==4.1.0
pluggy==1.3.0
pycodestyle==2.11.1
pydantic==1.10.13
pyflakes==3.1.0
pyproject-hooks==1.0.0
pytest==7.4.3
pytest-cov==4.1.0
pytest-repeat==0.9.3
sniffio==1.3.0
tomli==2.0.1
typing-extensions==4.9.0
wheel==0.42.0

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
33 changes: 33 additions & 0 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# make freeze
#
automacdoc==0.3
beautifulsoup4==4.12.2
click==8.1.7
ghp-import==2.1.0
importlib-metadata==7.0.1
jinja2==3.1.2
livereload==2.6.3
markdown==3.5.1
markupsafe==2.1.3
mergedeep==1.3.4
mkdocs==1.3.0
mkdocs-material==4.6.3
mkdocstrings==0.10.0
packaging==23.2
pydantic==1.10.13
pygments==2.17.2
pymdown-extensions==10.6
python-dateutil==2.8.2
pytkdocs==0.2.1
pyyaml==6.0.1
pyyaml-env-tag==0.1
six==1.16.0
soupsieve==2.5
tornado==6.4
typing-extensions==4.9.0
watchdog==3.0.0
zipp==3.17.0
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# make freeze
#
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from pathlib import Path

from setuptools import find_namespace_packages, setup
from pycfmodel.__version__ import __version__

readme = Path(__file__).parent / "README.md"
long_description = readme.read_text()
Expand Down Expand Up @@ -29,7 +28,7 @@

setup(
name="pycfmodel",
version=__version__,
version="0.21.2",
description="A python model for CloudFormation scripts",
author="Skyscanner Product Security",
author_email="[email protected]",
Expand Down

0 comments on commit de464ff

Please sign in to comment.