ebresie / python4nb

This is a Python Plugin for Netbeans.
Apache License 2.0
13 stars 1 forks source link

Python Project - pyproject.toml #40

Open ebresie opened 1 year ago

ebresie commented 1 year ago

This will support project metadata using pyproject.toml. This will involve reworking some of the existing Python Project details to read in and output pyproject.toml project files instead.

This may involve importing existing ones for the project as well as creation of new python4nb project files.

For additional details, see

ebresie commented 1 year ago

May need some "toml" support as well, but believe this may already be included in more recent Netbeans so this may be unnecessary.

ebresie commented 1 year ago

This may overlap or replace some of the following:

Not sure if these are fully addressed in pyproject.toml - need to confirm this.

ebresie commented 1 year ago

From Example pyproject.toml

[project] name = "spam" version = "2020.0.0" description = "Lovely Spam! Wonderful Spam!" readme = "README.rst" requires-python = ">=3.8" license = {file = "LICENSE.txt"} keywords = ["egg", "bacon", "sausage", "tomatoes", "Lobster Thermidor"] authors = [ {email = "hi@pradyunsg.me"}, {name = "Tzu-Ping Chung"} ] maintainers = [ {name = "Brett Cannon", email = "brett@python.org"} ] classifiers = [ "Development Status :: 4 - Beta", "Programming Language :: Python" ]

dependencies = [ "httpx", "gidgethub[httpx]>4.0.0", "django>2.1; os_name != 'nt'", "django>2.0; os_name == 'nt'" ]

[project.optional-dependencies] test = [ "pytest < 5.0.0", "pytest-cov[all]" ]

[project.urls] homepage = "https://example.com" documentation = "https://readthedocs.org" repository = "https://github.com" changelog = "https://github.com/me/spam/blob/master/CHANGELOG.md"

[project.scripts] spam-cli = "spam:main_cli"

[project.gui-scripts] spam-gui = "spam:main_gui"

[project.entry-points."spam.magical"] tomatoes = "spam:main_tomatoes"

ebresie commented 1 year ago

Will also want to add a "New File...pyproject.toml" with maybe the example as a template.

ebresie commented 1 year ago

Need a toml library to work with in Java.

See the following

ebresie commented 1 year ago

Some additional references

ebresie commented 1 year ago

Will leverage jackson

Although initial implementation does not have the grouping like in [project] sections as I expected which may be related to https://github.com/FasterXML/jackson-dataformats-text/issues/254

ebresie commented 1 year ago

For Toml spec see https://toml.io/en/

ebresie commented 1 year ago

May switch over to Tomlj which may support the "table" sect notion which does seem to be fully supported in jackson

For more info see: