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 CONTRIBUTING.md document #146

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add CONTRIBUTING.md document #146

wants to merge 1 commit into from

Conversation

dswarbrick
Copy link
Member

Initial cut of CONTRIBUTING document, containing basic guidelines for textfile collector scripts in this repo.

@SuperQ Can you think of anything we need to add / remove?

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
@dswarbrick dswarbrick requested a review from SuperQ May 21, 2023 17:46

Metric and label names should follow the Prometheus [naming guidelines][2].

## Python Scripts
Copy link
Contributor

Choose a reason for hiding this comment

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

How should Python scripts state requirements beyond prometheus-client?

Copy link
Contributor

Choose a reason for hiding this comment

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

One idea, we could move to having directory-per-script and requirements.txt files for python scripts.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup, that's certainly possible. I am a Python noob, especially on tooling, so is there a way to do pip install github.com:org/repo/subfolder#revision or something similar?

Copy link
Contributor

Choose a reason for hiding this comment

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

not really. you can pip install . from within a directory, but typically you'd ship this whole project as one big project on pypi and install it as one chunk.

that said, i am not sure you'd want to set that as policy right now. i would suggest you start with the drafted policy as is, and then maybe iterate once this PR is merged, as python packaging is rather more complicated than, say, shell scripts.

personnally, i wouldn't do the requirements.txt dance at all and keep things at a simple one-file-per-script approach. more complicated exporters should just have their own git projects IMHO.

Copy link
Member Author

Choose a reason for hiding this comment

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

Like @anarcat, I think that once something crosses the threshold of being pip-installable, it really ought to move to its own repo which can better cater to its needs such as having a requirements.txt, and the main focus of that repo being $foo.

If we were going to make this repo pip-installable, I think we would need to more accurately define what the mission of this repo is. At present, it's just a jumble of unrelated textfile collector scripts, which is fine - so long as it doesn't promise to be anything more.

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.

None yet

4 participants