Skip to content

Commit

Permalink
Merge pull request #10 from vroncevic/dev
Browse files Browse the repository at this point in the history
sync
  • Loading branch information
vroncevic committed Mar 24, 2022
2 parents 8c6662b + c7fb4eb commit ee59ee0
Show file tree
Hide file tree
Showing 64 changed files with 17,211 additions and 93 deletions.
21 changes: 21 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2.1
executors:
dist_py_module-executor:
docker:
- image: cimg/python:3.8.10
auth:
username: $DOCKER_HUB_USER
password: $DOCKER_HUB_PASSWORD
jobs:
dist_py_module:
executor: dist_py_module-executor
steps:
- checkout
- run: |
python3 -m pip install --upgrade setuptools
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build
workflows:
dist_py_module-workflow:
jobs:
- dist_py_module
1 change: 1 addition & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git config -f .gitconfig core.hooksPath .githooks
11 changes: 11 additions & 0 deletions .githooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
#
# @brief Add project name
# @version ver.1.0.0
# @date Thu Apr 08 03:47:43 AM CET 2021
# @company None, free software to use 2021
# @author Vladimir Roncevic <elektron.ronca@gmail.com>
#

PRO_NAME=$(basename `git rev-parse --show-toplevel`)
echo "[$PRO_NAME] ""$(cat $1)" > "$1"
49 changes: 49 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/sh
#
# @brief Add project name
# @version ver.1.0.0
# @date Thu Apr 08 03:47:43 AM CET 2021
# @company None, free software to use 2021
# @author Vladimir Roncevic <elektron.ronca@gmail.com>
#

if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi

# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --bool hooks.allownonascii)

# Redirect output to stderr.
exec 1>&2

# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
# Note that the use of brackets around a tr range is ok here, (it's
# even required, for portability to Solaris 10's /usr/bin/tr), since
# the square bracket bytes happen to fall in the designated range.
test $(git diff --cached --name-only --diff-filter=A -z $against |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
cat <<\EOF
Error: Attempt to add a non-ASCII file name.
This can cause problems if you want to work with people on other platforms.
To be portable it is advisable to rename the file.
If you know what you are doing you can disable this check using:
git config hooks.allownonascii true
EOF
exit 1
fi

# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

4 changes: 4 additions & 0 deletions .github/workflows/gen_shared_file_docker_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ name: gen_shared_file docker checker
on:
push:
branches: [ master ]
paths:
- 'Dockerfile'
pull_request:
branches: [ master ]
paths:
- 'Dockerfile'
jobs:
build:
runs-on: ubuntu-latest
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/gen_shared_file_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ name: Python package gen_shared_file
on:
push:
branches: [ master ]
paths:
- 'gen_shared_file/**'
- 'setup.py'
pull_request:
branches: [ master ]
paths:
- 'gen_shared_file/**'
- 'setup.py'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
python-version: [2.7, 3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/gen_shared_file_py_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ name: gen_shared_file py checker
on:
push:
branches: [ master ]
paths:
- 'gen_shared_file/**'
- 'setup.py'
pull_request:
branches: [ master ]
paths:
- 'gen_shared_file/**'
- 'setup.py'
jobs:
build:
runs-on: ubuntu-latest
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/gen_shared_file_python2_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,20 @@ name: Install Python2 Package gen_shared_file
on:
push:
branches: [ master ]
paths:
- 'gen_shared_file/**'
- 'MANIFEST.in'
- 'pyproject.toml'
- 'setup.cfg'
- 'setup.py'
pull_request:
branches: [ master ]
paths:
- 'gen_shared_file/**'
- 'MANIFEST.in'
- 'pyproject.toml'
- 'setup.cfg'
- 'setup.py'
jobs:
deploy:
runs-on: ubuntu-latest
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/gen_shared_file_python3_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,20 @@ name: Install Python3 Package gen_shared_file
on:
push:
branches: [ master ]
paths:
- 'gen_shared_file/**'
- 'MANIFEST.in'
- 'pyproject.toml'
- 'setup.cfg'
- 'setup.py'
pull_request:
branches: [ master ]
paths:
- 'gen_shared_file/**'
- 'MANIFEST.in'
- 'pyproject.toml'
- 'setup.cfg'
- 'setup.py'
jobs:
deploy:
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/gen_shared_file_toc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: TOC Generator gen_shared_file
on: push
on:
push:
paths:
- '**.md'
jobs:
generateTOC:
name: TOC Generator
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
__pycache__/
*.py[cod]
*$py.class
.idea/
.vscode/
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
python:
version: 2.7
version: '3.7'
install:
- requirements: requirements.txt
sphinx:
Expand Down
32 changes: 16 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020 Vladimir Roncevic <elektron.ronca@gmail.com>
# Copyright 2019 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.
Expand All @@ -16,31 +16,31 @@
FROM debian:10
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive \
apt-get install -yq --no-install-recommends \
tree \
htop \
python \
python-pip \
python-wheel \
python3 \
python3-pip \
python3-wheel \
libyaml-dev
apt-get install -yq --no-install-recommends \
tree \
htop \
python \
python-pip \
python-wheel \
python3 \
python3-pip \
python3-wheel \
libyaml-dev

RUN pip install --upgrade setuptools
RUN pip2 install --upgrade setuptools
RUN pip3 install --upgrade setuptools
COPY requirements.txt /
RUN pip install -r requirements.txt
RUN pip2 install -r requirements.txt
RUN pip3 install -r requirements.txt
RUN rm -f requirements.txt
RUN mkdir /gen_shared_file/
COPY gen_shared_file /gen_shared_file/
COPY setup.py /
COPY README.md /
RUN find /gen_shared_file/ -name "*.editorconfig" -type f -exec rm -Rf {} \;
RUN python setup.py install_lib
RUN python setup.py install_egg_info
RUN python setup.py install_data
RUN python2 setup.py install_lib
RUN python2 setup.py install_egg_info
RUN python2 setup.py install_data
RUN python3 setup.py install_lib
RUN python3 setup.py install_data
RUN python3 setup.py install_egg_info
Expand Down
Empty file modified LICENSE
100755 → 100644
Empty file.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
global-exclude *.py[cod]
global-exclude *.editorconfig

0 comments on commit ee59ee0

Please sign in to comment.