Skip to content

Conversation

@ana-barbosa
Copy link
Contributor

Motivation:

  • The graph resolution generated in my project is too low, making it almost impossible to read (see details below)
  • Right now I can't customize the dpi attribute as a parameter
  • Customizing dpi after calling create_schema_graph is cumbersome: graph.obj_dict["attributes"]["dpi"] = 300

Proposed changes:

  • Keep the original set of configs, but aggregated under the new format_graph parameter
  • Allow users to customize all graph configs exposed by pydot

Image creation examples:
Current implementation without dpi adjustment:

graph = create_schema_graph(
    engine=engine,
    metadata=metadata,
    show_datatypes=False,
    show_indexes=False,
    rankdir='LR',
    concentrate=False,
)
graph.write_jpeg('./dbschema.jpeg')

dbschema_before

Proposed implementation:

graph = create_schema_graph(
    engine=engine,
    metadata=metadata,
    show_datatypes=False,
    show_indexes=False,
    format_graph={"rankdir":"LR", "concentrate": False, "dpi": 300},
)
graph.write_jpeg('./dbschema.jpeg')

dbschema_after

Copy link
Collaborator

@Zlopez Zlopez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but I would like to separate the version bump to different PR.

@Zlopez
Copy link
Collaborator

Zlopez commented Sep 18, 2025

Also the tests are failing.

@ana-barbosa
Copy link
Contributor Author

ana-barbosa commented Sep 18, 2025

Also the tests are failing.

I am not sure if I can fix this one myself, because it seems like these are problems with repo actions: https://github.com/fschulze/sqlalchemy_schemadisplay/actions/runs/17805776025/job/50672153234?pr=46

Pre-commit and test steps seem to be using the updated actions/cache version, but somehow the action itself understands it is deprecated.


Never mind! The message is misleading.... it should be bumped to 4.0.0 only. I'll look into it.

@ana-barbosa ana-barbosa requested a review from Zlopez September 18, 2025 09:56
- name: Cache python dependencies
id: cache-pip
uses: actions/cache@v3.2.4
uses: actions/cache@v4.0.5
Copy link
Contributor Author

@ana-barbosa ana-barbosa Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md#400:

The new service will gradually roll out as of February 1st, 2025. The legacy service will also be sunset on the same date. Changes in this release are fully backward compatible.

All previous versions of this package will be deprecated. We recommend upgrading to version 4.0.0 as soon as possible before February 1st, 2025.

So no extra changes are necessary apparently.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move this to separate PR? It will not make much logical sense to put it in same PR and the change is still failing. It seems that there are now using v4 as version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to keep this change here to keep the process simple, specially because this doesn't change the feature being added.

@fschulze
Copy link
Owner

Wow, this stuff is confusing. There seems to be different things both called cache, or the link is just confusing (it mentions actions/toolkit). There doesn't seem to be a v4.0.5 for actions/cache. I'd say just use v4 instead of trying to pin a specific one. Otherwise v4.2.4 seems to be the latest https://github.com/actions/cache

@ana-barbosa
Copy link
Contributor Author

Wow, this stuff is confusing. There seems to be different things both called cache, or the link is just confusing (it mentions actions/toolkit). There doesn't seem to be a v4.0.5 for actions/cache. I'd say just use v4 instead of trying to pin a specific one. Otherwise v4.2.4 seems to be the latest https://github.com/actions/cache

Yes, the original error message was also misleading about the support versions too, since it said that v3 was also valid.
I changed to v4.

@Zlopez Zlopez merged commit 0dccb36 into fschulze:master Sep 19, 2025
4 checks passed
@Zlopez
Copy link
Collaborator

Zlopez commented Sep 19, 2025

I merged the changes, now you can create the bump version PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants