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

Development "New Project" Templates #11

Open
ebresie opened this issue May 14, 2022 · 9 comments
Open

Development "New Project" Templates #11

ebresie opened this issue May 14, 2022 · 9 comments
Labels
enhancement New feature or request

Comments

@ebresie
Copy link
Owner

ebresie commented May 14, 2022

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 #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
Copy link
Owner Author

ebresie commented May 14, 2022

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

@ebresie
Copy link
Owner Author

ebresie commented May 28, 2022

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

@ebresie
Copy link
Owner Author

ebresie commented Jun 5, 2022

@ebresie
Copy link
Owner Author

ebresie commented Jun 5, 2022

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 ebresie added the enhancement New feature or request label Jun 5, 2022
@ebresie
Copy link
Owner Author

ebresie commented Jun 5, 2022

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

@ebresie
Copy link
Owner Author

ebresie commented Nov 4, 2022

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
Copy link
Owner Author

ebresie commented Nov 5, 2022

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

@ebresie
Copy link
Owner Author

ebresie commented Nov 5, 2022

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
Copy link
Owner Author

ebresie commented Nov 5, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant