-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from vroncevic/dev
[gen_shared_file] initial project infrastructure
- Loading branch information
Showing
36 changed files
with
428 additions
and
290 deletions.
There are no files selected for viewing
0
python-tool/bin/.editorconfig → .editorconfig
100755 → 100644
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[gen_shared_file]" | ||
labels: bug | ||
assignees: vroncevic | ||
|
||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: "[gen_shared_file]" | ||
labels: enhancement | ||
assignees: vroncevic | ||
|
||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: gen_shared_file docker checker | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build Docker image | ||
id: docker_checker | ||
run: | | ||
echo Building Docker image | ||
build_transcript=$(docker build . --file Dockerfile --tag gen_shared_file:latest) | ||
[[ "$build_transcript" == *"Successfully"* ]] && echo ::set-output name=status::success || echo ::set-output name=status::failure | ||
- name: Check on failures | ||
if: steps.docker_checker.outputs.status == 'failure' | ||
run: exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,25 @@ | ||
name: Python package gen_shared_file | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [2.7, 3.5, 3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Lint with flake8 | ||
run: | | ||
pip install flake8 | ||
# 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=127 --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide ===> strict 79 | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: gen_shared_file py checker | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Check length of line in modules | ||
id: long_line_checker | ||
run: | | ||
echo Checking length of line in modules | ||
modules_ok=0 | ||
modules=($(find gen_shared_file/ -type f -name '*.py' -exec echo '{}' \;)) | ||
for mod in "${modules[@]}"; do line_length=$(wc -L < "${mod}"); [[ $line_length -gt 80 ]] && modules_ok=1; done | ||
[[ $modules_ok -eq 0 ]] && echo ::set-output name=status::success || echo ::set-output name=status::failure | ||
- name: Check number of lines in modules | ||
id: num_line_checker | ||
run: | | ||
echo Checking number of lines in modules | ||
modules_ok=0 | ||
modules=($(find gen_shared_file/ -type f -name '*.py' -exec echo '{}' \;)) | ||
for mod in "${modules[@]}"; do line_numbers=$(wc -l < "${mod}"); [[ $line_numbers -gt 300 ]] && modules_ok=1; done | ||
[[ $modules_ok -eq 0 ]] && echo ::set-output name=status::success || echo ::set-output name=status::failure | ||
- name: Check on failures | ||
if: steps.long_line_checker.outputs.status == 'failure' || steps.num_line_checker.outputs.status == 'failure' | ||
run: exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Install Python2 Package gen_shared_file | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '2.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel | ||
pip install -r requirements.txt | ||
- name: Build and publish | ||
run: | | ||
python setup.py --github sdist bdist_wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Install Python3 Package gen_shared_file | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel | ||
pip install -r requirements.txt | ||
- name: Build and publish | ||
run: | | ||
python setup.py --github sdist bdist_wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: TOC Generator gen_shared_file | ||
on: push | ||
jobs: | ||
generateTOC: | ||
name: TOC Generator | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: technote-space/toc-generator@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Triage gen_shared_file | ||
on: | ||
issues: | ||
types: [opened] | ||
jobs: | ||
commentOnNewIssues: | ||
name: Comment On New Issues | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Comment On New Issues | ||
uses: actions/github@v1.0.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
args: comment "[gen_shared_file] should be supported for Python 2.7, 3.5, 3.6, 3.7, 3.8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Triage gen_shared_file label | ||
on: | ||
issues: | ||
types: [opened] | ||
jobs: | ||
applyTriageLabel: | ||
name: Apply Triage Label | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Apply Triage Label | ||
uses: actions/github@v1.0.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
args: label triage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
.idea/ | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
python: | ||
version: 2.7 | ||
install: | ||
- requirements: requirements.txt | ||
sphinx: | ||
configuration: docs/source/conf.py | ||
formats: all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Copyright 2020 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: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 | ||
|
||
RUN pip install --upgrade setuptools | ||
RUN pip3 install --upgrade setuptools | ||
COPY requirements.txt / | ||
RUN pip 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 python3 setup.py install_lib | ||
RUN python3 setup.py install_data | ||
RUN python3 setup.py install_egg_info | ||
RUN rm -rf /gen_shared_file/ | ||
RUN rm -f setup.py | ||
RUN rm -f README.md |
Oops, something went wrong.