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

examples: Run ni-python-styleguide separately for each example #443

Merged
merged 4 commits into from
Oct 13, 2023

Conversation

bkeryan
Copy link
Collaborator

@bkeryan bkeryan commented Oct 13, 2023

What does this Pull Request accomplish?

Add a dependency on ni-python-styleguide to each example. Running ni-python-styleguide from the main project treats the examples as part of the main project, which affects sorting of imports.

Update the main project's ni-python-styleguide and black configurations to exclude the examples.

Update sample_measurement's ni-python-styleguide configuration to exclude Protobuf codegen.

Update the check_examples workflow to lint the examples separately.

Why should this Pull Request be merged?

Fixes #374

What testing has been done?

PR build

@github-actions
Copy link

Test Results

       30 files  ±0       30 suites  ±0   25m 43s ⏱️ +32s
     451 tests ±0     375 ✔️ ±0       76 💤 ±0  0 ±0 
13 500 runs  ±0  9 635 ✔️ ±0  3 865 💤 ±0  0 ±0 

Results for commit 1217a6b. ± Comparison against base commit 1fdb753.

@dixonjoel
Copy link
Collaborator

To check my understanding, locally, when developing now, if we want to check any examples we need to change directory to the example and then run 'poetry run ni-python-styleguide lint (or fix)' there? And 'poetry run ni-python-styleguide lint' from the root will no longer lint the examples?

@bkeryan
Copy link
Collaborator Author

bkeryan commented Oct 13, 2023

To check my understanding, locally, when developing now, if we want to check any examples we need to change directory to the example and then run 'poetry run ni-python-styleguide lint (or fix)' there? And 'poetry run ni-python-styleguide lint' from the root will no longer lint the examples?

Yes, that's right.

I would still like to use PoeThePoet or some Poetry workspace plugin to automate running tasks on all of the examples, but this isn't required to fix the bug.

@bkeryan bkeryan merged commit 60ead5b into main Oct 13, 2023
20 checks passed
@bkeryan bkeryan deleted the users/bkeryan/examples-3rd-party branch October 13, 2023 14:56
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.

ni-python-styleguide treats ni_measurementlink_service as 3rd party for projects that copied Examples' helpers
2 participants