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

Migrated type defs and changed const to constexpr #1395

Merged
merged 4 commits into from
Oct 28, 2023
Merged

Migrated type defs and changed const to constexpr #1395

merged 4 commits into from
Oct 28, 2023

Conversation

Atharva-Kanherkar
Copy link
Contributor

Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
I have done the following changes:
1.Used using instead of typedef ``for type aliases.
2.Replaced const with` constexpr` for constant values.
3.Removed the unnecessary` #if` block related to MSVC.
4.Made` isCustomElement` a` constexpr` function.
5.Used `std::size_t` instead of `size_t.`
6.Removed the macro` AVO_DISABLE_COPY` as it's not needed in modern C++.
I am sorry for the previous deleted pr. There was something wrong with it. I have ensured that this would not only modernize the code, but also remove unnecessary stuff from the code. I am new to open source and any kind of help would be very helpful for me. Thank you! (I am very sorry for the previous prs. There were some issues with my github, this is the final one)

@ghutchis
Copy link
Member

@Atharva-Kanherkar
Copy link
Contributor Author

Atharva-Kanherkar commented Oct 23, 2023

Please see https://github.com/OpenChemistry/avogadrolibs/pull/1395/checks?check_run_id=17973139639 to sign your commits.

I have signed my commits.
Thank you!

@ghutchis
Copy link
Member

Okay, the buildbots will take over for a bit. Thanks.

@Atharva-Kanherkar
Copy link
Contributor Author

What seems to be wrong? How can i fix this?

@ghutchis
Copy link
Member

If you click "Details" on any of the builds / tests, you can see the log, e.g.

avogadrolibs/avogadro/qtplugins/crystal/supercelldialog.h:42:3: error: unknown type name 'AVO_DISABLE_COPY'

Looks like you didn't remove the macro consistently.

@Atharva-Kanherkar
Copy link
Contributor Author

If you click "Details" on any of the builds / tests, you can see the log, e.g.

avogadrolibs/avogadro/qtplugins/crystal/supercelldialog.h:42:3: error: unknown type name 'AVO_DISABLE_COPY'

Looks like you didn't remove the macro consistently.

Sorry, but i am still confused as the logging errors are way too much in number. I will probably add the macro back again, does it work?

Signed-off-by: Atharva-Kanherkar <[email protected]>
@Atharva-Kanherkar
Copy link
Contributor Author

I have written the macro again.

@github-actions
Copy link
Contributor

Here are the build results
Avogadro2.AppImage
macOS.dmg
Win64.exe
Artifacts will only be retained for 90 days.

@Atharva-Kanherkar
Copy link
Contributor Author

@ghutchis I do not understand why is this failing the clang-format check, should i not remove anything from the code and just change constexpr?

@Atharva-Kanherkar
Copy link
Contributor Author

Is the PR Okay now to be merged? Or any more enhancements are required?

@Atharva-Kanherkar Atharva-Kanherkar changed the title Added new and modern code, removed some useless functions (Described) Added new and modern code, removed some useless functions (Described) #1346 Oct 24, 2023
@ghutchis
Copy link
Member

While you redefined various things, you also removed the associated comments. Please put them back.

@github-actions
Copy link
Contributor

Here are the build results
Avogadro2.AppImage
macOS.dmg
Win64.exe
Artifacts will only be retained for 90 days.

@Atharva-Kanherkar
Copy link
Contributor Author

While you redefined various things, you also removed the associated comments. Please put them back.

Hello, i checked with the original code, it has all the original comments as before. Can you please check again?

@ghutchis
Copy link
Member

That's not true:
https://github.com/OpenChemistry/avogadrolibs/pull/1395/files

The diff has a net of -20 lines, almost all comments.

@Atharva-Kanherkar
Copy link
Contributor Author

That's not true: https://github.com/OpenChemistry/avogadrolibs/pull/1395/files

The diff has a net of -20 lines, almost all comments.

I am so sorry, i will fix this asap.

@cryos
Copy link
Member

cryos commented Oct 27, 2023

I don't see any removed functions, you just moved things to slightly more modern versions which is good. Please don't remove comments, it would be good to update the description to describe it better. Something like "Migrated typedefs and moving const to constexpr". You also removed the final newline in the file and as stated it would be good to get the documentation strings back in there.

@Atharva-Kanherkar Atharva-Kanherkar changed the title Added new and modern code, removed some useless functions (Described) #1346 Migrated type defs and changed const to constexpr Oct 27, 2023
@Atharva-Kanherkar
Copy link
Contributor Author

I don't see any removed functions, you just moved things to slightly more modern versions which is good. Please don't remove comments, it would be good to update the description to describe it better. Something like "Migrated typedefs and moving const to constexpr". You also removed the final newline in the file and as stated it would be good to get the documentation strings back in there.

Thank you! Can you check now if its all right? I am sorry for responding late, some work popped up.

@cryos
Copy link
Member

cryos commented Oct 27, 2023

It looks better to me and the description more accurate as to what was changed.

@github-actions
Copy link
Contributor

Here are the build results
Avogadro2.AppImage
macOS.dmg
Win64.exe
Artifacts will only be retained for 90 days.

@Atharva-Kanherkar
Copy link
Contributor Author

Thank you. Is everything okay?

@ghutchis ghutchis merged commit 21faabd into OpenChemistry:master Oct 28, 2023
18 checks passed
@welcome
Copy link

welcome bot commented Oct 28, 2023

Congrats on merging your first pull request! 🎉 Thanks for making Avogadro better for everyone!

@ghutchis
Copy link
Member

looks great, thanks

@github-actions
Copy link
Contributor

Here are the build results
Avogadro2.AppImage
macOS.dmg
Win64.exe
Artifacts will only be retained for 90 days.

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.

3 participants