From ce4860b18e00538ab8db3b1fc6f927e90b8e33d2 Mon Sep 17 00:00:00 2001 From: Grant Ramsay Date: Sun, 13 Aug 2023 14:41:20 +0100 Subject: [PATCH] Deployed c9d6566 with MkDocs version: 1.5.2 --- future-plans/index.html | 2 +- license/index.html | 2 +- quick-start/index.html | 4 ++-- search/search_index.json | 2 +- sitemap.xml | 20 ++++++++++---------- sitemap.xml.gz | Bin 292 -> 293 bytes 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/future-plans/index.html b/future-plans/index.html index ce2c6e46..72e214d8 100644 --- a/future-plans/index.html +++ b/future-plans/index.html @@ -1 +1 @@ -Future Plans - Python Project Generation Tool
Skip to content

TODO List

General

  • Add testing with Pytest (IN PROGRESS)
  • Add option to generate a skeleton MkDocs website for the new project
  • Ask for more settings ie homepage, repo, etc. and add them to the generated pyproject.toml file (if the new project is likely to be uploaded to PyPI)
  • check manually entered package name to ensure no dashes.
  • add a flag to overwrite existing files if the directory exists. Make this require confirmation. Alternately allow overwrite with confirmation if an existing/populated directory is found. Add a force flag to skip confirmation. I think DO NOT allow this when '.' is specified as this could be disastrous.
  • when creating a package project, quickly check PyPI to see if the package name is already taken. If it is, either abort or ask the user if they want to continue (making clear they will need to rename the package before it can be uploaded).
  • add some form of 'extra packages' command line option and config setting to automatically add extra packages to the generated pyproject.toml file.
  • add cmd line options to specify the project name, author, etc. so the user doesn't have to enter them manually.
  • add a command line option to specify the project type so the user doesn't have to enter it manually. ie --standalone or --package(latter is default and wouldn't need to be specified).
  • add a command to the CLI template command to show the template files as a tree, marking whether each file/folder is from the internal templates or the user's templates.

Documentation

  • Add usage examples and perhaps a walk-through to the documentation. Maybe with a YouTube video?

Last update: August 8, 2023
Created: August 8, 2023
\ No newline at end of file +Future Plans - Python Project Generation Tool
Skip to content

TODO List

General

  • Add testing with Pytest (IN PROGRESS)
  • Add option to generate a skeleton MkDocs website for the new project
  • Ask for more settings ie homepage, repo, etc. and add them to the generated pyproject.toml file (if the new project is likely to be uploaded to PyPI)
  • check manually entered package name to ensure no dashes.
  • add a flag to overwrite existing files if the directory exists. Make this require confirmation. Alternately allow overwrite with confirmation if an existing/populated directory is found. Add a force flag to skip confirmation. I think DO NOT allow this when '.' is specified as this could be disastrous.
  • when creating a package project, quickly check PyPI to see if the package name is already taken. If it is, either abort or ask the user if they want to continue (making clear they will need to rename the package before it can be uploaded).
  • add some form of 'extra packages' command line option and config setting to automatically add extra packages to the generated pyproject.toml file.
  • add cmd line options to specify the project name, author, etc. so the user doesn't have to enter them manually.
  • add a command line option to specify the project type so the user doesn't have to enter it manually. ie --standalone or --package(latter is default and wouldn't need to be specified).
  • add a command to the CLI template command to show the template files as a tree, marking whether each file/folder is from the internal templates or the user's templates.

Documentation

  • Add usage examples and perhaps a walk-through to the documentation. Maybe with a YouTube video?

Last update: August 13, 2023
Created: August 8, 2023
\ No newline at end of file diff --git a/license/index.html b/license/index.html index 1cae8fd3..b26d9517 100644 --- a/license/index.html +++ b/license/index.html @@ -1 +1 @@ -License - Python Project Generation Tool

License

MIT License

Copyright (c) 2023 Grant Ramsay

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Last update: July 26, 2023
Created: July 26, 2023
\ No newline at end of file +License - Python Project Generation Tool
Skip to content

License

MIT License

Copyright (c) 2023 Grant Ramsay

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Last update: August 13, 2023
Created: July 26, 2023
\ No newline at end of file diff --git a/quick-start/index.html b/quick-start/index.html index 68ae3650..ca16c50a 100644 --- a/quick-start/index.html +++ b/quick-start/index.html @@ -12,7 +12,7 @@ Name of the Application? (Test Project): Package Name? (Use '-' for standalone script) (test_project): -Description of the Application?: An amazing Bigly test project. better than you've ever seen before! +Description of the Application?: An amazing Bigly test project. Author Name? (Orange Tango): Author Email? (bigly@spraytan.org): Application License? [None/Apache2/BSD3/BSD2/GPL2/GPL3/LGPL/MIT/MPL2/CDDL/EPL2] (MIT): @@ -46,4 +46,4 @@ 5) Code! See the README.md file for more information. -
Last update: July 30, 2023
Created: July 26, 2023
\ No newline at end of file +
Last update: August 13, 2023
Created: July 26, 2023
\ No newline at end of file diff --git a/search/search_index.json b/search/search_index.json index baf2e87a..ca327853 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Python Project Generation Tool","text":"

This is a command line tool to help you create new Python projects. It will create a new directory for your project, initialise a git repository, create a virtual environment, and install some basic dependencies.

Latest Version : v0.4.2

"},{"location":"#testing","title":"Testing","text":"

The generated project includes pytest and some related plugins to allow you to set up testing straight away.

Write your tests in the tests directory and run them with pytest.

"},{"location":"#linting","title":"Linting","text":"

The generated project includes flake8 (with several plugins) for linting and Black for formatting. Mypy is installed for type checking. isort, Pylint and tyrceratops are also installed as standard.

"},{"location":"#customize-the-generated-project","title":"Customize the generated project","text":"

You can add extra or edited files to the generated project by adding them to the ~/.pymaker/template directory. The files in this directory will be copied into the generated project, overwriting any existing files with the same name.

It is also possible to dump the whole template into this folder or the current folder so full customization and even removal of files is possible.

"},{"location":"#pre-commit","title":"Pre-commit","text":"

The generated project uses pre-commit to run some checks on the code before it is committed. This is a great tool to help keep your code clean.

To install pre-commit, run the following command from inside your venv:

$ pre-commit install\npre-commit installed at .git/hooks/pre-commit\n
"},{"location":"configuration/","title":"Configuration","text":""},{"location":"configuration/#configuration-file","title":"Configuration file","text":"

This app needs minimal configuration, currently just storing defaults for the author_name, author_email and default_license. This is stored in a configuration file in a sub-folder of the user's home directory. By default (and currently the only option) this file is stored in ~/.pymaker/config.toml. An example of this file is:

[pymaker]\nauthor_email = \"user@server.com\"\nauthor_name = \"Python User\"\ndefault_license = \"MIT\"\nschema_version = \"1.0\" # for internal use, generally don't change this\ntemplate_folder = \"/home/user/.pymaker/template\"\nuse_default_template = true\n

If this file does not exist, it will be created on first run. The app will ask for the values of these fields. For author_name and author_email it will try to use the current git user name and email if they are set as defaults, though the user can override these.

"},{"location":"configuration/#view-configuration","title":"View configuration","text":"

You can list the current configuration with the command:

$ pymaker config show\n
"},{"location":"configuration/#set-configuration","title":"Set configuration","text":"

The configuration is set the first time you run the app, but you can change these defaults at any time using the command:

$ pymaker config change\n

The latter command will prompt you for the values of the fields, and then update the configuration file.

"},{"location":"future-plans/","title":"TODO List","text":""},{"location":"future-plans/#general","title":"General","text":""},{"location":"future-plans/#documentation","title":"Documentation","text":""},{"location":"installation/","title":"Installation","text":"

It is probably better to install this package globally, rather than in a virtual environment, as it is intended to be used to create new projects. Since we are using Poetry to manage the dependencies, a virtual environment will be created for you anyway specific to each project you are creating.

Install the package globally using pip:

$ pip install pyproject-maker\n

If you cannot install globally due to permissions, you can install it to your user install directory:

$ pip install --user pyproject-maker\n

or use pipx

$ pipx install pyproject-maker\n
"},{"location":"license/","title":"License","text":"

MIT License

Copyright (c) 2023 Grant Ramsay

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

"},{"location":"quick-start/","title":"Quick Start","text":""},{"location":"quick-start/#create-a-new-project","title":"Create a new project","text":"

To create a new project, run the following command:

$ pymaker new <project-folder>\n

This will create a new directory with the name you provide.

You can create a new project in the current directory by using . as the project folder name. This must be an empty directory:

$ mkdir test-project\n$ cd test-project\n$ pymaker new .\n

The App will then run the steps needed to get you started quickly:

  1. Copy the template files into the new directory
  2. Initialise a git repository
  3. Commit the boilerplate to Git

You will be asked a series of questions to customise the new project.

"},{"location":"quick-start/#choose-a-package-name-and-description","title":"Choose a package name and description","text":"

When it asks \"Package Name?\" you can choose two variants :

  1. If you are creating a standard Python package that can optionally be uploaded to PyPI, enter a package name here. Note that underscores (\"_\") must be used as opposed to dashes (\"-\") to comply with Python package naming rules. Default is the project folder name with underscores replacing dashes.
  2. For a stand-alone tool that will not ne uploaded to PyPI, or is not a library, enter '-' for the package name. In this case the main.py will just be placed in the project root and no package folder will be created or referenced.
"},{"location":"quick-start/#start-developing","title":"Start developing","text":"

You should now change into the new directory, install dependencies and activate the virtual environment:

$ cd <project-folder>\n$ poetry install\n$ poetry shell\n

Now, you can start developing

"},{"location":"quick-start/#example-run","title":"Example run","text":"
$ pymaker new test-project\nPyMaker - Generate a Python project skeleton.\n\nCreating a new project at /home/bathroom/test-project\n\nName of the Application? (Test Project):\nPackage Name? (Use '-' for standalone script) (test_project):\nDescription of the Application?: An amazing Bigly test project. better than you've ever seen before!\nAuthor Name? (Orange Tango):\nAuthor Email? (bigly@spraytan.org):\nApplication License? [None/Apache2/BSD3/BSD2/GPL2/GPL3/LGPL/MIT/MPL2/CDDL/EPL2] (MIT):\n\nCreating a New Python app with the below settings :\n\n    Description : An amazing Bigly test project. better than you've ever seen before!\n   Package Name : test_project\n         Author : Orange Tango\n          Email : bigly@spraytan.org\n        License : MIT\n    Project Dir : /home/bathroom/test-project\n           Name : Test Project\n\nIs this correct? [y/n] (y): y\n\n--> Creating project folder ... Done\n--> Creating Git repository ... Done\n\n--> Project created successfully.\n\nNext steps:\n\n    1) Change to the project directory:\n    2) Install the dependencies (creates a virtual environment):\n        'poetry install'\n    3) Activate the virtual environment:\n        'poetry shell'\n    4) Run the application:\n        'test-project'\n    5) Code!\n\nSee the README.md file for more information.\n
"},{"location":"tasks/","title":"Task Runner","text":"

The task-runner Poe the Poet is installed in the new project as a development dependency which allows us to run simple tasks (similar to npm scripts).

These are run (from within the virtual environment) using the poe command and then the script name, for example:

$ poe pre\n

You can define your own, but there are 7 specific ones provided with the script.

These are defined in the pyproject.toml file in the [tool.poe.tasks] section. Take a look at this file if you want to add or remove tasks.

"},{"location":"template/internal/","title":"The Internal Template","text":"

By default, the generated application will have a basic template that you can use to get started, this template is stored inside the package itself. It will contain all you need to get started, including a basic README.md file.

The dependency management is handled by Poetry, and we include a pyproject.toml file with several useful dependencies:

"},{"location":"template/modify/","title":"Adding or Modifying files in the template","text":"

If you wish to add or change specific files in the template, you can do so by adding them to the ~/.pymaker/template folder. The files (and folders) in this folder will be copied to the root of the project when the template is generated.

Files in this global template folder will override any files in the default template, so you can for example change the README.md file, add to the .gitignore or even add a complete extra folder structure.

If you want to do a major change to the template, you can actually dump the default template to this folder and modify or delete files as you see fit. See the next section for more information on how to do this.

"},{"location":"template/replace/","title":"Replacing the Default Template","text":""},{"location":"template/replace/#dump-the-default-template","title":"Dump the Default Template","text":"

Should you wish to heavily modify the default template, or even replace it completely, you can do so by dumping the default template to the ~/.pymaker/template folder. This will copy all files from the default template to the global template folder, where you can modify or delete them as you see fit.

To do this, run the following command:

$ pymaker template dump\n

This will copy the default template to the global template folder (~/.pymaker/template). You can then modify or delete files as you see fit.

Running this command will ask you if you wish to set this exported template as the default template. It will then ask you if you want to disable the internal template. If you answer yes, then the internal template will be disabled, and ONLY the exported template will be used instead. Otherwise, both will still be used with the exported template taking precedence.

"},{"location":"template/replace/#change-the-location-of-the-template-folder","title":"Change the location of the Template folder","text":"

If you wish to change the location of the template folder, you can do so in 2 ways:

  1. By adding the --local flag to the above command (e.g. pymaker template dump --local). This will dump the default template to the current folder, giving you the option to disable the default template if needed. Note that any files in the folder will be overwritten.
  2. By changing to the folder containing your template and running pymaker template set. This will set the current folder as the template folder and give you the same option to disable the default template.

You can reset the template location back to the default ~/.pymaker/template folder by running the following command:

$ pymaker template reset\n
"},{"location":"template/replace/#choose-to-use-the-default-template-or-not","title":"Choose to use the Default Template or not","text":"

Running the dump command will give you the option to disable the default template completely and ONLY use the exported template. You can also do this (or revert back to the default template) by running the following command:

$ pymaker template default <enable|disable>\n

enable will enable the default template, and disable will disable it. Please note that any custom templates you have created will still be used, and will overwrite the default template if they have the same file name.

"}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Python Project Generation Tool","text":"

This is a command line tool to help you create new Python projects. It will create a new directory for your project, initialise a git repository, create a virtual environment, and install some basic dependencies.

Latest Version : v0.4.2

"},{"location":"#testing","title":"Testing","text":"

The generated project includes pytest and some related plugins to allow you to set up testing straight away.

Write your tests in the tests directory and run them with pytest.

"},{"location":"#linting","title":"Linting","text":"

The generated project includes flake8 (with several plugins) for linting and Black for formatting. Mypy is installed for type checking. isort, Pylint and tyrceratops are also installed as standard.

"},{"location":"#customize-the-generated-project","title":"Customize the generated project","text":"

You can add extra or edited files to the generated project by adding them to the ~/.pymaker/template directory. The files in this directory will be copied into the generated project, overwriting any existing files with the same name.

It is also possible to dump the whole template into this folder or the current folder so full customization and even removal of files is possible.

"},{"location":"#pre-commit","title":"Pre-commit","text":"

The generated project uses pre-commit to run some checks on the code before it is committed. This is a great tool to help keep your code clean.

To install pre-commit, run the following command from inside your venv:

$ pre-commit install\npre-commit installed at .git/hooks/pre-commit\n
"},{"location":"configuration/","title":"Configuration","text":""},{"location":"configuration/#configuration-file","title":"Configuration file","text":"

This app needs minimal configuration, currently just storing defaults for the author_name, author_email and default_license. This is stored in a configuration file in a sub-folder of the user's home directory. By default (and currently the only option) this file is stored in ~/.pymaker/config.toml. An example of this file is:

[pymaker]\nauthor_email = \"user@server.com\"\nauthor_name = \"Python User\"\ndefault_license = \"MIT\"\nschema_version = \"1.0\" # for internal use, generally don't change this\ntemplate_folder = \"/home/user/.pymaker/template\"\nuse_default_template = true\n

If this file does not exist, it will be created on first run. The app will ask for the values of these fields. For author_name and author_email it will try to use the current git user name and email if they are set as defaults, though the user can override these.

"},{"location":"configuration/#view-configuration","title":"View configuration","text":"

You can list the current configuration with the command:

$ pymaker config show\n
"},{"location":"configuration/#set-configuration","title":"Set configuration","text":"

The configuration is set the first time you run the app, but you can change these defaults at any time using the command:

$ pymaker config change\n

The latter command will prompt you for the values of the fields, and then update the configuration file.

"},{"location":"future-plans/","title":"Future Plans","text":""},{"location":"future-plans/#todo-list","title":"TODO List","text":""},{"location":"future-plans/#general","title":"General","text":""},{"location":"future-plans/#documentation","title":"Documentation","text":""},{"location":"installation/","title":"Installation","text":"

It is probably better to install this package globally, rather than in a virtual environment, as it is intended to be used to create new projects. Since we are using Poetry to manage the dependencies, a virtual environment will be created for you anyway specific to each project you are creating.

Install the package globally using pip:

$ pip install pyproject-maker\n

If you cannot install globally due to permissions, you can install it to your user install directory:

$ pip install --user pyproject-maker\n

or use pipx

$ pipx install pyproject-maker\n
"},{"location":"license/","title":"License","text":"

MIT License

Copyright (c) 2023 Grant Ramsay

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

"},{"location":"quick-start/","title":"Quick Start","text":""},{"location":"quick-start/#create-a-new-project","title":"Create a new project","text":"

To create a new project, run the following command:

$ pymaker new <project-folder>\n

This will create a new directory with the name you provide.

You can create a new project in the current directory by using . as the project folder name. This must be an empty directory:

$ mkdir test-project\n$ cd test-project\n$ pymaker new .\n

The App will then run the steps needed to get you started quickly:

  1. Copy the template files into the new directory
  2. Initialise a git repository
  3. Commit the boilerplate to Git

You will be asked a series of questions to customise the new project.

"},{"location":"quick-start/#choose-a-package-name-and-description","title":"Choose a package name and description","text":"

When it asks \"Package Name?\" you can choose two variants :

  1. If you are creating a standard Python package that can optionally be uploaded to PyPI, enter a package name here. Note that underscores (\"_\") must be used as opposed to dashes (\"-\") to comply with Python package naming rules. Default is the project folder name with underscores replacing dashes.
  2. For a stand-alone tool that will not ne uploaded to PyPI, or is not a library, enter '-' for the package name. In this case the main.py will just be placed in the project root and no package folder will be created or referenced.
"},{"location":"quick-start/#start-developing","title":"Start developing","text":"

You should now change into the new directory, install dependencies and activate the virtual environment:

$ cd <project-folder>\n$ poetry install\n$ poetry shell\n

Now, you can start developing

"},{"location":"quick-start/#example-run","title":"Example run","text":"
$ pymaker new test-project\nPyMaker - Generate a Python project skeleton.\n\nCreating a new project at /home/bathroom/test-project\n\nName of the Application? (Test Project):\nPackage Name? (Use '-' for standalone script) (test_project):\nDescription of the Application?: An amazing Bigly test project.\nAuthor Name? (Orange Tango):\nAuthor Email? (bigly@spraytan.org):\nApplication License? [None/Apache2/BSD3/BSD2/GPL2/GPL3/LGPL/MIT/MPL2/CDDL/EPL2] (MIT):\n\nCreating a New Python app with the below settings :\n\n    Description : An amazing Bigly test project. better than you've ever seen before!\n   Package Name : test_project\n         Author : Orange Tango\n          Email : bigly@spraytan.org\n        License : MIT\n    Project Dir : /home/bathroom/test-project\n           Name : Test Project\n\nIs this correct? [y/n] (y): y\n\n--> Creating project folder ... Done\n--> Creating Git repository ... Done\n\n--> Project created successfully.\n\nNext steps:\n\n    1) Change to the project directory:\n    2) Install the dependencies (creates a virtual environment):\n        'poetry install'\n    3) Activate the virtual environment:\n        'poetry shell'\n    4) Run the application:\n        'test-project'\n    5) Code!\n\nSee the README.md file for more information.\n
"},{"location":"tasks/","title":"Task Runner","text":"

The task-runner Poe the Poet is installed in the new project as a development dependency which allows us to run simple tasks (similar to npm scripts).

These are run (from within the virtual environment) using the poe command and then the script name, for example:

$ poe pre\n

You can define your own, but there are 7 specific ones provided with the script.

These are defined in the pyproject.toml file in the [tool.poe.tasks] section. Take a look at this file if you want to add or remove tasks.

"},{"location":"template/internal/","title":"The Internal Template","text":"

By default, the generated application will have a basic template that you can use to get started, this template is stored inside the package itself. It will contain all you need to get started, including a basic README.md file.

The dependency management is handled by Poetry, and we include a pyproject.toml file with several useful dependencies:

"},{"location":"template/modify/","title":"Adding or Modifying files in the template","text":"

If you wish to add or change specific files in the template, you can do so by adding them to the ~/.pymaker/template folder. The files (and folders) in this folder will be copied to the root of the project when the template is generated.

Files in this global template folder will override any files in the default template, so you can for example change the README.md file, add to the .gitignore or even add a complete extra folder structure.

If you want to do a major change to the template, you can actually dump the default template to this folder and modify or delete files as you see fit. See the next section for more information on how to do this.

"},{"location":"template/replace/","title":"Replacing the Default Template","text":""},{"location":"template/replace/#dump-the-default-template","title":"Dump the Default Template","text":"

Should you wish to heavily modify the default template, or even replace it completely, you can do so by dumping the default template to the ~/.pymaker/template folder. This will copy all files from the default template to the global template folder, where you can modify or delete them as you see fit.

To do this, run the following command:

$ pymaker template dump\n

This will copy the default template to the global template folder (~/.pymaker/template). You can then modify or delete files as you see fit.

Running this command will ask you if you wish to set this exported template as the default template. It will then ask you if you want to disable the internal template. If you answer yes, then the internal template will be disabled, and ONLY the exported template will be used instead. Otherwise, both will still be used with the exported template taking precedence.

"},{"location":"template/replace/#change-the-location-of-the-template-folder","title":"Change the location of the Template folder","text":"

If you wish to change the location of the template folder, you can do so in 2 ways:

  1. By adding the --local flag to the above command (e.g. pymaker template dump --local). This will dump the default template to the current folder, giving you the option to disable the default template if needed. Note that any files in the folder will be overwritten.
  2. By changing to the folder containing your template and running pymaker template set. This will set the current folder as the template folder and give you the same option to disable the default template.

You can reset the template location back to the default ~/.pymaker/template folder by running the following command:

$ pymaker template reset\n
"},{"location":"template/replace/#choose-to-use-the-default-template-or-not","title":"Choose to use the Default Template or not","text":"

Running the dump command will give you the option to disable the default template completely and ONLY use the exported template. You can also do this (or revert back to the default template) by running the following command:

$ pymaker template default <enable|disable>\n

enable will enable the default template, and disable will disable it. Please note that any custom templates you have created will still be used, and will overwrite the default template if they have the same file name.

"}]} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index e6b43e49..086909b5 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,52 +2,52 @@ https://pymaker.seapagan.net/ - 2023-08-12 + 2023-08-13 daily https://pymaker.seapagan.net/configuration/ - 2023-08-12 + 2023-08-13 daily https://pymaker.seapagan.net/future-plans/ - 2023-08-12 + 2023-08-13 daily https://pymaker.seapagan.net/installation/ - 2023-08-12 + 2023-08-13 daily https://pymaker.seapagan.net/license/ - 2023-08-12 + 2023-08-13 daily https://pymaker.seapagan.net/quick-start/ - 2023-08-12 + 2023-08-13 daily https://pymaker.seapagan.net/tasks/ - 2023-08-12 + 2023-08-13 daily https://pymaker.seapagan.net/template/internal/ - 2023-08-12 + 2023-08-13 daily https://pymaker.seapagan.net/template/modify/ - 2023-08-12 + 2023-08-13 daily https://pymaker.seapagan.net/template/replace/ - 2023-08-12 + 2023-08-13 daily \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index b68bb266f73402899f9591e3d532b724ba826b15..d681a900049f89fb221b5616624d9bc8274a0651 100644 GIT binary patch delta 275 zcmV+u0qp*y0;K{6ABzYGfZf=U2OWQHFWm&`txvE$fE5fxgh1mk#@o-d)x>p|DZV(d z{y3j3J1MW3#_3(DWmzQI zhyzR{$IvP=9dAgzf~t^jLLV}=Ex~j3u+oi2Z&`@bOzQwW21y7LwBV)3s7imeN%kjz z;xN|wRGiLvamkNomb_v+nd!i{*aW=m8mwDOwTnDa)Gy1Qsm$mb+s*+Zmn%`mW{z{f zd~)C^QAF!0f^#WX(OH9@Fj2buY)zkY5ksnz5`p?u+m9b7o{oszhY^DZmpUikYMV86 Z%7E<6Ka9-7@pq(u0Bd%D0KNkT000&%gmM4? delta 274 zcmV+t0qy>!0;B>5ABzYGiB#8-2OWQ9mu`aewkOygzzPN;LZERNxa8-OCC}JFW_s`)wgGRt0qeF(9U>1D^~>^SDl_@kc1wWB+ICBw YG9Y{N4V~uz6JsS0OHz&=Kufz