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

Removed over-nesting in resources file and added test #498

Merged
merged 2 commits into from
Aug 21, 2021

Conversation

lrjball
Copy link
Contributor

@lrjball lrjball commented Mar 29, 2021

Fixes #497

To fix the issue of some openstack icons (20 in total) not being rendered properly, I have removed some of the extra nesting and brought all of the module directories in openstack under the openstack/ dir instead of being nested. I've also added a test to make sure extra nesting isn't included in the future.

I thought this was the easiest fix. The code could be rewritten to allow arbitrary nesting in the resources dir, but that may be overkill and it is probably best that the import paths aren't too long anyway.

Copy link
Collaborator

@gabriel-tessier gabriel-tessier left a comment

Choose a reason for hiding this comment

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

@lrjball
Thanks for this PR I think it's good that you added a unit test to ensure that deep path will fail tests!
I think it will be more explicit than raising error in the autogen and I +1 that the path must not be to deep and actual limitation is perfect.
There's already instruction in the CONTRIBUTING.md file, but when I added openstack I stick too much to the official structure and didn't test enough.
I hope it will be merge soon as some of the icons for openstack are not usable now.

If I can ask you for one change, can you update the test comment and use the

"resources///"
instead of
"resources/provider/module/icon.png"
To be consistent with the terms used in the CONTRIBUTING.md file.

updated doc string of test function
@lrjball
Copy link
Contributor Author

lrjball commented Apr 12, 2021

Thanks @gabriel-tessier

That makes sense, I've made that change now

Copy link
Owner

@mingrammer mingrammer left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you! :)

@mingrammer mingrammer merged commit e43c860 into mingrammer:master Aug 21, 2021
haad added a commit to haad/diagrams that referenced this pull request May 12, 2022
* add_raspbian_gen_os:
  update raspbian.png for size
  Added raspbian.png for Raspberry Pis.
  Add Raspberry Pi logo for describing RPis.
  fix: removed over-nesting in resources file and added test (mingrammer#498)
  feat(node): add Onprem puppet (mingrammer#492)
  feat(node): add SVN (mingrammer#426)
  feat(node): add Dynatrace in monitoring category (mingrammer#471)
  docs(contributing): add black tool requirement for autogen.sh (mingrammer#434)
  feat(node): add Tyk node (mingrammer#449)
  feat(node): add starlette framework (mingrammer#443)
  chore(deps-dev): bump docusaurus from 1.14.6 to 1.14.7 in /website (mingrammer#485)
  chore(deps): bump jinja2 from 2.11.3 to 3.0.1 (mingrammer#534)
  fix(website): add IBM in the side menu (mingrammer#574)
  chore(deps): bump graphviz from 0.16 to 0.17 (mingrammer#561)
  docs: replace master/slave terminology in Cluster example (mingrammer#521)
  fix(autogen): run autogen after IBM provider added. (mingrammer#569)
  docs(all): update from main to primary (mingrammer#573)
  feat(node): latex logo (mingrammer#565)
  feat(node): add k3s icon (mingrammer#575)
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.

Some of the openstack icons don't render properly
3 participants