-
Notifications
You must be signed in to change notification settings - Fork 624
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
Generate instrumentation packages setup.py files #474
Conversation
d47e628
to
9a20509
Compare
ebd5239
to
ab36898
Compare
@@ -11,6 +11,12 @@ | |||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
# See the License for the specific language governing permissions and | |||
# limitations under the License. | |||
|
|||
|
|||
# DO NOT EDIT. THIS FILE WAS AUTOGENERATED FROM templaes/wsgi. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like a typo sneaked into the generated code, though it doesnt appear in the generator 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, looks like I updated the generator but didn't run it before checking in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would love to see this extended to include the version file at some point as well, though I don't know if the instrumentation versions will always been the same or not.
@@ -11,6 +11,12 @@ | |||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
# See the License for the specific language governing permissions and | |||
# limitations under the License. | |||
|
|||
|
|||
# DO NOT EDIT. THIS FILE WAS AUTOGENERATED FROM templaes/urllib3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this say it was generated from instrumentation_setup.py?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. This is incorrect. Fixing.
|
||
|
||
# DO NOT EDIT. THIS FILE WAS AUTOGENERATED FROM templaes/wsgi. | ||
# Run `python scripts/generate_setuppy.py` to regenerate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I see why you named this the way you did, but I would rename the script generate_setup.py
, it's easier to read.
90a11ec
to
538c3f1
Compare
All instrumentations packages have almost exactly same setup.py files. This commit adds a python script that generates it from a source template. This dramatically reduces the time and effort required to update all instrumentation setup.py files, and also reduces chances of making manual mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this really does cleanup things and ensures consistency in the instrumentations.
All instrumentations packages have almost exactly same setup.py files. This commit adds a python script that generates it from a source template. This dramatically reduces the time and effort required to update all instrumentation setup.py files, and also reduces chances of making manual mistakes.
All instrumentations packages have almost exactly same setup.py files. This commit adds a python script that generates it from a source template. This dramatically reduces the time and effort required to update all instrumentation setup.py files, and also reduces chances of making manual mistakes.
Description
All instrumentations packages have almost exactly same setup.py files. This commit adds a python script that generates it from a source template. This dramatically reduces the time and effort required to update all instrumentation setup.py files, and also reduces chances of making manual mistakes.
I'm working on another feature where I needed to update setup.py files for all insrumentations. I'll use this once it is merged.
Another alternative is to take out common code as yet another package and add it as a
setup_requires
dependency so it is installed in target envs before setup.py runs but this adds another runtime dependency for users and doesn't give them any benefits. It's also not heavily used in the eco-system so non standard tools (other than pip) may not work well with it.Type of change
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.