Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install -r requirements.txt",
"postCreateCommand": "python -m pip install -e '.[scripts,dev]'",

// Configure tool-specific properties.
// "customizations": {},
Expand Down
7 changes: 3 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ updates:
- "*"
open-pull-requests-limit: 10
- package-ecosystem: pip
directory: "/"
directories:
- "/"
- "/.github/actions/**"
schedule:
interval: daily
groups:
pydantic-deps:
patterns:
- "pydantic*"
python-deps:
patterns:
- "*"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ jobs:
with:
python-version: "3.x"
cache: pip
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: |
set -euo pipefail
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e ".[scripts]"

- name: Run generate
run: |
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:
with:
python-version: 3.x
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Install pip packages
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: flake8
run: |
pip install flake8
flake8 .
- name: pydocstyle
run: |
pip install pydocstyle
pydocstyle .

unit-test:
Expand All @@ -40,11 +40,12 @@ jobs:
with:
python-version: 3.x
cache: pip
cache-dependency-path: pyproject.toml

- name: Run action unit tests
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e ".[scripts]"
python -m unittest discover -s .github/actions -p 'test_*.py'

- name: Run API unit tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
__pycache__
*.egg-info/
site/
.venv/
.pytest_cache/
Expand Down
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@
{
"label": "upgrade",
"type": "shell",
"command": " pip install --upgrade pip; for i in $(pip list -o | awk 'NR > 2 {print $1}'); do pip install -U $i; done && pip freeze > requirements.txt",
"command": "python -m pip install --upgrade pip && python -m pip install --upgrade -e '.[scripts,dev]'",
"problemMatcher": []
},
{
"label": "install",
"type": "shell",
"command": "pip3 install -r requirements.txt",
"command": "python -m pip install -e '.[scripts,dev]'",
"problemMatcher": []
}
],
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pip install "git+https://github.com/althack/dockerfiles.git@main"
For local development (editable install):

```bash
pip install -e .
pip install -e ".[scripts,dev]"
```

Example usage:
Expand Down
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ dependencies = [
"jsonschema>=4.0.0"
]

[project.optional-dependencies]
scripts = [
"actions-toolkit>=0.1.15",
"click>=8.1",
"Jinja2>=3.1"
]
dev = [
"flake8>=7.3",
"pydocstyle>=6.3"
]

[project.urls]
Homepage = "https://github.com/althack/dockerfiles"
Repository = "https://github.com/althack/dockerfiles"
Expand Down
42 changes: 0 additions & 42 deletions requirements.txt

This file was deleted.