freckles-dev-project
Example:
# Checkout 'freckles' sources into '/home/markus/projects/freckles-dev' & setup a development environment for it. - freckles-dev-project: project_base: /home/markus/projects/freckles-dev
Description
Prepare freckles dev project locally.
Uses pyenv to install Python and create a virtualenv named 'freckles-dev'. Clone/pull all required dependency projects into the project folder, then install them into the virtualenv.
Also create a freckles context called 'freckles-dev', which points to all the development frecklets and resources, and sets the 'keep_run_folder' context configuration value to 'true'. To be used like:
frecklecute -c freckles-dev user-exists markus
Note: you still need to 'unlock' ('freckles context unlock') the context if you haven't done so yet, to be able to change this context.
Also create a file called '.python-version' in the project base, so that pyenv always loads the 'freckles-dev' virtualenv automatically when the user visits this folder.
Finally, create a frecklet in the '.freckles' sub-folder, called 'update-freckles-dev', which lets you pull all relevant git repositories with one command:
frecklecute -c freckles-dev update-freckles-dev
Note: the first time you do this might take a while because freckles runtime dependencies will be installed
Variables
Name | Type | Default | Description |
---|---|---|---|
|
string | -- | The base folder for the project sources (needs to be absolute!). Required |
Examples
Example 1
Checkout 'freckles' sources into '/home/markus/projects/freckles-dev' & setup a development environment for it.
Code
- freckles-dev-project: project_base: /home/markus/projects/freckles-dev
Code
doc: short_help: Prepare freckles dev project locally. help: | Prepare freckles dev project locally. Uses [pyenv](https://github.com/pyenv/pyenv) to install Python and create a virtualenv named 'freckles-dev'. Clone/pull all required dependency projects into the project folder, then install them into the virtualenv. Also create a freckles context called 'freckles-dev', which points to all the development frecklets and resources, and sets the 'keep_run_folder' context configuration value to 'true'. To be used like: frecklecute -c freckles-dev user-exists markus Note: you still need to 'unlock' ('freckles context unlock') the context if you haven't done so yet, to be able to change this context. Also create a file called '.python-version' in the project base, so that pyenv always loads the 'freckles-dev' virtualenv automatically when the user visits this folder. Finally, create a frecklet in the '.freckles' sub-folder, called 'update-freckles-dev', which lets you pull all relevant git repositories with one command: frecklecute -c freckles-dev update-freckles-dev Note: the first time you do this might take a while because freckles runtime dependencies will be installed examples: - title: Checkout 'freckles' sources into '/home/markus/projects/freckles-dev' & setup a development environment for it. vars: project_base: /home/markus/projects/freckles-dev args: _import: freckles-dev-sources-synced frecklets: - freckles-dev-sources-synced: project_base: '{{:: project_base ::}}' - file-with-content: path: ~/.config/freckles/freckles-dev.context content: | keep_run_folder: true repos: - "frecklet::{{:: project_base ::}}/frecklets/nsbl/frecklets" - "ansible-role::{{:: project_base ::}}/frecklets/nsbl/resources/roles" - "frecklet::{{:: project_base ::}}/frecklets/nsbl-community/frecklets" - "ansible-role::{{:: project_base ::}}/frecklets/nsbl-community/resources/roles" - "ansible-tasklist::{{:: project_base ::}}/frecklets/nsbl/resources/ansible-tasklists" - "tempting::{{:: project_base ::}}/frecklets/temptings" - "./.freckles" - python-virtualenv: python_type: pyenv venv_name: freckles-dev python_version: 3.7.3 pip_extra_args: --extra-index-url https://pkgs.frkl.io/frkl/dev --pre -e python_packages: - '{{:: project_base ::}}/frutils' - '{{:: project_base ::}}/frkl' - '{{:: project_base ::}}/ting' - '{{:: project_base ::}}/frkl-pkg' - '{{:: project_base ::}}/freckles[develop,docs,testing]' - '{{:: project_base ::}}/tempting' - '{{:: project_base ::}}/nsbl' - '{{:: project_base ::}}/freckles-adapter-nsbl' - '{{:: project_base ::}}/freckles-cli' - '{{:: project_base ::}}/pyckles' - file-with-content: path: '{{:: project_base ::}}/.python-version' content: | freckles-dev - file-with-content: path: '{{:: project_base ::}}/.freckles/update-freckles-dev.frecklet' content: | #! /usr/bin/env frecklecute doc: short_help: "Update freckles dev project at: {{:: project_base ::}}." frecklets: - freckles-dev-sources-synced: project_base: "{{:: project_base ::}}"
frecklecute freckles-dev-project --help Usage: frecklecute freckles-dev-project [OPTIONS] PROJECT_BASE Prepare freckles dev project locally. Uses [pyenv](https://github.com/pyenv/pyenv) to install Python and create a virtualenv named 'freckles-dev'. Clone/pull all required dependency projects into the project folder, then install them into the virtualenv. Also create a freckles context called 'freckles-dev', which points to all the development frecklets and resources, and sets the 'keep_run_folder' context configuration value to 'true'. To be used like: frecklecute -c freckles-dev user-exists markus Note: you still need to 'unlock' ('freckles context unlock') the context if you haven't done so yet, to be able to change this context. Also create a file called '.python-version' in the project base, so that pyenv always loads the 'freckles-dev' virtualenv automatically when the user visits this folder. Finally, create a frecklet in the '.freckles' sub-folder, called 'update- freckles-dev', which lets you pull all relevant git repositories with one command: frecklecute -c freckles-dev update-freckles-dev Note: the first time you do this might take a while because freckles runtime dependencies will be installed Options: --help Show this message and exit.
# -*- coding: utf-8 -*- # # module path: pycklets.freckles_dev_project.FrecklesDevProject # from dataclasses import dataclass from pyckles import AutoPycklet from typing import * # noqa @dataclass class FrecklesDevProject(AutoPycklet): """Prepare freckles dev project locally. Uses [pyenv](https://github.com/pyenv/pyenv) to install Python and create a virtualenv named 'freckles-dev'. Clone/pull all required dependency projects into the project folder, then install them into the virtualenv. Also create a freckles context called 'freckles-dev', which points to all the development frecklets and resources, and sets the 'keep_run_folder' context configuration value to 'true'. To be used like: frecklecute -c freckles-dev user-exists markus Note: you still need to 'unlock' ('freckles context unlock') the context if you haven't done so yet, to be able to change this context. Also create a file called '.python-version' in the project base, so that pyenv always loads the 'freckles-dev' virtualenv automatically when the user visits this folder. Finally, create a frecklet in the '.freckles' sub-folder, called 'update-freckles-dev', which lets you pull all relevant git repositories with one command: frecklecute -c freckles-dev update-freckles-dev Note: the first time you do this might take a while because freckles runtime dependencies will be installed Args: project_base: The base folder for the project sources (needs to be absolute!). """ FRECKLET_ID = "freckles-dev-project" project_base: str = None def __post_init__(self): super(FrecklesDevProject, self).__init__(var_names=["project_base"]) frecklet_class = FrecklesDevProject
# -*- coding: utf-8 -*- # # module path: pycklets.freckles_dev_project.FrecklesDevProject # from pyckles import AutoPycklet class FrecklesDevProject(AutoPycklet): """Prepare freckles dev project locally. Uses [pyenv](https://github.com/pyenv/pyenv) to install Python and create a virtualenv named 'freckles-dev'. Clone/pull all required dependency projects into the project folder, then install them into the virtualenv. Also create a freckles context called 'freckles-dev', which points to all the development frecklets and resources, and sets the 'keep_run_folder' context configuration value to 'true'. To be used like: frecklecute -c freckles-dev user-exists markus Note: you still need to 'unlock' ('freckles context unlock') the context if you haven't done so yet, to be able to change this context. Also create a file called '.python-version' in the project base, so that pyenv always loads the 'freckles-dev' virtualenv automatically when the user visits this folder. Finally, create a frecklet in the '.freckles' sub-folder, called 'update-freckles-dev', which lets you pull all relevant git repositories with one command: frecklecute -c freckles-dev update-freckles-dev Note: the first time you do this might take a while because freckles runtime dependencies will be installed Args: project_base: The base folder for the project sources (needs to be absolute!). """ FRECKLET_ID = "freckles-dev-project" def __init__(self, project_base=None): super(FrecklesDevProject, self).__init__(var_names=["project_base"]) self._project_base = project_base @property def project_base(self): return self._project_base @project_base.setter def project_base(self, project_base): self._project_base = project_base frecklet_class = FrecklesDevProject