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

refactor: move things around #241

Merged
merged 1 commit into from
Feb 12, 2020
Merged

refactor: move things around #241

merged 1 commit into from
Feb 12, 2020

Conversation

alexander-fenster
Copy link
Contributor

In this PR I'm moving a lot of things around to achieve the following goals:

  • no copy-paste in baselines and circleci.yml
  • all filenames with dashes (no underscores, no camelCase in filenames)
    • not that I'm a fan of kebab-case, I just want all files look similar :)
  • typescript/ folder contains only *.ts files, fixtures and protos moved out
  • minor changes moving things around.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 12, 2020
Copy link
Contributor

@xiaozhenliu-gg5 xiaozhenliu-gg5 left a comment

Choose a reason for hiding this comment

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

Only some small concerns are commented, but overall it looks great, and it's really helpful to make the code more readable and cleaner, thanks @alexander-fenster !

npm install
npm test
npm run fix
npm run compile
npm run system-test
npm run docs
npm run docs-test
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this intentional to remove docs-test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I think it does not make sense to check if links in the generated docs are valid because if they are not, it's more likely not a generator failure. We disabled this check for DLP and might also want to disable it for monitoring, which probably means it's better to disable it for all libraries.

@@ -3,7 +3,7 @@ google/protobuf/descriptor.proto
google/api/annotations.proto
google/protobuf/duration.proto
google/protobuf/timestamp.proto
google/kms/v1/resources.proto
google/cloud/kms/v1/resources.proto
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a little bit confused here, if we generated google/kms/v1/resources.proto before instead of /google/cloud/kms.... in proto_list, that sounds like a bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Originally kms lived in protos/google/kms, I just moved it to protos/google/cloud/kms to match the googleapis location.

@@ -7,8 +7,5 @@
},
"include": [
"typescript/**/*.ts"
],
"exclude":[
"typescript/test/test_application_ts/src/*.ts"
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm not sure the reason why we excluded the file in the tsconfig here, if it's safe to remove 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.

Because it's now outside of typescript folder (it's a fixture, so it's in fixtures).

@@ -0,0 +1,137 @@
// Copyright 2020 Google LLC
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks great, much cleaner to have a separate file for code map!

describe('Baseline tests', () => {
initBaselineTest();

runBaselineTest({
Copy link
Contributor

Choose a reason for hiding this comment

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

This template is so cool, thanks for doing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants