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

Support @strawberry.type #1

Merged
merged 10 commits into from
Apr 8, 2021

Conversation

koxudaxi
Copy link
Contributor

@koxudaxi koxudaxi commented Apr 7, 2021

support @strawberry.type as dataclass

How to build it

https://koxudaxi.github.io/pydantic-pycharm-plugin/development/

Comment on lines 1 to 7
import re
import xml.etree.ElementTree
from enum import Enum
from html.parser import HTMLParser
from pathlib import Path
from typing import List

Copy link
Member

Choose a reason for hiding this comment

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

what's this file for? 😊

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I forgot to remove it.
The scripts generate changelog pages from histores.
https://koxudaxi.github.io/pydantic-pycharm-plugin/changelog/

@@ -0,0 +1,22 @@
"""
The Mock is for testing pydantic with builtins
Copy link
Member

Choose a reason for hiding this comment

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

👀

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 have changed the name to strawberry.
We will need the unittest. I keep this file.

Copy link
Member

@patrick91 patrick91 left a comment

Choose a reason for hiding this comment

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

Awesome stuff! This looks good to me :)

Is there anything you need from us to get this published, shall we merge it and deal with the rest later?

resources/META-INF/plugin.xml Outdated Show resolved Hide resolved
<id>rocks.strawberry</id>
<name>Strawberry-Graphql</name>
<version>0.0.1</version>
<vendor email="koaxudai@gmail.com">TODO Koudai Aono @koxudaxi</vendor>
Copy link
Member

Choose a reason for hiding this comment

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

will this email be used for support? we can create one @strawberry.rocks if needed :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

great!!
This plugin.xml will be a detailed page in the marketplace.
https://plugins.jetbrains.com/plugin/12861-pydantic

Copy link
Member

Choose a reason for hiding this comment

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

got it, we can update the email later :)

Co-authored-by: Patrick Arminio <patrick.arminio@gmail.com>
@koxudaxi
Copy link
Contributor Author

koxudaxi commented Apr 8, 2021

@patrick91
Thank you for reviewing PR.

Is there anything you need from us to get this published, shall we merge it and deal with the rest later?

Jetbrains Account, plugin Id, and a token to publish the plugin.
https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html
https://account.jetbrains.com/login

I will add this CI file after I have dinner. 😉
https://github.com/koxudaxi/poetry-pycharm-plugin/blob/da2d98bbf3853711770cb32b1d7d4f39b844dcd1/.github/workflows/publish.yml#L74-L78


The pydantic plugin is my first plugin project.
I used a plugin.xml to configure the plugin.
But, we should move some settings to build.gradle.
gradle-intellij-plugin can descript few configs in build.gradle that instead ofplugin.xml
gradle-intellij-plugin provides dynamically configuration. (we can write gralde script or kotlin DSL)
For example,
Poetry plugin use patchPluginXml in build.gradle. It's my second project.
This is not a dynamic attribute. But, I feel the style is better than writing it in plugin.xml
https://github.com/koxudaxi/poetry-pycharm-plugin/blob/da2d98bbf3853711770cb32b1d7d4f39b844dcd1/build.gradle#L28-L31

This idea is not required for first release.
We should add it TODO list 📝

@patrick91
Copy link
Member

I've added a token in the configuration:
image

We can use GitHub issues for TODOs :) I'll add you to this repo, feel free to merge this PR when you want.

@koxudaxi koxudaxi mentioned this pull request Apr 8, 2021
4 tasks
@koxudaxi koxudaxi merged commit 52b6d0f into strawberry-graphql:main Apr 8, 2021
@koxudaxi koxudaxi deleted the support_strawberry_type branch April 8, 2021 18:47
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.

None yet

2 participants