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

Update docs for table builders #121

Merged
merged 3 commits into from
Sep 12, 2023
Merged

Update docs for table builders #121

merged 3 commits into from
Sep 12, 2023

Conversation

dogversioning
Copy link
Contributor

This PR makes the following changes:

  • Adds a new doc about working with table builders
  • Touches up some out of date documentation in the getting started guide
  • Adds a section to the CLI-generated template study

Checklist

  • Consider if documentation (like in docs/) needs to be updated
  • Consider if tests should be added
  • Run pylint if you're making changes beyond adding studies
  • Update template repo if there are changes to study configuration

docs/creating-studies.md Show resolved Hide resolved
Comment on lines 81 to +83
We recommend creating a git repo per study, to help version your study data, which
you can do in the same directory as the manifest file.
you can do in the same directory as the manifest file. If you've forked your study from
the template, you've already checked this step off.
Copy link
Contributor

Choose a reason for hiding this comment

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

If the create command just started a git dir for ya, you could drop this paragraph. Should the create command just clone the template repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't like the idea of trying to manage a user's git infrastructure, honestly (esp with the above comment about maintaining multiple paths) - I'll take a paragraph of text.

Copy link
Contributor

Choose a reason for hiding this comment

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

git infrastructure is not what I meant to suggest - or maybe we're just using different words for things.

If create makes a new directory with your new study files, it doesn't seem unreasonable to also do git init and git add *; git commit -a -m "initial commit" for them. I wouldn't have thought of that as managing their git infrastructure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

a user could, theoretically, install the library from pip and not worry about git until later.

i could try to detect if git is present or not? i dont know, i'm still not crazy about it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, was just a suggestion - ignore it if it doesn't fit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not going to do this as part of this PR, but I created a task around this: #122 - if you want to add any notes, please do.

Comment on lines 135 to 137
- You may want to select a SQL style guide as a reference. Mozilla provides a
[SQL style guide](https://docs.telemetry.mozilla.org/concepts/sql_style.html),
which our sqlfluff config enforces.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a bit confusing to me - am I free to pick a new style guide, or will cumulus-library enforce Mozilla's on me? Could we just say "Recommended: go read the mozilla study guide, we will enforce it"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can elect to not run SQLFluff - this is the current state here for non-covid studies. But if you do use it, that's what SQLFluff enforces

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, I was trying to suggest that this language could be cleaned up to make that state of things clearer. Like, "By default, we use sqlfluff to enforce Mozilla's guide here. If you're a crazy person and want to go change that, you can and here's how" - but I don't know how much you want to point people towards shooting their own foot anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Clarified this a little bit, which also makes the next line about github's guide make more sense.

docs/creating-studies.md Outdated Show resolved Hide resolved
docs/creating-studies.md Outdated Show resolved Hide resolved
docs/creating-sql-with-python.md Outdated Show resolved Hide resolved
docs/creating-sql-with-python.md Outdated Show resolved Hide resolved
docs/creating-sql-with-python.md Outdated Show resolved Hide resolved
docs/creating-sql-with-python.md Show resolved Hide resolved
docs/creating-sql-with-python.md Outdated Show resolved Hide resolved
@dogversioning dogversioning merged commit ee6afd8 into main Sep 12, 2023
3 checks passed
@dogversioning dogversioning deleted the mg/getting_started branch September 12, 2023 14:06
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.

2 participants