Skip to content

Commit 29aa7b9

Browse files
Jing Liukieranparsons
Jing Liu
authored andcommitted
Create release 1.0.0
1 parent ab9cd13 commit 29aa7b9

11 files changed

+1108
-0
lines changed
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (C) 2024 Mitsubishi Electric Research Laboratories (MERL)
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
pre-commit

.github/workflows/static_checks.yaml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Copyright (C) 2024 Mitsubishi Electric Research Laboratories (MERL)
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: Static code checks
6+
7+
on: # yamllint disable-line rule:truthy
8+
pull_request:
9+
push:
10+
branches:
11+
- '**'
12+
tags-ignore:
13+
- '**'
14+
15+
env:
16+
LICENSE: Apache-2.0
17+
FETCH_DEPTH: 1
18+
FULL_HISTORY: 0
19+
SKIP_WORD_PRESENCE_CHECK: 1
20+
21+
jobs:
22+
static-code-check:
23+
if: endsWith(github.event.repository.name, 'private')
24+
25+
name: Run static code checks
26+
runs-on: ubuntu-latest
27+
defaults:
28+
run:
29+
shell: bash -l {0}
30+
31+
steps:
32+
- name: Setup history
33+
if: github.ref == 'refs/heads/oss'
34+
run: |
35+
echo "FETCH_DEPTH=0" >> $GITHUB_ENV
36+
echo "FULL_HISTORY=1" >> $GITHUB_ENV
37+
38+
- name: Setup version
39+
if: github.ref == 'refs/heads/melco'
40+
run: |
41+
echo "SKIP_WORD_PRESENCE_CHECK=1" >> $GITHUB_ENV
42+
43+
- name: Check out code
44+
uses: actions/checkout@v4
45+
with:
46+
fetch-depth: ${{ env.FETCH_DEPTH }} # '0' to check full history
47+
48+
- name: Set up environment
49+
run: git config user.email github-bot@merl.com
50+
51+
- name: Set up python
52+
uses: actions/setup-python@v5
53+
with:
54+
python-version: 3
55+
cache: 'pip'
56+
cache-dependency-path: '.github/workflows/requirements-dev.txt'
57+
58+
- name: Install python packages
59+
run: pip install -r .github/workflows/requirements-dev.txt
60+
61+
- name: Ensure lint and pre-commit steps have been run
62+
uses: pre-commit/action@v3.0.1
63+
64+
- name: Check files
65+
uses: merl-oss-private/merl-file-check-action@v1
66+
with:
67+
license: ${{ env.LICENSE }}
68+
full-history: ${{ env.FULL_HISTORY }} # If true, use fetch-depth 0 above
69+
skip-word-presence-check: ${{ env.SKIP_WORD_PRESENCE_CHECK }}
70+
71+
- name: Check license compatibility
72+
if: github.ref != 'refs/heads/melco'
73+
uses: merl-oss-private/merl_license_compatibility_checker@v1
74+
with:
75+
input-filename: requirements.txt
76+
license: ${{ env.LICENSE }}

.gitignore

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

.pre-commit-config.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright (C) 2024 Mitsubishi Electric Research Laboratories (MERL)
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Pre-commit configuration. See https://pre-commit.com
6+
7+
default_language_version:
8+
python: python3
9+
10+
repos:
11+
- repo: https://github.com/pre-commit/pre-commit-hooks
12+
rev: v4.6.0
13+
hooks:
14+
- id: end-of-file-fixer
15+
- id: trailing-whitespace
16+
- id: check-yaml
17+
- id: check-added-large-files
18+
args: ['--maxkb=20000']
19+
20+
# - repo: https://gitlab.com/bmares/check-json5
21+
# rev: v1.0.0
22+
# hooks:
23+
# - id: check-json5
24+
25+
- repo: https://github.com/homebysix/pre-commit-macadmin
26+
rev: v1.16.2
27+
hooks:
28+
- id: check-git-config-email
29+
args: ['--domains', 'merl.com']
30+
31+
- repo: https://github.com/psf/black
32+
rev: 24.4.2
33+
hooks:
34+
- id: black
35+
args:
36+
- --line-length=120
37+
38+
- repo: https://github.com/pycqa/isort
39+
rev: 5.13.2
40+
hooks:
41+
- id: isort
42+
args: ["--profile", "black", "--filter-files", "--line-length", "120", "--skip-gitignore"]
43+
44+
# Uncomment to use pyupgrade (https://github.com/asottile/pyupgrade) to automatically upgrade syntax for newer python
45+
# - repo: https://github.com/asottile/pyupgrade
46+
# rev: v3.16.0
47+
# hooks:
48+
# - id: pyupgrade
49+
50+
# To stop flake8 error from causing a failure, use --exit-zero. By default, pre-commit will not show the warnings,
51+
# so use verbose: true to see them.
52+
- repo: https://github.com/pycqa/flake8
53+
rev: 7.1.0
54+
hooks:
55+
- id: flake8
56+
# Black compatibility, Eradicate options
57+
args: ["--max-line-length=120", "--extend-ignore=E203",
58+
"--eradicate-whitelist-extend", "eradicate:\\s*no",
59+
"--exit-zero"]
60+
verbose: true
61+
additional_dependencies: [
62+
# https://github.com/myint/eradicate, https://github.com/wemake-services/flake8-eradicate
63+
"flake8-eradicate"
64+
]

.reuse/dep5

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/

CONTRIBUTING.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!--
2+
Copyright (C) 2024 Mitsubishi Electric Research Laboratories (MERL)
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
-->
6+
7+
# Contributing
8+
9+
Sorry, but we do not currently accept contributions in the form of pull requests to this repository. However, you are
10+
welcome to post issues (bug reports, feature requests, questions, etc).

0 commit comments

Comments
 (0)