Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allows 'lint' flag in attributes #28

Merged
merged 4 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# a Dockerfile to containerize the build of ocsf-validator
#
# To build a container:
#
# docker build -t ocsf-validator:latest .
#
# To use it to validate a schema
#
# docker run --rm -v $PWD:/schema ocsf-validator:latest /schema
#

FROM python:3.11.9-alpine3.19

RUN apk add --no-cache poetry nodejs npm

WORKDIR /src

# install stuff that doesn't change much
ADD poetry.lock pyproject.toml .
RUN poetry install --no-root

# pull in the rest of the code
ADD . .
RUN poetry install --only-root
RUN poetry run black .
RUN poetry run isort .
RUN poetry run pyright ocsf_validator
RUN poetry run pytest

ENTRYPOINT ["poetry", "run", "python", "-m", "ocsf_validator"]
1 change: 1 addition & 0 deletions ocsf_validator/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class OcsfDeprecationInfo(TypedDict):
"enum": NotRequired[Dict[str, OcsfEnumMember]],
"group": NotRequired[str],
"is_array": NotRequired[bool],
"lint": NotRequired[Sequence[str]],
"max_len": NotRequired[int],
"name": NotRequired[str],
"notes": NotRequired[str],
Expand Down
Loading