ebresie / python4nb

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

Development "New Project" Templates #11

Open ebresie opened 2 years ago

ebresie commented 2 years ago

This issue/task/feature will involve creation of "New Project Templates" and/or wizards to accommodate a variety of aspects of a given python project configuration

May want to create "New Project Templates" for assorted configurations including setuptools, setup.py, requirements.txt, and related pyenv (environment) setup element as well, readme.md, licenses,txt, .gitignore, etc..

See https://github.com/ebresie/python4nb/issues/8 for additional details.

The acceptance of this will be In Python4nb context, create "New Project" From the New Project select each applicable project configuration When applicable, selected and identify applicable module/package for inclusion and/or use in the project May require configuration of environment

Once complete, the python project can be used in development, packaging, and deployment.

ebresie commented 2 years ago

May want to make different flavors of projects (i.e. web projects/flask, data based , etc.)

ebresie commented 2 years ago

Possibly include python egg based (see http://peak.telecommunity.com/DevCenter/PythonEggs )

ebresie commented 2 years ago

For setuptool based projects see:

For additional information based on legacy "distutils\setupscript" details see

And may want to leverage additional metadata in some form of wizard to help further

ebresie commented 2 years ago

From https://pythonhosted.org/an_example_pypi_project/setuptools.html , for setuptool based projects...

A possible directory structure for a new project may be like the following:

<Project Root Directory>
|-- README
|-- setup.py
|-- <project folder>
|   |-- __init__.py
|   |-- useful_1.py
|   |-- useful_2.py
|-- tests
|-- |-- __init__.py
|-- |-- runall.py
|-- |-- test0.py

With a setup.py similar from the above link looking like

import os
from setuptools import setup

# Utility function to read the README file.
# Used for the long description.  It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(
    name = "<pypi_project>",
    version = "<version>",
    author = "<author name>r",
    author_email = "<author email>",
    description = ("<project description>"),
    license = "<licenses>",
    keywords = "<keywords associated with project",
    url = "<project URL<",
    packages=['<packages>', .., '<test packages>'],
    long_description=read('README'),
    classifiers=[ <classifiers>],
)
ebresie commented 2 years ago

In local development, have added a "setuptool" template which is based on the above.

ebresie commented 1 year ago

Some updates for this are captured as part of v0.3.0 release specifically adding a "setup" based project available within "File...New File...Python Setup Based file" context.

image

Which provides a basic template like the following

image

ebresie commented 1 year ago

May want to break this up into smaller chunks of work to focus on specific types of New Files.

ebresie commented 1 year ago

Some of the work done was specific to "New...New File" based functionality and not "Project" specific. Need to implement "New...New Project". Presently there is no "New Project...Python" showing up. This may be a higher level.

Presently the New Project lists like the following

image

Need to update this to include other Python Project types.

ebresie commented 1 year ago

May want to consider "archetype" functionality existing in mvn which allows a given archetype to auto generate a basic temple projects of a specific archetype

I think a good way of doing so is possibly using something like:

Will break this out into separate issue.