Skip to content

Commit 53b8ae4

Browse files
heliocastrotsteenbe
andcommitted
Initial commit
Co-authored-by: Thomas Steenbergen <opensource@steenbe.nl> Signed-off-by: Helio Chissini de Castro <heliocastro@gmail.com> Signed-off-by: Thomas Steenbergen <opensource@steenbe.nl>
0 parents  commit 53b8ae4

File tree

80 files changed

+193243
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+193243
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "orthw",
3+
"image": "ort",
4+
// Configure tool-specific properties.
5+
"customizations": {
6+
// Configure properties specific to VS Code.
7+
"vscode": {
8+
// Set *default* container specific settings.json values on container create.
9+
"settings": {
10+
"editor.formatOnSave": true,
11+
"eslint.alwaysShowStatus": true
12+
},
13+
// Add the IDs of extensions you want installed when the container is created.
14+
"extensions": [
15+
"2gua.rainbow-brackets",
16+
"aaron-bond.better-comments",
17+
"davidanson.vscode-markdownlint",
18+
"naumovs.color-highlight",
19+
"oderwat.indent-rainbow",
20+
"shardulm94.trailing-spaces",
21+
"streetsidesoftware.code-spell-checker",
22+
"VisualStudioExptTeam.vscodeintellicode",
23+
"vivaxy.vscode-conventional-commits",
24+
"ms-python.python"
25+
]
26+
}
27+
},
28+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
29+
"forwardPorts": [
30+
8000
31+
],
32+
// Use 'postCreateCommand' to run commands after the container is created.
33+
"postCreateCommand": ".devcontainer/scripts/postCreateCommand.sh",
34+
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
35+
"remoteUser": "ort"
36+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
pip install -U pip poetry mypy
4+
poetry config virtualenvs.in-project true
5+
poetry install
6+
mypy --install-types
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright 2023 The ORTHW Project Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# SPDX-License-Identifier: Apache-2.0
16+
# SPDX-FileCopyrightText: 2023 Helio Chissini de Castro
17+
18+
name: Build and Deploy
19+
20+
on:
21+
workflow_dispatch:
22+
push:
23+
tags:
24+
- 'v*.*'
25+
paths-ignore:
26+
- '**.md'
27+
pull_request:
28+
branches: [ main ]
29+
paths-ignore:
30+
- '**.md'
31+
32+
jobs:
33+
build:
34+
name: Build OrtHW python with Poetry
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- uses: actions/checkout@v3
39+
- uses: actions/setup-python@v4
40+
with:
41+
python-version: '3.10'
42+
cache: 'pip'
43+
- run: |
44+
pip install poetry
45+
poetry install -q
46+
poetry build
47+
deploy:
48+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
49+
name: Deploy
50+
runs-on: ubuntu-latest
51+
52+
steps:
53+
- run: |
54+
echo "Deployment is not implemented yet"

.github/workflows/commit_checks.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright 2023 The ORTHW Project Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# SPDX-License-Identifier: Apache-2.0
16+
# SPDX-FileCopyrightText: 2023 Helio Chissini de Castro
17+
18+
name: Commit Checks
19+
20+
on:
21+
workflow_dispatch:
22+
pull_request:
23+
branches: [main]
24+
paths-ignore:
25+
- '**.md'
26+
27+
jobs:
28+
build:
29+
name: Validade Pull Request Commits
30+
runs-on: ubuntu-latest
31+
32+
steps:
33+
- uses: actions/checkout@v3
34+
- uses: webiny/action-conventional-commits@v1.1.0
35+
- uses: apache/skywalking-eyes/header@main

.gitignore

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
.idea/
2+
.coverage
3+
.vscode/
4+
.idea/
5+
# Byte-compiled / optimized / DLL files
6+
__pycache__/
7+
*.py[cod]
8+
*$py.class
9+
10+
# C extensions
11+
*.so
12+
13+
# Distribution / packaging
14+
.Python
15+
build/
16+
develop-eggs/
17+
dist/
18+
downloads/
19+
eggs/
20+
.eggs/
21+
lib/
22+
lib64/
23+
parts/
24+
sdist/
25+
var/
26+
wheels/
27+
share/python-wheels/
28+
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
MANIFEST
32+
33+
# PyInstaller
34+
# Usually these files are written by a python script from a template
35+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
36+
*.manifest
37+
*.spec
38+
39+
# Installer logs
40+
pip-log.txt
41+
pip-delete-this-directory.txt
42+
43+
# Unit test / coverage reports
44+
htmlcov/
45+
.tox/
46+
.nox/
47+
.coverage
48+
.coverage.*
49+
.cache
50+
nosetests.xml
51+
coverage.xml
52+
*.cover
53+
*.py,cover
54+
.hypothesis/
55+
.pytest_cache/
56+
cover/
57+
58+
# Translations
59+
*.mo
60+
*.pot
61+
62+
# Django stuff:
63+
*.log
64+
local_settings.py
65+
db.sqlite3
66+
db.sqlite3-journal
67+
68+
# Flask stuff:
69+
instance/
70+
.webassets-cache
71+
72+
# Scrapy stuff:
73+
.scrapy
74+
75+
# Sphinx documentation
76+
docs/_build/
77+
78+
# PyBuilder
79+
.pybuilder/
80+
target/
81+
82+
# Jupyter Notebook
83+
.ipynb_checkpoints
84+
85+
# IPython
86+
profile_default/
87+
ipython_config.py
88+
89+
# pyenv
90+
# For a library or package, you might want to ignore these files since the code is
91+
# intended to run in multiple environments; otherwise, check them in:
92+
.python-version
93+
94+
# pipenv
95+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
97+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
98+
# install all needed dependencies.
99+
#Pipfile.lock
100+
101+
# poetry
102+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
103+
# This is especially recommended for binary packages to ensure reproducibility, and is more
104+
# commonly ignored for libraries.
105+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
106+
poetry.lock
107+
108+
# pdm
109+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
110+
#pdm.lock
111+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
112+
# in version control.
113+
# https://pdm.fming.dev/#use-with-ide
114+
.pdm.toml
115+
116+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
117+
__pypackages__/
118+
119+
# Celery stuff
120+
celerybeat-schedule
121+
celerybeat.pid
122+
123+
# SageMath parsed files
124+
*.sage.py
125+
126+
# Environments
127+
.env
128+
.venv
129+
env/
130+
venv/
131+
ENV/
132+
env.bak/
133+
venv.bak/
134+
135+
# Spyder project settings
136+
.spyderproject
137+
.spyproject
138+
139+
# Rope project settings
140+
.ropeproject
141+
142+
# mkdocs documentation
143+
/site
144+
145+
# mypy
146+
.mypy_cache/
147+
.dmypy.json
148+
dmypy.json
149+
150+
# Pyre type checker
151+
.pyre/
152+
153+
# pytype static type analyzer
154+
.pytype/
155+
156+
# Cython debug symbols
157+
cython_debug/
158+
159+
# VSCode
160+
*.code-workspace
161+
output
162+
163+
# Ruff
164+
.ruff_cache
165+
166+
# Testbed folder
167+
.tests

.licenserc.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Copyright (C) 2023 The ORTHW Project Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# SPDX-License-Identifier: Apache-2.0
16+
# License-Filename: LICENSE
17+
18+
19+
header:
20+
license:
21+
spdx-id: Apache-2.0
22+
copyright-owner: The ORTHW Project Authors (see <https://github.com/oss-review-toolkit/orthw/blob/main/NOTICE>)
23+
copyright-year: 2017
24+
software-name: orthw
25+
pattern: |
26+
Licensed under the Apache License, Version 2.0 (the "License");
27+
you may not use this file except in compliance with the License.
28+
You may obtain a copy of the License at
29+
30+
https://www.apache.org/licenses/LICENSE-2.0
31+
32+
Unless required by applicable law or agreed to in writing, software
33+
distributed under the License is distributed on an "AS IS" BASIS,
34+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35+
See the License for the specific language governing permissions and
36+
limitations under the License.
37+
38+
SPDX-License-Identifier: Apache-2.0
39+
License-Filename: LICENSE
40+
41+
paths:
42+
- '**/*.py'
43+
44+
comment: on-failure
45+
46+
license-location-threshold: 80
47+
48+
dependency:
49+
files:
50+
- package.json

.pre-commit-config.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.6.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
exclude: examples
8+
- id: check-yaml
9+
- id: check-added-large-files
10+
11+
- repo: https://github.com/pre-commit/mirrors-mypy
12+
rev: v1.10.0
13+
hooks:
14+
- id: mypy
15+
additional_dependencies:
16+
- pydantic
17+
- types-PyYaml==6.0
18+
- types-toml
19+
args: [--config, pyproject.toml]
20+
21+
- repo: https://github.com/charliermarsh/ruff-pre-commit
22+
rev: "v0.4.9"
23+
hooks:
24+
- id: ruff
25+
args: [ --fix ]
26+
- id: ruff-format
27+
28+
- repo: https://github.com/compilerla/conventional-pre-commit
29+
rev: "v3.2.0"
30+
hooks:
31+
- id: conventional-pre-commit
32+
stages: [commit-msg]
33+
args: []
34+
35+
- repo: https://github.com/python-poetry/poetry
36+
rev: "1.8.0"
37+
hooks:
38+
- id: poetry-check

0 commit comments

Comments
 (0)