Skip to content

Commit

Permalink
precommit: Freeze tool versions
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Aug 28, 2020
1 parent dd8d7d6 commit 0d9cee8
Show file tree
Hide file tree
Showing 4 changed files with 300 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tools/precommit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,23 @@ RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
shellcheck \
&& rm -rf /var/lib/apt/lists/*

# Install MarkdownLint.
# Install markdownlint-cli and dependencies.
# https://github.com/DavidAnson/markdownlint
# https://github.com/igorshubovych/markdownlint-cli
RUN npm install -g markdownlint-cli
# https://github.com/igorshubovych/markdownlint-cli
WORKDIR /opt/cp2k-precommit
COPY package.json package-lock.json ./
RUN npm install .
RUN ln -s /opt/cp2k-precommit/node_modules/markdownlint-cli/markdownlint.js /usr/bin/markdownlint

# Install Black Python Formatter.
# Install black, flask, gunicorn, and dependencies.
# https://github.com/psf/black
RUN pip3 install black
COPY requirements.txt .
RUN pip3 install -r requirements.txt

# Clone cp2k repository (needed for CI mode).
RUN git clone --quiet --recursive --single-branch -b master https://github.com/cp2k/cp2k.git /workspace/cp2k

# Install Flask app.
RUN pip3 install flask gunicorn
WORKDIR /opt/cp2k-precommit
COPY precommit_server.py .

ARG REVISION
Expand Down
257 changes: 257 additions & 0 deletions tools/precommit/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions tools/precommit/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "cp2k-precommit",
"version": "1.0.0",
"description": "Tools used by the cp2k-precomit system",
"main": "index.js",
"repository": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": ""
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"markdownlint-cli": "^0.23.2"
}
}
14 changes: 14 additions & 0 deletions tools/precommit/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
appdirs==1.4.4
attrs==20.1.0
black==19.10b0
click==7.1.2
Flask==1.1.2
gunicorn==20.0.4
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.1.1
pathspec==0.8.0
regex==2020.7.14
toml==0.10.1
typed-ast==1.4.1
Werkzeug==1.0.1

0 comments on commit 0d9cee8

Please sign in to comment.