Skip to content

Commit

Permalink
got rid of regenerate- project script
Browse files Browse the repository at this point in the history
  • Loading branch information
evalott100 committed Jan 10, 2025
1 parent 4f4fded commit 176413f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/explanations/schema-generation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ After changing any of the documents it's necessary to regenerate the schemas. Th

.. code-block:: bash
regenerate-schema
python -m event_model.generate
which is a python environment script in a dev install of event-model.

Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ dev = [
"datamodel-code-generator",
]

[project.scripts]
regenerate-documents = "event_model.generate.__main__:generate"

[project.urls]
GitHub = "https://github.com/bluesky/event-model"

Expand Down
10 changes: 6 additions & 4 deletions src/event_model/tests/test_schema_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ def test_generated_json_matches_typed_dict(tmpdir: Path):
or new_jsonschema_path.read_text() != old_jsonschema_path.read_text()
):
raise Exception(
f"{str(old_jsonschema_path)} does not match {str(new_jsonschema_path)}."
" Did you forget to run `regenerate-documents` after changes ?"
f"{str(old_jsonschema_path)} does not match "
f"{str(new_jsonschema_path)}. Did you forget to run "
"`python -m event_model.generate` after changes?"
)

for new_document_path in tmp_documents.iterdir():
Expand All @@ -37,6 +38,7 @@ def test_generated_json_matches_typed_dict(tmpdir: Path):
or new_document_path.read_text() != old_document_path.read_text()
):
raise Exception(
f"{str(old_document_path)} does not match {str(new_document_path)}."
" Did you forget to run `regenerate-documents` after changes ?"
f"{str(old_document_path)} does not match "
f"{str(new_document_path)}. Did you forget to run "
"`python -m event_model.generate` after changes?"
)

0 comments on commit 176413f

Please sign in to comment.