Skip to content

Add CONTRIBUTING.md document#146

Open
dswarbrick wants to merge 1 commit into
masterfrom
contributing
Open

Add CONTRIBUTING.md document#146
dswarbrick wants to merge 1 commit into
masterfrom
contributing

Conversation

@dswarbrick

Copy link
Copy Markdown
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
Comment thread CONTRIBUTING.md

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

## Python Scripts

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

4 participants