Skip to content

Commit

Permalink
chore: squash commits for release
Browse files Browse the repository at this point in the history
  • Loading branch information
amitkparekh committed Dec 5, 2023
0 parents commit 6d62491
Show file tree
Hide file tree
Showing 267 changed files with 332,939 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
root = true

[*]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
indent_style = tab
indent_size = 2

# YAML doesn't support hard tabs
# Templates that will be weird with hard tabs in the website editor
[*.{yml,yaml,md}]
indent_style = space
indent_size = 2

# Force python as python demands
[*.{py,ipynb}]
indent_size = 4
indent_style = space
121 changes: 121 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
[flake8]
extend-ignore =
# Allow function call as argument default
B008,
# Do not enforce trailing comma (lets Black decide what is best)
C812,C813,C814,C815,C816,C818,C819,
# Don't ask for docstring at top of module --- put it in the functions/classes
D100,
# Do not check for docstring within __init__ method
D107,
# Ignore whitespace before ';'
E203,
# Don't ask about line length, Black recommends using bugbear B950 instead
E501,
# Stop finding commented out code because it's mistaking shape annotations for code
E800,
# Just let the formatter complain about isort
I,
# Stop complaining about using functions from random
S311,
# Ignore errors for internal mypy traceback, stderr output, or an unmatched line.
T499,
# Do not complain about line-break before binary operator (caused by Black)
W503,
# Do not warn on too many imports.
WPS201,
# Do not warn on too many module members
WPS202,
# Do not warn when too many arguments in functions
WPS211,
# Do not warn on too many methods
WPS214,
# Allow lots of importing from the same module --- it can happen and thats okay!
WPS235,
# Do not warn on complex f-string
WPS237,
# Allow relative module references
WPS300,
# Allow f-strings
WPS305,
# Do not force base classes to inherit object
WPS306,
# Allow return statement that simply returns a prior statement
WPS331,
# Allow new lines to start with a dot (caused by Black)
WPS348,
# Allow logic in __init__ modules
WPS412,
# Google Python style is not RST until after processed by Napoleon
# See https://github.com/peterjc/flake8-rst-docstrings/issues/17
RST201,RST203,RST301,
extend-select =
# Should raise AssertionError instead of assert False
B011,
# Use of break, continue or return in finally blocks will silence exceptions.
B012,
# Redundant exception types in except
B014,
# Pointless comparisons
B015,
# Cannot raise a literal
B016,
# Do not use `self.assertRaises(Exception)`
B017,
# Find useless expressions
B018,
# Use namedtuple instead of dataclass when only `__init__` attributes are set
B903,
# Within an except clause, raise exceptions with `raise ... from err` or `raise ...
# from None` to distinguish them from errors in exception handling
B904,
# Counterpart to W503, enforce having the operator at the start of a new line.
W504,

max-line-length = 99
max-complexity = 18
max-methods = 10
max-line-complexity = 18
max-local-variables = 20
max-expressions = 20
max-function-expressions = 10
max-module-expressions = 20
max-string-usages = 10
max-annotation-complexity = 4
min-name-length = 1
max-try-body-length = 2
format = wemake

# Black enforces double quotes.
inline-quotes = double

docstring-convention = google

# Darglint
docstring_style = google
strictness = long

nested-classes-whitelist =
Meta
Params
Config

allowed-domain-names =
data
utils
util
params

per-file-ignores =
src/*/_version.py:WPS410
src/**/__init__.py:D,F401,WPS436
tests/*:D,F401,WPS118,WPS202,WPS204,WPS214,WPS218,WPS226,WPS231,WPS232,WPS235,WPS301,WPS432,WPS437,WPS442,S101
scripts/update_torch_cuda.py:S404,S603,S607,WPS323,WPS333,WPS432,WPS433,WPS459

extend-exclude=
.venv/,
*_cache/,
.cache/,
logs/,
storage/,
docs/
35 changes: 35 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/new_downstream_dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!-- Adding a new downstream dataset -->

## Description

<!-- What have you added and why? -->

## Checklist

- [ ] I have read the ["How to add a new downstream dataset" instructions](docs/how-to-add-a-new-downstream-dataset.md)
- [ ] A subset of the raw data has been added for testing the new dataset
- [ ] This PRs metadata is complete

### Adding a new dataset

- [ ] The dataset name has been added to the `DatasetName` enum
- [ ] The value for the new option in `DatasetName` is formatted like the public dataset name
- [ ] The dataset name has been added to the `DatasetModalityMap`
- [ ] The dataset name has been included in the `AnnotationDatasetMap`

### Creating the instance

- [ ] A new instance exists for the dataset, and it inherits from `BaseInstance`
- [ ] The new instance model for the dataset has tests (in `tests/datamodels/`)
- [ ] The new instance has been included in `emma_datasets/datamodels/datasets/__init__.py`
- [ ] The class name for the instance is in pascal case
- [ ] The instance is well-documented to ensure others can easily know what is happening and why

### Adding the dataset to the `downstream` command

- [ ] There is a new command to process the downstream dataset
- [ ] The name of the command is consistent with other commands
- [ ] The function has a docstring for the help of the command
- [ ] The function is listed as a command
- [ ] There are tests for the new dataset with the `DownstreamDbCreator` (in `tests/test_downstream_db_creator.py`)
- [ ] There are tests for the new command (in `tests/commands/test_create_downstream_dbs.py`)
90 changes: 90 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
# Labels names are important as they are used by Release Drafter to decide
# regarding where to record them in changelog or if to skip them.
#
# The repository labels will be automatically configured using this file and
# the GitHub Action https://github.com/marketplace/actions/github-labeler.
## more info https://github.com/crazy-max/ghaction-github-labeler

# ------------------------- Conventional Commit types ------------------------ #
# From https://github.com/commitizen/conventional-commit-types/blob/master/index.json

- name: feature
description: A new enhancement or feature
color: 0A8844
from_name: "enhancement"

- name: fix
description: A bug fix
color: d23832
from_name: "bug"

- name: documentation
description: Documentation changes only
color: 8AD9F5

- name: style
description: Changes that do not affect meaning of code (formatting, etc.)
color: F9CD8E

- name: refactor
description: Code change that neither fixes a bug nor adds a feature
color: FBCA0C
from_name: refactoring

- name: performance
description: Code change that improves performance
color: F2A33C

- name: test
description: Adding missing tests or correcting existing tests
color: 34FFB3

- name: build
description: Changes that affect the build system or external dependencies
color: 8F4FBB

- name: continuous integration
description: Changes to CI configuration and scripts
color: FCBFE3

- name: chore
description: Other changes that don't modify src or test files
color: d3d3d3

- name: revert
description: Revert a previous commit
color: 1e1e1e

- name: backwards incompatible
description: incompatible changes to how the application works
color: AB2232

- name: question
description: Further information is requested
color: EE328E

# ------------------------------- Dependencies ------------------------------- #
- name: dependencies
description: Pull requests that update dependencies
color: 0366d6

# ------------------------------ Utility labels ------------------------------ #
- name: automerge
color: "ffffff"
description: "Automerge this PR"

- name: "stale"
color: "ffffff"
description: ""
# - name: duplicate
# description: This issue or pull request already exists
# color: ffffff

# - name: invalid
# description: This doesn't seem right
# color: ffffff

# - name: wontfix
# description: This will not be worked on
# color: ffffff
Loading

0 comments on commit 6d62491

Please sign in to comment.