-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cba7d28
Showing
128 changed files
with
10,570 additions
and
0 deletions.
There are no files selected for viewing
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,56 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/docker-existing-dockerfile | ||
{ | ||
"name": "Anomalib Development Environment", | ||
// Sets the run context to one level up instead of the .devcontainer folder. | ||
"context": "..", | ||
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. | ||
"dockerFile": "../Dockerfile", | ||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"python.pythonPath": "/opt/conda/bin/python", | ||
"python.formatting.provider": "black", | ||
"editor.formatOnSave": true, | ||
"python.formatting.blackArgs": [ | ||
"--line-length", | ||
"120" | ||
], | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": true | ||
}, | ||
"python.linting.enabled": true, | ||
"python.linting.flake8Enabled": true, | ||
"python.linting.flake8Args": [ | ||
"--max-line-length=120" | ||
], | ||
"python.testing.cwd": ".", | ||
"python.linting.lintOnSave": true, | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.nosetestsEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
"python.testing.pytestArgs": [ | ||
"tests" | ||
] | ||
}, | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-python.python", | ||
"njpwerner.autodocstring", | ||
"streetsidesoftware.code-spell-checker", | ||
"eamodio.gitlens", | ||
"littlefoxteam.vscode-python-test-adapter" | ||
], | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
// Uncomment the next line to run commands after the container is created - for example installing curl. | ||
// "postCreateCommand": "apt-get update && apt-get install -y curl", | ||
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust | ||
"runArgs": [ | ||
"--gpus=all", | ||
"--shm-size=20g" | ||
] | ||
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker. | ||
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], | ||
// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. | ||
// "remoteUser": "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,13 @@ | ||
*.dot | ||
.idea | ||
.pytest_cache | ||
.tox | ||
.vscode | ||
__pycache__ | ||
{toxworkdir} | ||
datasets/ | ||
embeddings/ | ||
lightning_logs/ | ||
lightning_test/ | ||
papers/ | ||
results/ |
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,4 @@ | ||
# Makes line endings consistent when using docker on windows | ||
* text=auto eol=lf | ||
*.{cmd,[cC][mM][dD]} text eol=crlf | ||
*.{bat,[bB][aA][tT]} text eol=crlf |
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,56 @@ | ||
name: Build Docs | ||
|
||
on: | ||
push: | ||
branches: [development] | ||
paths-ignore: | ||
- ".github/**" # Ignore changes towards the .github directory | ||
|
||
jobs: | ||
Build-and-Publish-Documentation: | ||
runs-on: [self-hosted, linux, x64] | ||
steps: | ||
- name: CHECKOUT REPOSITORY | ||
uses: actions/checkout@v2 | ||
- name: Install requirements | ||
run: | | ||
pip install -r requirements/requirements.txt | ||
pip install -r requirements/requirements_dev.txt | ||
pip install -r requirements/requirements_openvino_mo.txt | ||
- name: Build and Commit Docs | ||
run: | | ||
cd docs | ||
pip install -r requirements.txt | ||
make html | ||
- name: Create gh-pages branch | ||
run: | | ||
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/} | ||
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/} | ||
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} | ||
existed_in_remote=$(git ls-remote --heads origin gh-pages) | ||
if [[ -z ${existed_in_remote} ]]; then | ||
echo "Creating gh-pages branch" | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git checkout --orphan gh-pages | ||
git reset --hard | ||
touch .nojekyll | ||
git add .nojekyll | ||
git commit -m "Initializing gh-pages branch" | ||
git push origin gh-pages | ||
git checkout ${{steps.branch_name.outputs.SOURCE_NAME}} | ||
echo "Created gh-pages branch" | ||
else | ||
echo "Branch gh-pages already exists" | ||
fi | ||
- name: Push docs to gh-pages branch | ||
run: | | ||
git checkout gh-pages | ||
cp -r docs/build/html/* ./ | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add . | ||
git commit -m "Update documentation" -a || true | ||
git push origin gh-pages |
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,28 @@ | ||
name: Pre-merge Checks | ||
|
||
on: | ||
push: | ||
branches: [development, master] | ||
pull_request: | ||
|
||
jobs: | ||
Tox: | ||
runs-on: [self-hosted, linux, x64] | ||
steps: | ||
- name: Print GPU status | ||
run: nvidia-smi | ||
- name: Print PATH | ||
run: echo $PATH | ||
- name: CHECKOUT REPOSITORY | ||
uses: actions/checkout@v2 | ||
- name: Install Tox | ||
run: pip install tox | ||
- name: Code quality checks | ||
run: tox -e black,isort,flake8,pylint,mypy | ||
- name: Coverage | ||
run: tox -e coverage | ||
- name: Upload coverage result | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage | ||
path: .tox/coverage.xml |
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,166 @@ | ||
# Project related | ||
datasets | ||
!anomalib/datasets | ||
!tests/datasets | ||
results | ||
!anomalib/core/results | ||
|
||
backup.py | ||
train.ipynb | ||
|
||
# VENV | ||
.python-version | ||
.anomalib | ||
.toxbase | ||
|
||
# IDE | ||
.vscode | ||
.idea | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
|
||
# Documentations | ||
docs/source/generated | ||
docs/source/api | ||
docs/source/models | ||
|
||
# Misc | ||
.DS_Store |
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,59 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.4.0 | ||
hooks: | ||
# list of supported hooks: https://pre-commit.com/hooks.html | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: debug-statements | ||
- id: detect-private-key | ||
|
||
# python code formatting | ||
- repo: https://github.com/psf/black | ||
rev: 20.8b1 | ||
hooks: | ||
- id: black | ||
args: [--line-length, "120"] | ||
|
||
# python import sorting | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.8.0 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black"] | ||
|
||
# yaml formatting | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v2.3.0 | ||
hooks: | ||
- id: prettier | ||
types: [yaml] | ||
|
||
# python code analysis | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 | ||
args: [--config=tox.ini] | ||
exclude: "tests/" | ||
|
||
# python linting | ||
- repo: local | ||
hooks: | ||
- id: pylint | ||
name: pylint | ||
entry: pylint --score=no --rcfile=tox.ini | ||
language: system | ||
types: [python] | ||
exclude: "tests|docs" | ||
|
||
# python static type checking | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: "v0.910" | ||
hooks: | ||
- id: mypy | ||
args: [--config-file=tox.ini] | ||
additional_dependencies: [types-PyYAML] | ||
exclude: "tests/" |
Oops, something went wrong.