Skip to content
Merged

sync #37

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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/codecipher_package_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics --max-doc-length 127
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=150 --statistics --max-doc-length 150
2 changes: 0 additions & 2 deletions .github/workflows/codecipher_python3_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ on:
- 'codecipher/**'
- 'MANIFEST.in'
- 'pyproject.toml'
- 'setup.cfg'
- 'setup.py'
pull_request:
branches: [ main ]
paths:
- 'codecipher/**'
- 'MANIFEST.in'
- 'pyproject.toml'
- 'setup.cfg'
- 'setup.py'
jobs:
deploy:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codecipher_python_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
run: |
modules_ok=0
modules=($(find codecipher/ tests/ -type f -name '*.py' -exec echo '{}' \;))
for mod in "${modules[@]}"; do line_length=$(wc -L < "${mod}"); [[ $line_length -gt 127 ]] && modules_ok=1; done
for mod in "${modules[@]}"; do line_length=$(wc -L < "${mod}"); [[ $line_length -gt 150 ]] && modules_ok=1; done
[[ $modules_ok -eq 0 ]] && echo ok || exit 1
- name: Check max number of lines in modules
id: num_line_checker
run: |
modules_ok=0
modules=($(find codecipher/ tests/ -type f -name '*.py' -exec echo '{}' \;))
for mod in "${modules[@]}"; do line_numbers=$(wc -l < "${mod}"); [[ $line_numbers -gt 300 ]] && modules_ok=1; done
for mod in "${modules[@]}"; do line_numbers=$(wc -l < "${mod}"); [[ $line_numbers -gt 500 ]] && modules_ok=1; done
[[ $modules_ok -eq 0 ]] && echo ok || exit 1
20 changes: 20 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[MASTER]
# Optimization level. 0 is the highest, 2 is the lowest.
jobs=0

[MESSAGES CONTROL]
# Disable unnecessary-pass
# Centralized place for ignore / warning management.
disable=unnecessary-pass,line-too-long,too-many-arguments,too-few-public-methods,too-many-function-args

[DESIGN]
# Maximum number of arguments for function / method defining.
max-args=10
max-locals=25
max-returns=10
max-branches=15
max-statements=60
max-parents=10
max-attributes=12
max-public-methods=25
max-positional-arguments=10
21 changes: 13 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"files.exclude": {
"*.pyc": true,
"**/*.pyc": true,
"__pycache__": true,
"**/__pycache__": true
},
"cmake.configureOnOpen": false
}
"files.exclude": {
"**/*.pyc": true,
"**/__pycache__": true
},

"pylint.args": [
"--rcfile=${workspaceFolder}/.pylintrc"
],

"pylint.importStrategy": "useBundled",
"pylint.cwd": "${workspaceFolder}",
"flake8.enabled": false
}
116 changes: 58 additions & 58 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
# Copyright 2021 - 2024 Vladimir Roncevic <elektron.ronca@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM debian:12
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive \
apt-get install -yq --no-install-recommends \
vim \
nano \
tree \
htop \
wget \
curl \
unzip \
ca-certificates \
openssl \
python3 \
python3-dev \
libyaml-dev
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python3 get-pip.py
RUN python3 -m pip install --upgrade setuptools
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --upgrade build
RUN rm -f get-pip.py
RUN mkdir /codecipher/
COPY codecipher /codecipher/
COPY pyproject.toml /
COPY MANIFEST.in /
COPY setup.py /
COPY README.md /
COPY LICENSE /
COPY requirements.txt /
RUN pip3 install -r requirements.txt
RUN rm -f requirements.txt
RUN python3 -m build --no-isolation --wheel
RUN pip install /dist/codecipher-*.whl
RUN rm -rf /codecipher*
RUN rm -rf dist/
RUN rm -rf tests/
RUN rm -f pyproject.toml
RUN rm -f MANIFEST.in
RUN rm -f setup.py
RUN rm -f README.md
RUN rm -f LICENSE
# Copyright 2021 - 2026 Vladimir Roncevic <elektron.ronca@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

FROM debian:12
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive \
apt-get install -yq --no-install-recommends \
vim \
nano \
tree \
htop \
wget \
curl \
unzip \
ca-certificates \
openssl \
python3 \
python3-dev \
libyaml-dev

RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python3 get-pip.py
RUN python3 -m pip install --upgrade setuptools
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --upgrade build
RUN rm -f get-pip.py
RUN mkdir /codecipher/
COPY codecipher /codecipher/
COPY pyproject.toml /
COPY MANIFEST.in /
COPY setup.py /
COPY README.md /
COPY LICENSE /
COPY requirements.txt /
RUN pip3 install -r requirements.txt
RUN rm -f requirements.txt
RUN python3 -m build --no-isolation --wheel
RUN pip install /dist/codecipher-*.whl
RUN rm -rf /codecipher*
RUN rm -rf dist/
RUN rm -rf tests/
RUN rm -f pyproject.toml
RUN rm -f MANIFEST.in
RUN rm -f setup.py
RUN rm -f README.md
RUN rm -f LICENSE
Loading
Loading