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

General Cleanup, update copyright notices, remove some old stuff #43

Merged
merged 5 commits into from
Jan 27, 2025

Conversation

pulsastrix
Copy link
Member

@pulsastrix pulsastrix commented Jan 24, 2025

This PR performs some general cleanup, removing obsolete and inaccurate documentation as well as old GitLab-related files.

Also, it replaces the old copyright notices in all file headers, solving some smaller issues with the previous one:

  • Maintaining year numbers in copyright notices for each file separately
    is a chore, not very accurate (esp. if code is moved between files),
    and this approach has already been abandoned by larger projects such
    as curl.

    Therefore, we have removed copyright years from all file headers,
    keeping only the year numbers referring to the project as a whole
    in README, NOTICE and LICENSE files.

  • The previous header states the copyright owner as "The NAMIB Project
    Contributors", which is problematic in the sense that A) the project
    is no longer active, B) never was a legal entity in the first place
    and C) is no longer accurate given third-party contributions.

    The new header instead refers to "The libcoap-rs Contributors", with
    the NOTICE and README files being a bit more specific and stating the
    author to be "Hugo Hakim Damer, the NAMIB Project Members, and the
    other libcoap-rs Contributors", which provides at least one legal
    entity (me) and a general term encompassing all contributors.

    Additionally, we now provide a NOTICE file containing more detailed
    information on copyright ownership, maintainers, contact information,
    etc.

    The approach of using a general "The XYZ Contributors" term is best
    practice in e.g., Linux Foundation projects, and the NOTICE file takes some
    inspiration from the Eclipse Foundation project guidelines.

  • Also, updated the copyright years that remain to consistently be 2021-2025.

@pulsastrix pulsastrix requested a review from JKRhb January 24, 2025 16:48
@pulsastrix pulsastrix self-assigned this Jan 24, 2025
@pulsastrix pulsastrix added the documentation Improvements or additions to documentation label Jan 24, 2025
Copy link

github-actions bot commented Jan 24, 2025

Workflow Status Report

Generated for commit a5a43e6 on Mon Jan 27 18:14:56 UTC 2025.

Test and Analyze
Docs, Coverage Report and PR Updates

In case of failure, clippy warnings and rustfmt changes (if any) will be indicated as CI check warnings in the file comparison view.

Documentation: Read Online Download

Coverage Report: Read Online Download

Note: Online versions of documentation and coverage reports may not be available indefinitely, especially after the pull request was merged.

Code Coverage Report

Coverage

Coverage target is 80%.

Expand to view coverage statistics
file coverage covered missed_lines
libcoap-sys/src/lib.rs 83.27% 209 / 251 370-381, 489-492, 500, 527-544, 669-672, 756-759
libcoap/src/context.rs 61.50% 230 / 374 107, 168-213, 223-230, 247, 276, 323-326, 360, 375-377, 442, 447, 463, 471-633
libcoap/src/crypto/pki_rpk/key.rs 56.67% 51 / 90 179-218, 242-250, 252-255, 261-263
libcoap/src/crypto/pki_rpk/mod.rs 21.90% 99 / 452 36-279, 454-486, 507-605, 613, 616, 650-668, 678-680, 685-687, 692-694, 755, 767-903
libcoap/src/crypto/pki_rpk/pki.rs 78.08% 114 / 146 90-149, 302-315
libcoap/src/crypto/pki_rpk/rpk.rs 72.60% 53 / 73 68-98, 160-171
libcoap/src/crypto/psk/client.rs 45.59% 62 / 136 71-75, 83, 106-192, 234-242, 269-271, 276-278, 306-338
libcoap/src/crypto/psk/key.rs 61.46% 59 / 96 42-49, 163-205
libcoap/src/crypto/psk/mod.rs 0.00% 0 / 45 30-100
libcoap/src/crypto/psk/server.rs 30.54% 51 / 167 69-88, 96, 99, 116-119, 145-147, 152-154, 159-161, 189-234, 255, 271-396
libcoap/src/error.rs 0.00% 0 / 6 90-170
libcoap/src/event.rs 29.73% 11 / 37 36-168
libcoap/src/lib.rs 0.00% 0 / 64 62-165
libcoap/src/mem.rs 72.89% 121 / 166 148-163, 196-198, 210-212, 280, 296-298, 319-324, 353-355, 369, 381-393, 454-456, 473, 481-488, 507, 527, 531
libcoap/src/message/mod.rs 58.46% 190 / 325 105-108, 110-131, 139-145, 147-168, 172, 174, 176, 208, 210, 213-222, 225-243, 245-249, 265-275, 295-302, 398, 441, 447, 478, 488-491, 497-499, 506, 511-523, 529, 549-551, 561-563
libcoap/src/message/request.rs 34.12% 101 / 296 51, 68-202, 228-256, 264-365, 371-375, 380-381, 383-386, 389, 395-401, 430-432, 436, 439-441, 444-446, 449, 452, 455, 458, 461, 472-479
libcoap/src/message/response.rs 22.17% 45 / 203 36-160, 165, 168, 171, 174, 177, 195-325, 329-334, 360
libcoap/src/prng.rs 55.41% 41 / 74 66, 78-116, 139-149, 196
libcoap/src/protocol.rs 35.88% 61 / 170 164-166, 171-176, 178-193, 195-196, 203-208, 210-225, 227-228, 248-287, 308, 322-324, 369-374, 383-388, 444-469, 475-488, 520, 522
libcoap/src/resource.rs 70.49% 172 / 244 61, 93-95, 170-175, 182-207, 213-218, 248, 265-287, 299-302, 327-330, 363-372, 505-507
libcoap/src/session/client.rs 90.20% 138 / 153 164, 191, 223, 231-233, 239-241, 288-294
libcoap/src/session/mod.rs 39.64% 111 / 280 62-74, 105, 115-230, 240-285, 294-297, 306-317, 346, 350, 382-402, 424, 432, 464, 471, 489-495, 570, 576
libcoap/src/session/server.rs 82.05% 64 / 78 75-77, 81, 152, 162-164, 179, 194-200
libcoap/src/transport.rs 70.97% 22 / 31 29-36, 55
libcoap/src/types.rs 55.60% 313 / 563 71-125, 131-160, 210-223, 241-243, 253-265, 272-278, 284-286, 295, 562, 571, 583, 610, 636-705, 758, 803-824, 845-847, 863-868, 879-964
libcoap/tests/common/dtls.rs 94.34% 50 / 53 49, 54-55
libcoap/tests/common/mod.rs 93.68% 89 / 95 85-88, 92, 126
libcoap/tests/dtls_pki_client_server_test.rs 100.00% 82 / 82
libcoap/tests/dtls_psk_client_server_test.rs 100.00% 26 / 26
libcoap/tests/dtls_rpk_client_server_test.rs 100.00% 7 / 7
libcoap/tests/tcp_client_server_test.rs 100.00% 22 / 22
libcoap/tests/udp_client_server_test.rs 100.00% 22 / 22

Total coverage: 54.20%

Copy link
Member

@JKRhb JKRhb left a comment

Choose a reason for hiding this comment

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

LGTM! :) See just one comment below (and remember squashing 😉)

NOTICE.md Outdated Show resolved Hide resolved
This commit replaces all copyright notices provided in source code file,
solving some smaller issues with the previous one:

- Maintaining year numbers in copyright notices for each file separately
  is a chore, not very accurate (esp. if code is moved between files),
  and this approach has already been abandoned by larger projects such
  as [curl](https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/).

  Therefore, we have removed copyright years from all file headers,
  keeping only the year numbers referring to the project as a whole
  in README, NOTICE and LICENSE files.

- The previous header states the copyright owner as "The NAMIB Project
  Contributors", which is problematic in the sense that A) the project
  is no longer active, B) never was a legal entity in the first place
  and C) is no longer accurate given third-party contributions.

  The new header instead refers to "The libcoap-rs Contributors", with
  the NOTICE and README files being a bit more specific and stating the
  author to be "Hugo Hakim Damer, the NAMIB Project Members, and the
  other libcoap-rs Contributors", which provides at least one legal
  entity (me) and a general term encompassing all contributors.

  Additionally, we now provide a NOTICE file containing more detailed
  information on copyright ownership, maintainers, contact information,
  etc.

  The approach of using a general "The XYZ Contributors" term is best
  practice in e.g., [Linux Foundation projects](https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects), and the NOTICE file takes some
  inspiration from the [Eclipse Foundation project guidelines](https://www.eclipse.org/projects/handbook/#legaldoc-notice).
Copy link
Member

@JKRhb JKRhb left a comment

Choose a reason for hiding this comment

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

See one last-minute nit below, otherwise: LVGTM! :) 🚀

SECURITY.md Show resolved Hide resolved
@JKRhb JKRhb disabled auto-merge January 27, 2025 17:56
@JKRhb JKRhb enabled auto-merge January 27, 2025 17:57
@JKRhb JKRhb merged commit 67e36d7 into main Jan 27, 2025
28 checks passed
@pulsastrix pulsastrix deleted the general_cleanup branch January 27, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants