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

Refactor project to be more inline with Jetbrains intellij platform plugin template #436

Merged
merged 2 commits into from
Feb 20, 2022

Conversation

KotlinIsland
Copy link
Contributor

@KotlinIsland KotlinIsland commented Feb 8, 2022

Refactor a lot of the build / workflow to match: https://github.com/JetBrains/intellij-platform-plugin-template

  • Updated Gradle to 7.4
  • Convert build.gradle to Kotlin
  • Updated Kotlin to 1.6.10
  • Simplified dependencies:
    • Removed kotlin stdlib
    • Migrated junit.jupiter to kotlin.test
    • Removed jetbrains.annotations
  • Adopted Qodana and integrated it into the CI
  • Adopted the changelog Gradle plugin and integrated it into the CI
  • Add support for 2022.1

These changes simplify the sources of data within the project:

  • Extracting the high level config from the build script / plugin.xml simplifies making changes.
  • Moving the changelog into CHANGLOG.md makes it more accessible.

I also updated some issues I found in the markdown documents:

  • Minor spelling mistakes
  • Updated links
  • Removing $ from sample commands so that they are copypaste-able and runnable from within the IDE.

And convert all the Java to Kotlin.

closes: #434
closes: #433
closes: #429
closes: #428

Github sucks and says that I deleted some files when I was actually very careful to rename them to preserve the history.

I'm sure I broke some things 😬. But I hope you like this change :)

@KotlinIsland KotlinIsland force-pushed the refactor_project branch 10 times, most recently from 36bb595 to cbba0a0 Compare February 8, 2022 07:58
@KotlinIsland
Copy link
Contributor Author

I noticed that #430 will cause a lot of conflicts, do you want me to include 2022.1 support in this pr as well?

@KotlinIsland KotlinIsland force-pushed the refactor_project branch 3 times, most recently from 6b54400 to 13cc893 Compare February 8, 2022 11:53
@koxudaxi
Copy link
Owner

koxudaxi commented Feb 8, 2022

@KotlinIsland Thank you for creating the cool PR. 😍
Did you know why LGTM analyses are failed?

I noticed that #430 will cause a lot of conflicts, do you want me to include 2022.1 support in this pr as well?

If we can support 2022.1 and 2021.3 then I want to include 2022.1.
Can we do it?

@KotlinIsland
Copy link
Contributor Author

KotlinIsland commented Feb 8, 2022

@koxudaxi Awesome that you like the sound of this pr!

I'm not sure what LTGM is, I've never used it before, but it looks like it is also failing in #430

Seeing as the project now has zero java, is this even required? Maybe we should use Qodana instead?

@KotlinIsland
Copy link
Contributor Author

If we can support 2022.1 and 2021.3 then I want to include 2022.1.

I think so, the plugin verify step passed for 213 and 221
https://github.com/koxudaxi/pydantic-pycharm-plugin/runs/5112235486?check_suite_focus=true#step:10:65

@@ -1,394 +1,7 @@
<idea-plugin url="https://github.com/koxudaxi/pydantic-pycharm-plugin" require-restart="true">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@koxudaxi Does the plugin need restart? The plugin verify step said that it could be installed without restart

https://github.com/koxudaxi/pydantic-pycharm-plugin/runs/5112235486?check_suite_focus=true#step:10:72

Plugin can be loaded/unloaded without IDE restart

Copy link
Owner

Choose a reason for hiding this comment

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

@KotlinIsland
I forget why I add the restart option 🤔
If we don't need the option then we should remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems you changed it with message "Fix build warning", I've removed it now and will see if there are any build warnings.

@KotlinIsland KotlinIsland force-pushed the refactor_project branch 7 times, most recently from 7beaebc to e9315a7 Compare February 9, 2022 00:35

// Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
intellij {
pluginName.set(properties("pluginName"))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously this was pluginName = project.name(pydantic-pycharm-plugin), but this change makes it "Pydantic", I'm not sure what you would want here.

Copy link
Owner

Choose a reason for hiding this comment

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

Me too, I forget about the code😅
We should remove the code.

Comment on lines +102 to +104
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
privateKey.set(System.getenv("PRIVATE_KEY"))
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't see any of this configuration from before this merge, maybe this section should be removed?

@KotlinIsland KotlinIsland force-pushed the refactor_project branch 2 times, most recently from b8cec05 to 39a9229 Compare February 11, 2022 02:32
@KotlinIsland KotlinIsland force-pushed the refactor_project branch 4 times, most recently from 0db891d to 63a0108 Compare February 11, 2022 03:15
@codecov
Copy link

codecov bot commented Feb 11, 2022

Codecov Report

Merging #436 (5a93e51) into master (c2af658) will increase coverage by 0.63%.
The diff coverage is 2.63%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #436      +/-   ##
============================================
+ Coverage     73.07%   73.70%   +0.63%     
- Complexity      277      305      +28     
============================================
  Files            23       23              
  Lines          1675     1681       +6     
  Branches        506      514       +8     
============================================
+ Hits           1224     1239      +15     
- Misses          166      176      +10     
+ Partials        285      266      -19     
Flag Coverage Δ
unittests 73.70% <2.63%> (+0.63%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/com/koxudaxi/pydantic/PydanticConfigPanel.kt 0.00% <0.00%> (ø)
...koxudaxi/pydantic/PydanticTypeCheckerInspection.kt 88.65% <33.33%> (ø)
src/com/koxudaxi/pydantic/Pydantic.kt 73.64% <0.00%> (-0.24%) ⬇️
...koxudaxi/pydantic/PydanticCompletionContributor.kt 84.65% <0.00%> (-0.14%) ⬇️
src/com/koxudaxi/pydantic/PydanticRegexInjector.kt 85.71% <0.00%> (ø)
...om/koxudaxi/pydantic/PydanticParametersProvider.kt 100.00% <0.00%> (ø)
src/com/koxudaxi/pydantic/PydanticTypeProvider.kt 75.69% <0.00%> (+0.05%) ⬆️
src/com/koxudaxi/pydantic/PydanticConfigService.kt 88.88% <0.00%> (+0.65%) ⬆️
src/com/koxudaxi/pydantic/PydanticInspection.kt 79.37% <0.00%> (+0.75%) ⬆️
...om/koxudaxi/pydantic/PydanticFieldRenameFactory.kt 92.59% <0.00%> (+2.02%) ⬆️
... and 4 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 9205dda...5a93e51. Read the comment docs.

@koxudaxi
Copy link
Owner

Thank you for your changes.
I'm checking the commits!!

@koxudaxi
Copy link
Owner

@KotlinIsland

Seeing as the project now has zero java, is this even required? Maybe we should use Qodana instead?

That makes sense.
I don't know about Qodana . The tools can check kotlin's code?

@KotlinIsland
Copy link
Contributor Author

KotlinIsland commented Feb 12, 2022

@koxudaxi

I don't know about Qodana . The tools can check kotlin's code?

Qodan is a code quality tool developed by JetBrains that supports Kotlin, It's recommended by the Jetbrains IntelliJ platform plugin template, and is basically the official Kotlin code quality tool.

It has Gradle support, CLI support, Ide support and A dedicated Github App.

@koxudaxi
Copy link
Owner

@KotlinIsland

It has Gradle support, CLI support, Ide support and A dedicated Github App.
Great!!

It has Gradle support, CLI support, Ide support and A dedicated Github App.
Could you please set up Qodana? And remove LGTM in GitHub Action?

@KotlinIsland
Copy link
Contributor Author

@koxudaxi

I have added Qodana to the CI. I am unable to remove LGTM, I think it is a project setting.

If you would like to add the Github Qodana App(Which I recommend) look here to sign up and register this project.

@koxudaxi
Copy link
Owner

@KotlinIsland
I have deactivated LGTM and set up Qodana App!!

@koxudaxi koxudaxi self-requested a review February 12, 2022 16:36
Copy link
Owner

@koxudaxi koxudaxi left a comment

Choose a reason for hiding this comment

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

@KotlinIsland
LGTM
Can I merge the PR?

@koxudaxi
Copy link
Owner

@KotlinIsland
I can't use the service?
Should I send an email to the address?
スクリーンショット 2022-02-13 1 38 52

@KotlinIsland
Copy link
Contributor Author

Yeah, you need to send an email at the moment

https://www.jetbrains.com/help/qodana/qodana-github-application.html#how-to-start-github-app

@koxudaxi
Copy link
Owner

Yeah, you need to send an email at the moment

https://www.jetbrains.com/help/qodana/qodana-github-application.html#how-to-start-github-app

I just sent the request.

@koxudaxi
Copy link
Owner

@KotlinIsland
I joined the group. But, the tools didn't run. :(
#440

@KotlinIsland
Copy link
Contributor Author

@koxudaxi
Did you get a response email from JetBrains yet? If you have then maybe send them another email with follow up explaining that it's not working. Strangely my projects have stopped working with the Qodana app today as well.

Qodana is currently integrated into the build workflow, and you can download the report from the workflow here

@koxudaxi
Copy link
Owner

@KotlinIsland
I found the message from the support team in the mailbox.

I suggest you also try Qodana Scan. It's a GitHub action with more flexible settings and abilities than the app. And it's likely that we'll drop support of the app in the near future.

@koxudaxi koxudaxi merged commit 59dc893 into koxudaxi:master Feb 20, 2022
@koxudaxi
Copy link
Owner

@KotlinIsland
Thank you for your great job.
I have released the version.
But, I find an error in the action.
Do you know the reason for the error?
https://github.com/koxudaxi/pydantic-pycharm-plugin/runs/5290676713?check_suite_focus=true
Screenshot 2022-02-23 at 0 45 00

@KotlinIsland
Copy link
Contributor Author

@koxudaxi I know the issue, I'll make a pr soon, it's related to the branch names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants