Skip to content

Commit 8a40869

Browse files
authored
First commit (#1)
* Run works for Albumentations * Benchmark runs * Finally works * Cleanup
1 parent 6c8ee95 commit 8a40869

32 files changed

+6143
-59
lines changed

.github/FUNDING.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
github: albumentations-team # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/ci.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
paths-ignore:
7+
- '**.md'
8+
9+
jobs:
10+
check_code_formatting_types:
11+
name: Check code formatting with ruff and mypy
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
python-version: ["3.12"]
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install all requirements
26+
run: |
27+
python -m pip install --upgrade uv
28+
uv pip install --system -r requirements-dev.txt
29+
uv pip install --system .

.gitignore

+65-57
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Python template
13
# Byte-compiled / optimized / DLL files
24
__pycache__/
35
*.py[cod]
@@ -20,7 +22,6 @@ parts/
2022
sdist/
2123
var/
2224
wheels/
23-
share/python-wheels/
2425
*.egg-info/
2526
.installed.cfg
2627
*.egg
@@ -39,17 +40,14 @@ pip-delete-this-directory.txt
3940
# Unit test / coverage reports
4041
htmlcov/
4142
.tox/
42-
.nox/
4343
.coverage
4444
.coverage.*
4545
.cache
4646
nosetests.xml
4747
coverage.xml
4848
*.cover
49-
*.py,cover
5049
.hypothesis/
5150
.pytest_cache/
52-
cover/
5351

5452
# Translations
5553
*.mo
@@ -59,7 +57,6 @@ cover/
5957
*.log
6058
local_settings.py
6159
db.sqlite3
62-
db.sqlite3-journal
6360

6461
# Flask stuff:
6562
instance/
@@ -72,51 +69,16 @@ instance/
7269
docs/_build/
7370

7471
# PyBuilder
75-
.pybuilder/
7672
target/
7773

7874
# Jupyter Notebook
7975
.ipynb_checkpoints
8076

81-
# IPython
82-
profile_default/
83-
ipython_config.py
84-
8577
# pyenv
86-
# For a library or package, you might want to ignore these files since the code is
87-
# intended to run in multiple environments; otherwise, check them in:
88-
# .python-version
89-
90-
# pipenv
91-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94-
# install all needed dependencies.
95-
#Pipfile.lock
96-
97-
# poetry
98-
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99-
# This is especially recommended for binary packages to ensure reproducibility, and is more
100-
# commonly ignored for libraries.
101-
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102-
#poetry.lock
103-
104-
# pdm
105-
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106-
#pdm.lock
107-
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108-
# in version control.
109-
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110-
.pdm.toml
111-
.pdm-python
112-
.pdm-build/
113-
114-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115-
__pypackages__/
116-
117-
# Celery stuff
78+
.python-version
79+
80+
# celery beat schedule file
11881
celerybeat-schedule
119-
celerybeat.pid
12082

12183
# SageMath parsed files
12284
*.sage.py
@@ -142,21 +104,67 @@ venv.bak/
142104

143105
# mypy
144106
.mypy_cache/
145-
.dmypy.json
146-
dmypy.json
107+
### JetBrains template
108+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
109+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
110+
111+
# User-specific stuff:
112+
.idea/**/workspace.xml
113+
.idea/**/tasks.xml
114+
.idea/dictionaries
115+
116+
# Sensitive or high-churn files:
117+
.idea/**/dataSources/
118+
.idea/**/dataSources.ids
119+
.idea/**/dataSources.local.xml
120+
.idea/**/sqlDataSources.xml
121+
.idea/**/dynamic.xml
122+
.idea/**/uiDesigner.xml
123+
124+
# Gradle:
125+
.idea/**/gradle.xml
126+
.idea/**/libraries
127+
128+
# CMake
129+
cmake-build-debug/
130+
cmake-build-release/
131+
132+
# Mongo Explorer plugin:
133+
.idea/**/mongoSettings.xml
134+
135+
## File-based project format:
136+
*.iws
137+
138+
## Plugin-specific files:
139+
140+
# IntelliJ
141+
out/
142+
143+
# mpeltonen/sbt-idea plugin
144+
.idea_modules/
145+
146+
# JIRA plugin
147+
atlassian-ide-plugin.xml
148+
149+
# Cursive Clojure plugin
150+
.idea/replstate.xml
151+
152+
# Crashlytics plugin (for Android Studio and IntelliJ)
153+
com_crashlytics_export_strings.xml
154+
crashlytics.properties
155+
crashlytics-build.properties
156+
fabric.properties
157+
158+
.idea
159+
160+
conda_build/
161+
162+
.vscode/
147163

148-
# Pyre type checker
149-
.pyre/
164+
*.ipynb
150165

151-
# pytype static type analyzer
152-
.pytype/
166+
.ruff_cache/
153167

154-
# Cython debug symbols
155-
cython_debug/
168+
data/
156169

157-
# PyCharm
158-
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160-
# and can be added to the global gitignore or merged into this file. For a more nuclear
161-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162-
#.idea/
170+
.venv_*

.pre-commit-config.yaml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
ci:
2+
autofix_commit_msg: |
3+
[pre-commit.ci] auto fixes from pre-commit.com hooks
4+
5+
for more information, see https://pre-commit.ci
6+
autofix_prs: true
7+
autoupdate_branch: ''
8+
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
9+
autoupdate_schedule: weekly
10+
skip: [ ]
11+
submodules: false
12+
13+
repos:
14+
- repo: https://github.com/pre-commit/pre-commit-hooks
15+
rev: v5.0.0
16+
hooks:
17+
- id: check-added-large-files
18+
- id: check-ast
19+
- id: check-builtin-literals
20+
- id: check-case-conflict
21+
- id: check-docstring-first
22+
- id: check-executables-have-shebangs
23+
- id: check-shebang-scripts-are-executable
24+
- id: check-symlinks
25+
- id: check-toml
26+
- id: check-xml
27+
- id: detect-private-key
28+
- id: forbid-new-submodules
29+
- id: forbid-submodules
30+
- id: mixed-line-ending
31+
- id: destroyed-symlinks
32+
- id: fix-byte-order-marker
33+
- id: check-json
34+
- id: debug-statements
35+
- id: end-of-file-fixer
36+
- id: trailing-whitespace
37+
- id: requirements-txt-fixer
38+
- repo: https://github.com/astral-sh/ruff-pre-commit
39+
# Ruff version.
40+
rev: v0.7.1
41+
hooks:
42+
# Run the linter.
43+
- id: ruff
44+
exclude: '__pycache__/'
45+
args: [ --fix ]
46+
# Run the formatter.
47+
- id: ruff-format
48+
- repo: https://github.com/pre-commit/pygrep-hooks
49+
rev: v1.10.0
50+
hooks:
51+
- id: python-check-mock-methods
52+
- id: python-use-type-annotations
53+
- id: python-check-blanket-noqa
54+
- id: python-use-type-annotations
55+
- id: text-unicode-replacement-char
56+
- repo: https://github.com/codespell-project/codespell
57+
rev: v2.3.0
58+
hooks:
59+
- id: codespell
60+
additional_dependencies: ["tomli"]
61+
- repo: https://github.com/tox-dev/pyproject-fmt
62+
rev: "v2.4.3"
63+
hooks:
64+
- id: pyproject-fmt
65+
- repo: https://github.com/pre-commit/mirrors-mypy
66+
rev: v1.13.0
67+
hooks:
68+
- id: mypy
69+
files: ^benchmark/
70+
args:
71+
[ --config-file=pyproject.toml ]

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 albumentations-team
3+
Copyright (c) 2024 Vladimir Iglovikov
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)