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

[BACKEND] Include ERD in README.md #7

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

woolsox
Copy link

@woolsox woolsox commented Oct 31, 2019

Boxcar ships with rails-erd gem already included, but frankly we don't make a ton of use of it. I shared Everharbors' ERD with @ludwigmuench earlier today as an on boarding material and we realized that it should simply be included in all projects as a deliverable.

Copy link
Contributor

@ludwigmuench ludwigmuench left a comment

Choose a reason for hiding this comment

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

👍

@dkniffin
Copy link

dkniffin commented Nov 8, 2019

I wonder if we can set it up so that each project gets it's ERD auto-updated on migration or something, then linked to from the readme. We already have auto-update of annotations from a rake task. Maybe we can hook in there, or do something similar.

@ludwigmuench
Copy link
Contributor

ludwigmuench commented Nov 8, 2019

I wonder if we can set it up so that each project gets it's ERD auto-updated on migration or something, then linked to from the readme. We already have auto-update of annotations from a rake task. Maybe we can hook in there, or do something similar.

According to https://github.com/voormedia/rails-erd#auto-generation that's as simple as

bundle exec rails g erd:install

Once you did that, on bundle exec rails db:migrate the diagram is getting (re-)generated.

@dkniffin
Copy link

dkniffin commented Nov 8, 2019

Hmm. So yeah, let's set that up in boxcar then. That feels like an easy add

@woolsox
Copy link
Author

woolsox commented Nov 22, 2019

@ludwigmuench @dkniffin smashingboxes/boxcar#58

@woolsox
Copy link
Author

woolsox commented Nov 22, 2019

I just realized the PR I linked only does the ERD installation for auto-update but does not link it to the README. However, is it possible to link a PDF into a markdown file? Or can a PDF just be checked into source and render in Git?

@ludwigmuench
Copy link
Contributor

ludwigmuench commented Nov 22, 2019

I just realized the PR I linked only does the ERD installation for auto-update but does not link it to the README. However, is it possible to link a PDF into a markdown file? Or can a PDF just be checked into source and render in Git?

[This is a relative link to a nested pdf file](testfolder/testfile.pdf)

@woolsox
Copy link
Author

woolsox commented Nov 22, 2019

@ludwigmuench PR updated with relative link

@ludwigmuench
Copy link
Contributor

@woolsox i would say if the boxcar PR is done and ERD generation is now fully automated, you can close this PR.

@ludwigmuench
Copy link
Contributor

or change it to just contain the info, that you can always find an up-to-date ERD linked in a rails project's README.

@woolsox
Copy link
Author

woolsox commented Nov 22, 2019

@ludwigmuench updated what it says so we have a record of "what its doing" if people wonder why the hell rails-erd is doing something to their app.

@@ -27,4 +38,8 @@ Consider the above folder structure. If you start the app by running `python mai
from package1 import module1
from package1.module2 import function1
from package2.subpackage1.module5 import function2
<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<<<<<<< HEAD

Copy link
Contributor

@ludwigmuench ludwigmuench left a comment

Choose a reason for hiding this comment

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

lgtm, except for some merge conflict artifacts that still have to be removed (see suggestions). also suggested to move the ERD chapter under a Ruby on Rails heading since there's also Python section

@@ -27,4 +38,8 @@ Consider the above folder structure. If you start the app by running `python mai
from package1 import module1
from package1.module2 import function1
from package2.subpackage1.module5 import function2
<<<<<<< HEAD
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
```

@@ -27,4 +38,8 @@ Consider the above folder structure. If you start the app by running `python mai
from package1 import module1
from package1.module2 import function1
from package2.subpackage1.module5 import function2
<<<<<<< HEAD
```
=======
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
=======

```
>>>>>>> c95fd600b839fb556cb793de912278ab9d5ffe85
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
>>>>>>> c95fd600b839fb556cb793de912278ab9d5ffe85

@@ -1,5 +1,16 @@
# Backend

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
## Ruby on Rails

@@ -1,5 +1,16 @@
# Backend

## Entity-Relationship Diagrams [ERD]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
## Entity-Relationship Diagrams [ERD]
### Entity-Relationship Diagrams [ERD]

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