Skip to content

Formatted Next 15 Files #4150

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

Merged
merged 5 commits into from
Oct 6, 2020

Conversation

Yash1256
Copy link
Contributor

Issue #4109 Applying Formatting on Next 15 Files

  1. pymc3/tests/test_math.py
  2. pymc3/tests/test_model_func.py
  3. pymc3/tests/test_model_graph.py
  4. pymc3/tests/test_examples.py
  5. pymc3/tests/test_model_helpers.py
  6. pymc3/tests/test_modelcontext.py
  7. pymc3/tests/test_pickling.py
  8. pymc3/tests/test_models_utils.py
  9. pymc3/sampling.py
  10. pymc3/model.py
  11. pymc3/tests/test_posdef_sym.py
  12. pymc3/tests/test_posterior_predictive.py
  13. pymc3/tests/test_models_linear.py
  14. pymc3/tests/test_parallel_sampling.py
  15. pymc3/tests/test_minibatches.py

@MarcoGorelli
Copy link
Contributor

Nice, thanks, there's just a couple of places where black joins concatenates strings implicitly on the same line so I've suggested changes there

@Yash1256
Copy link
Contributor Author

@MarcoGorelli Sir in the file model.py total 4 occurrence's of " " were there so I replaced all the 4 with space.

@codecov
Copy link

codecov bot commented Sep 30, 2020

Codecov Report

Merging #4150 into master will increase coverage by 0.01%.
The diff coverage is 88.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4150      +/-   ##
==========================================
+ Coverage   88.74%   88.75%   +0.01%     
==========================================
  Files          89       89              
  Lines       14024    14039      +15     
==========================================
+ Hits        12446    12461      +15     
  Misses       1578     1578              
Impacted Files Coverage Δ
pymc3/sampling.py 86.71% <ø> (ø)
pymc3/model.py 89.33% <88.46%> (ø)
pymc3/tests/models.py 87.76% <0.00%> (ø)
pymc3/plots/__init__.py 50.00% <0.00%> (ø)
pymc3/stats/__init__.py 92.00% <0.00%> (ø)
pymc3/tests/conftest.py 100.00% <0.00%> (ø)
pymc3/step_methods/gibbs.py 40.00% <0.00%> (ø)
pymc3/distributions/bound.py 91.59% <0.00%> (ø)
pymc3/step_methods/sgmcmc.py 0.00% <0.00%> (ø)
pymc3/step_methods/slicer.py 95.45% <0.00%> (ø)
... and 20 more

Copy link
Contributor

@AlexAndorra AlexAndorra left a comment

Choose a reason for hiding this comment

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

Thanks @Yash1256 ! Almost all good: just one place where Black formatting should be disabled to preserve readability (see my comment below)

0, 1, 0, 1, 0, 0, 0, 2, 1, 0, 0, 0, 1, 1, 0, 2,
3, 3, 1, 1, 2, 1, 1, 1, 1, 2, 4, 2, 0, 0, 1, 4,
0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1])
disasters_data = np.array(
Copy link
Contributor

@AlexAndorra AlexAndorra Oct 5, 2020

Choose a reason for hiding this comment

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

Please use # fmt: off here, to disable (and then re-enable) Black formatting -- see step 3 of the style guide

Copy link
Contributor

Choose a reason for hiding this comment

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

@Yash1256 thanks for updating - I think you'll want to checkout this file to how it is on upstream/master before putting # fmt: off and running black again.

Workflow would be something like

git fetch upstream --prune
git checkout upstream/master -- pymc3/tests/test_examples.py
<add in #fmt: off and #fmt: on as suggested by Alex>
black pymc3/tests/test_examples.py
git add -u
git commit -m <some descriptive message lol>
git push -u origin HEAD

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please review @AlexAndorra @MarcoGorelli

@AlexAndorra AlexAndorra linked an issue Oct 5, 2020 that may be closed by this pull request
Changes Done Sir used # fmt: off before and # fmt:on after the array
Changes updated
Copy link
Contributor

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@AlexAndorra AlexAndorra left a comment

Choose a reason for hiding this comment

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

All good now, thanks @Yash1256 !

@AlexAndorra AlexAndorra merged commit 6b765e4 into pymc-devs:master Oct 6, 2020
@Yash1256 Yash1256 deleted the Formatting_Next_15Files branch October 6, 2020 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apply black formatter
3 participants