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

add option to exclude STI subclasses from annotation #365

Merged
merged 3 commits into from May 10, 2016

Conversation

ethnext
Copy link
Contributor

@ethnext ethnext commented Apr 21, 2016

I've added an option named exclude_sti_subclasses and code which checks if a model has a superclass under AR::B with the same table in order to exclude STI subclasses from annotation.

this is a need I have on a project with a large number of subclasses of certain models, where annotating every one generates a lot of noise on any schema change, so I prefer to just annotate the parent class.

@coveralls
Copy link

Coverage Status

Coverage decreased (-51.8%) to 21.252% when pulling fea8f6a on venuenext:d_exclude_sti_subclasses into f1fa351 on ctran:develop.

@ecnalyr
Copy link

ecnalyr commented Apr 21, 2016

Is there a way to exclude a single file from the exclude_sti_subclasses option?

An opt-in option, opposite the opt-out option of # -*- SkipSchemaAnnotations.

@ethnext
Copy link
Contributor Author

ethnext commented Apr 21, 2016

no, not as this is currently implemented

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.07%) to 72.994% when pulling 0416341 on venuenext:d_exclude_sti_subclasses into f1fa351 on ctran:develop.

@ecnalyr
Copy link

ecnalyr commented Apr 21, 2016

This doesn't look like it breaks anything: venuenext#1

@ctran
Copy link
Owner

ctran commented Apr 22, 2016

Can you squash the commits and fix the broken CI tests? Thanks

@coveralls
Copy link

coveralls commented May 10, 2016

Coverage Status

Coverage increased (+0.08%) to 73.588% when pulling ff76c18 on venuenext:d_exclude_sti_subclasses into 3b41216 on ctran:develop.

@coveralls
Copy link

coveralls commented May 10, 2016

Coverage Status

Coverage increased (+0.08%) to 73.588% when pulling 694a44e on venuenext:d_exclude_sti_subclasses into 3b41216 on ctran:develop.

@ethnext
Copy link
Contributor Author

ethnext commented May 10, 2016

not sure about the semaphore failure now. it doesn't look related to changes I made.

@ctran ctran added this to the v2.7.2 milestone May 10, 2016
@ctran ctran added the feature label May 10, 2016
@ctran ctran merged commit 40c44a8 into ctran:develop May 10, 2016
@ctran
Copy link
Owner

ctran commented May 10, 2016

Thanks!

johncarney pushed a commit to johncarney/annotate_models that referenced this pull request Jun 19, 2017
* add option to exclude STI subclasses from annotation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants