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

Add/update/cleanup copyright headers in scimath #116

Merged
merged 4 commits into from
Jun 29, 2021

Conversation

rahulporuri
Copy link
Contributor

This PR adds/updates/cleansup copyright headers in scimath.

A large number of modules didnt have copyright headers. Some modules had copyright headers which were outdated or which had copyright headers in an old format. A smaller number had the original copyright of the author whose work was derived in some modules.

Note that some of the module docstrings contained information about the attributes, functions or classes defined within - which has been removed in this PR. We intend to open a separate PR to re-add the information to the module docstrings - across all modules in the scimath.units subpackage.

Poruri Sai Rahul added 2 commits June 25, 2021 09:56
This commits adds/updates/cleansup copyright headers in scimath.
A large number of modules didnt have copyright headers. Some modules had
copyright headers which were outdated or which had copyright headers in
an old format. A smaller number had the original copyright of the author
whose work was derived in some modules.
@codecov-commenter
Copy link

codecov-commenter commented Jun 25, 2021

Codecov Report

Merging #116 (32d3abb) into master (9237f55) will increase coverage by 0.13%.
The diff coverage is 90.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #116      +/-   ##
==========================================
+ Coverage   67.35%   67.49%   +0.13%     
==========================================
  Files          58       58              
  Lines        2757     2781      +24     
  Branches      358      358              
==========================================
+ Hits         1857     1877      +20     
- Misses        808      812       +4     
  Partials       92       92              
Impacted Files Coverage Δ
scimath/__init__.py 100.00% <ø> (ø)
scimath/interpolate/__init__.py 100.00% <ø> (ø)
scimath/interpolate/api.py 100.00% <ø> (ø)
scimath/interpolate/fitting.py 28.87% <ø> (+0.50%) ⬆️
scimath/interpolate/interpolate.py 27.88% <ø> (ø)
scimath/mathematics/__init__.py 100.00% <ø> (ø)
scimath/mathematics/api.py 0.00% <ø> (ø)
scimath/mathematics/quaternion.py 0.00% <ø> (ø)
scimath/physical_quantities/dimensions.py 61.29% <ø> (ø)
scimath/physical_quantities/units.py 69.89% <ø> (ø)
... and 48 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9237f55...32d3abb. Read the comment docs.

Copy link
Contributor

@aaronayres35 aaronayres35 left a comment

Choose a reason for hiding this comment

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

LGTM

Looks like there are a few merge conflicts to address though.

You mention "Note that some of the module docstrings contained information about the attributes, functions or classes defined within - which has been removed in this PR." but it looks like in many cases these were kept here.

Also, once we run flake8 on CI we can add flake8_ets as a dependency to catch these. Note I have not yet run flake8 with flake8_ets installed locally, but that would probably be a good thing for me to do...
EDIT: I did and this was the result:

$ flake8 --select=H101
./scimath/units/substance.py:1:1: H101 Copyright header is missing, or doesn't match the expected wording.
./scimath/units/pressure.py:1:1: H101 Copyright header is missing, or doesn't match the expected wording.
./scimath/units/force.py:1:1: H101 Copyright header is missing, or doesn't match the expected wording.
./scimath/units/unit_parser.py:1:1: H101 Copyright header is missing, or doesn't match the expected wording.
./scimath/units/SI.py:1:1: H101 Copyright header is missing, or doesn't match the expected wording.
./scimath/units/temperature.py:1:1: H101 Copyright header is missing, or doesn't match the expected wording.
./scimath/units/energy.py:1:1: H101 Copyright header is missing, or doesn't match the expected wording.
./scimath/units/unit.py:1:1: H101 Copyright header is missing, or doesn't match the expected wording.
./scimath/units/area.py:1:1: H101 Copyright header is missing, or doesn't match the expected wording.
./scimath/units/power.py:1:1: H101 Copyright header is missing, or doesn't match the expected wording.
./scimath/interpolate/setup.py:1:1: H101 Copyright header is missing, or doesn't match the expected wording.
./docs/source/conf.py:1:1: H101 Copyright header is missing, or doesn't match the expected wording.

These look like cases of having #!/usr/bin/env python before the copyright header

#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Michael A.G. Aivazis
# California Institute of Technology
Copy link
Contributor

Choose a reason for hiding this comment

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

😄

Poruri Sai Rahul added 2 commits June 29, 2021 11:01
these are unnecessary and these were interfering when running flake8_ets
on the codebase

	modified:   scimath/units/SI.py
	modified:   scimath/units/area.py
	modified:   scimath/units/energy.py
	modified:   scimath/units/force.py
	modified:   scimath/units/power.py
	modified:   scimath/units/pressure.py
	modified:   scimath/units/substance.py
	modified:   scimath/units/temperature.py
	modified:   scimath/units/unit.py
	modified:   scimath/units/unit_parser.py
@rahulporuri
Copy link
Contributor Author

These look like cases of having #!/usr/bin/env python before the copyright header

Thanks for catching those shebang-related flake8 ets errors @aaronayres35 . I've taken the liberty of removing them completely from the modules in question and I've fixed the merge conflicts. This PR is finally ready to go in. Thanks for the review.

@rahulporuri rahulporuri merged commit 1048b54 into master Jun 29, 2021
@rahulporuri rahulporuri deleted the dev/add-update-copyright-headers branch June 29, 2021 06:59
@rahulporuri rahulporuri moved this from In progress to Sprint 6 : 14 June - 25 June 2021 in Enthought OSS Q2 2021 Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Enthought OSS Q2 2021
  
Sprint 6 : 14 June - 25 June 2021
Development

Successfully merging this pull request may close these issues.

None yet

3 participants