venvit 7.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- venvit-7.3.0/LICENSE.txt +21 -0
- venvit-7.3.0/PKG-INFO +466 -0
- venvit-7.3.0/README.md +433 -0
- venvit-7.3.0/pyproject.toml +123 -0
- venvit-7.3.0/src/venvit/__init__.py +0 -0
- venvit-7.3.0/src/venvit/main.py +47 -0
- venvit-7.3.0/src/venvit/models.py +424 -0
- venvit-7.3.0/src/venvit/setup.py +5 -0
- venvit-7.3.0/src/venvit/upgrade.py +115 -0
venvit-7.3.0/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
----------------------------------------------------------------------------
|
|
3
|
+
Copyright (c) 2023, Hendrik du Toit
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
venvit-7.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: venvit
|
|
3
|
+
Version: 7.3.0
|
|
4
|
+
Summary: Tools for creating, maintaining and automating Python virtual environments.
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE.txt
|
|
7
|
+
Author: Hendrik du Toit
|
|
8
|
+
Author-email: hendrik@brightedge.co.za
|
|
9
|
+
Maintainer: Hendrik du Toit
|
|
10
|
+
Maintainer-email: hendrikdt@citiqprepaid.co.za
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Information Technology
|
|
15
|
+
Classifier: Intended Audience :: System Administrators
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: System :: Archiving :: Packaging
|
|
23
|
+
Requires-Dist: beetools (>=5.2.5,<6.0.0)
|
|
24
|
+
Requires-Dist: gitpython (>=3.1.44,<4.0.0)
|
|
25
|
+
Requires-Dist: pydantic (>=2.11.4,<3.0.0)
|
|
26
|
+
Requires-Dist: pydantic-settings (>=2.9.1,<3.0.0)
|
|
27
|
+
Project-URL: Homepage, https://github.com/BrightEdgeeServices/venvit
|
|
28
|
+
Project-URL: Issues, https://github.com/BrightEdgeeServices/venvit/issues
|
|
29
|
+
Project-URL: Repository, https://github.com/BrightEdgeeServices/venvit.git
|
|
30
|
+
Project-URL: changelog, https://github.com/BrightEdgeeServices/venvit/releases
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# VEnvIt
|
|
34
|
+
|
|
35
|
+
| **Category** | **Status' and Links** |
|
|
36
|
+
| ------------ | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
37
|
+
| General | \[![][maintenance_y_img]\][maintenance_y_lnk] \[![][semver_pic]\][semver_link] |
|
|
38
|
+
| CI | \[![][pre_commit_ci_img]\][pre_commit_ci_lnk] \[![][codecov_img]\][codecov_lnk] \[![][gha_docu_img]\][gha_docu_lnk] |
|
|
39
|
+
| Github | \[![][gh_issues_img]\][gh_issues_lnk] \[![][gh_language_img]\][gh_language_lnk] \[![][gh_last_commit_img]\][gh_last_commit_lnk] |
|
|
40
|
+
|
|
41
|
+
VEnvIt is a utility that employs Python and PowerShell scripts to create, initialize, and remove virtual environments
|
|
42
|
+
tailored for both development and production systems. It provides significant flexibility, allowing users to configure
|
|
43
|
+
their environments according to specific requirements.
|
|
44
|
+
|
|
45
|
+
Instead of relying on traditional configuration files (INI, TOML, JSON), VEnvIt uses user-modifiable scripts for
|
|
46
|
+
settings configuration. This design choice offers greater flexibility and adaptability, enabling fine-grained
|
|
47
|
+
customization that standard configuration files cannot accommodate.
|
|
48
|
+
|
|
49
|
+
However, this approach introduces additional complexity and requires a thorough understanding of the application's
|
|
50
|
+
workings. Proficiency in Python and PowerShell scripting is essential to effectively utilize and configure VEnvIt.
|
|
51
|
+
|
|
52
|
+
Is this a Python or a PowerShell project? Thechnically it is both. As much As I would like it to be rather a Python
|
|
53
|
+
project, PowerShell is essential:
|
|
54
|
+
|
|
55
|
+
- The assumption is that their is no native Python installation on the machine (see step Instlaation, Step 2 below). The
|
|
56
|
+
app must be kick-started from somewhere, so PowerSeell seems to be the right choice.
|
|
57
|
+
- The instlaation manipulate the environment variables of the current session. This is tricky if not impossible with
|
|
58
|
+
Python only. PowerShell sorts this out.
|
|
59
|
+
|
|
60
|
+
## Key Features
|
|
61
|
+
|
|
62
|
+
- **Flexible Environment Management**: Create, initialize, and remove virtual environments using customizable scripts.
|
|
63
|
+
- **User-Controlled Configuration**: Configure settings through scripts for maximum adaptability.
|
|
64
|
+
- **Tailored for Complex Systems**: Designed to handle the intricacies of unique development and production
|
|
65
|
+
environments.
|
|
66
|
+
|
|
67
|
+
## Prerequisites
|
|
68
|
+
|
|
69
|
+
- **Scripting Knowledge**: Familiarity with Python and PowerShell scripting languages.
|
|
70
|
+
- **Understanding of Virtual Environments**: Basic knowledge of virtual environments and their role in development and
|
|
71
|
+
production systems.
|
|
72
|
+
|
|
73
|
+
# Usage Overview
|
|
74
|
+
|
|
75
|
+
VEnvIt provides three primary scripts for managing virtual environments:
|
|
76
|
+
|
|
77
|
+
- `vn.ps1`: Creates a new virtual environment.
|
|
78
|
+
- `vs.ps1`: Initializes an existing virtual environment.
|
|
79
|
+
- `vr.ps1`: Removes a virtual environment.
|
|
80
|
+
|
|
81
|
+
Additional configuration scripts are auto-generated during environment setup for customization.
|
|
82
|
+
|
|
83
|
+
# Detailed Usage
|
|
84
|
+
|
|
85
|
+
## Creating a New Virtual Environment (`vn.ps1`)
|
|
86
|
+
|
|
87
|
+
### Introduction
|
|
88
|
+
|
|
89
|
+
The `vn.ps1` script creates a new Python virtual environment. It uses a combination of environment variables and
|
|
90
|
+
command-line parameters to set up the environment. If the target project directory already exists and contains a
|
|
91
|
+
`pyproject.toml` file, the Python modules will be installed accordingly. Otherwise, it installs a default set of
|
|
92
|
+
development tools:
|
|
93
|
+
|
|
94
|
+
- **Pre-Commit**
|
|
95
|
+
- **Black**
|
|
96
|
+
- **Flake8**
|
|
97
|
+
|
|
98
|
+
### Syntax
|
|
99
|
+
|
|
100
|
+
```powershell
|
|
101
|
+
.\vn.ps1 -ProjectName <ProjectName> -PythonVer <PythonVer> -Organization <Organization> [-ResetScripts y|n] [-DevMode y|n]
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
or
|
|
105
|
+
|
|
106
|
+
```powershell
|
|
107
|
+
.\vn.ps1 -Help
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
or
|
|
111
|
+
|
|
112
|
+
### Parameters
|
|
113
|
+
|
|
114
|
+
- `ProjectName`: The name of the project.
|
|
115
|
+
- `PythonVer`: The Python version for the virtual environment (e.g., `39` or `312`).
|
|
116
|
+
- `Organization`: Acronym for the organization owning the project.
|
|
117
|
+
- `-ResetScripts`: Optional. Use `-ResetScripts y` to reset scripts.
|
|
118
|
+
- `-DevMode`: Optional. Use `-DevMode y` to install development modules from `pyproject.toml`.
|
|
119
|
+
|
|
120
|
+
### Example
|
|
121
|
+
|
|
122
|
+
```powershell
|
|
123
|
+
.\vn.ps1 -ProjectName MyProject -PythonVer 310 -Organization MyOrg -ResetScripts y -DevMode y
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
This command creates a new virtual environment for a project named **MyProject**, using Python 3.10, associated with the
|
|
127
|
+
organization **MyOrg**, resets scripts, and installs development modules.
|
|
128
|
+
|
|
129
|
+
## Initializing an Existing Virtual Environment (`vs.ps1`)
|
|
130
|
+
|
|
131
|
+
### Introduction
|
|
132
|
+
|
|
133
|
+
The `vs.ps1` script initializes an existing virtual environment, ensuring all configurations and dependencies are up to
|
|
134
|
+
date. This includes running project-specific setup and environment variable scripts.
|
|
135
|
+
|
|
136
|
+
### Syntax
|
|
137
|
+
|
|
138
|
+
```powershell
|
|
139
|
+
.\vs.ps1 -ProjectName <ProjectName>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Parameters
|
|
143
|
+
|
|
144
|
+
- `ProjectName`: The name of the project.
|
|
145
|
+
|
|
146
|
+
### Example
|
|
147
|
+
|
|
148
|
+
```powershell
|
|
149
|
+
.\vs.ps1 -ProjectName MyProject
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
or
|
|
153
|
+
|
|
154
|
+
```powershell
|
|
155
|
+
.\vs.ps1 -Help
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
This command initializes the virtual environment for **MyProject**.
|
|
159
|
+
|
|
160
|
+
## Removing a Virtual Environment (`vr.ps1`)
|
|
161
|
+
|
|
162
|
+
### Introduction
|
|
163
|
+
|
|
164
|
+
The `vr.ps1` script removes an existing virtual environment, including all associated configurations and dependencies.
|
|
165
|
+
It also archives and removes project-specific configuration scripts.
|
|
166
|
+
|
|
167
|
+
### Syntax
|
|
168
|
+
|
|
169
|
+
```powershell
|
|
170
|
+
.\vr.ps1 -ProjectName <ProjectName>
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Parameters
|
|
174
|
+
|
|
175
|
+
- `ProjectName`: The name of the project.
|
|
176
|
+
|
|
177
|
+
### Example
|
|
178
|
+
|
|
179
|
+
```powershell
|
|
180
|
+
.\vr.ps1 -ProjectName MyProject
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
This command removes the virtual environment for **MyProject**.
|
|
184
|
+
|
|
185
|
+
# Project-Specific PowerShell Configuration Scripts
|
|
186
|
+
|
|
187
|
+
When you create a new virtual environment using `vn.ps1`, it generates additional PowerShell configuration scripts
|
|
188
|
+
specific to the project. These scripts support unique configuration options and assist in the installation and
|
|
189
|
+
activation of the virtual environment. They reside in various subdirectories accessed through environment variables
|
|
190
|
+
pointing to these directories.
|
|
191
|
+
|
|
192
|
+
### Script Descriptions
|
|
193
|
+
|
|
194
|
+
1. **`VEnv<ProjectName>Install.ps1`**: Contains special instructions for installing this virtual environment. It is only
|
|
195
|
+
called by `vn.ps1`. The initial default version can be updated for subsequent runs.
|
|
196
|
+
1. **`VEnv<ProjectName>EnvVar.ps1`**: Sets environment variables for the project.
|
|
197
|
+
1. **`VEnv<ProjectName>Setup_custom.ps1`**: Contains special instructions for setting up the virtual environment.
|
|
198
|
+
1. **`Secrets.ps1`**: Contains instructions for setting secrets for the project. Created in both the default and user
|
|
199
|
+
secrets directories (`VENVIT_DIR\Secrets` and `~\VenvIt\Secrets`).
|
|
200
|
+
|
|
201
|
+
### Script Locations
|
|
202
|
+
|
|
203
|
+
- **Default Configuration Directory (`VENV_CONFIG_DEFAULT_DIR`)**: This directory typically resides on a shared drive,
|
|
204
|
+
preferably as a subdirectory of the main installation directory (`VENVIT_DIR`). It contains organization-wide scripts.
|
|
205
|
+
- **User Configuration Directory (`~\VenvIt\Config`)**: This directory typically resides on the local drive of the
|
|
206
|
+
developer's machine and should only be accessible to the current user/environment. Scripts here override those in the
|
|
207
|
+
default directory.
|
|
208
|
+
|
|
209
|
+
### Script Management
|
|
210
|
+
|
|
211
|
+
- If the `-ResetScripts` switch is used with `vn.ps1`, it will archive the current scripts for this project and create
|
|
212
|
+
new default scripts. Without `-ResetScripts`, existing scripts will be used if they exist.
|
|
213
|
+
- If `vr.ps1` is called to remove the virtual environment, the scripts are archived, and new ones will be created upon
|
|
214
|
+
the next execution of `vn.ps1`. You can refer to the archive created by `vr.ps1` to access previous scripts.
|
|
215
|
+
|
|
216
|
+
# Environment Variables
|
|
217
|
+
|
|
218
|
+
VEnvIt utilizes several environment variables to manage virtual environments effectively. These variables should be set
|
|
219
|
+
during installation.
|
|
220
|
+
|
|
221
|
+
| Environment Variable | Description |
|
|
222
|
+
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
223
|
+
| **PROJECTS_BASE_DIR** | The parent/base directory for all projects (e.g., `C:\Projects`). Organize repositories by organization, such as personal projects and organizational projects (e.g., `C:\Projects\MyOrg\MyProject`, `C:\Projects\Company\CompanyProject`). |
|
|
224
|
+
| **VENV_BASE_DIR** | The directory where the Python virtual environments are stored (e.g., `~\venv`). Unlike the conventional practice of keeping virtual environment files within the project directory, all virtual environments are stored together in this dedicated directory. |
|
|
225
|
+
| **VENV_CONFIG_DEFAULT_DIR** | Directory for default (organization-wide) configuration scripts. Typically a subdirectory of `VENVIT_DIR` (e.g., `$VENVIT_DIR\Configs`). Shared among all developers. |
|
|
226
|
+
| **~\\VenvIt\\Config** | Directory for user-specific configuration scripts (e.g., `~\VEnvIt\Configs`). Should only be accessible to the current user/machine. Scripts here override those in the default directory. |
|
|
227
|
+
| **VENV_ENVIRONMENT** | Identifies the working environment. Possible values include `loc_dev`, `github_dev`, `prod`, or other values defined by the organization. This variable may be set differently in various environments. The default is set in `$VENV_CONFIG_DEFAULT_DIR\VEnv<ProjectName>EnvVar.ps1` and can be overridden in `~\VenvIt\Config\VEnv<ProjectName>EnvVar.ps1`. |
|
|
228
|
+
| **VENV_PYTHON_BASE_DIR** | Directory for Python base installations (e.g., `C:\Python`). Different versions of Python are accessed during the creation of virtual environments (e.g., `C:\Python\Python35`, `C:\Python\Python312`). |
|
|
229
|
+
| **VENVIT_DIR\\Secrets** | Directory for default (organization-wide) secrets scripts for the current environment as per `VENV_ENVIRONMENT` (e.g., `$VENVIT_DIR\Secrets`). Contents are accessible to all who have access to the installation. |
|
|
230
|
+
| **~\\VenvIt\\Secrets** | Directory for user-specific secrets scripts for the current environment (e.g., `~\VEnvIt\Secrets`). Contents are private and should not be shared or pushed to repositories. Scripts here override those in the default directory. |
|
|
231
|
+
| **VENVIT_DIR** | Installation directory where VEnvIt scripts reside (e.g., `C:\VEnvIt`). In an organizational setup, this should be a shared drive. |
|
|
232
|
+
|
|
233
|
+
# Default Installation Directory Structure
|
|
234
|
+
|
|
235
|
+
## Windows
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
c:\
|
|
239
|
+
├── ~\.
|
|
240
|
+
│ └── VEnvIt (Client/user files)
|
|
241
|
+
│ ├── Config (User configuration files)
|
|
242
|
+
│ │ ├── VEnvMyProjectInstall.ps1
|
|
243
|
+
│ │ ├── VEnvMyProjectEnvVar.ps1
|
|
244
|
+
│ │ ├── VEnvMyProjectCustomSetup.ps1
|
|
245
|
+
│ │ ├── VEnvMyWorkProjectInstall.ps1
|
|
246
|
+
│ │ ├── VEnvMyWorkProjectEnvVar.ps1
|
|
247
|
+
│ │ ├── VEnvMyWorkProjectCustomSetup.ps1
|
|
248
|
+
│ │ └── ...
|
|
249
|
+
│ ├── Secrets (User secrets file)
|
|
250
|
+
│ │ └── Secrets.ps1
|
|
251
|
+
│ └── venv (env:VENV_BASE_DIR)
|
|
252
|
+
│ ├── MyProject_env
|
|
253
|
+
│ ├── MyWorkProject_env
|
|
254
|
+
│ └── ...
|
|
255
|
+
├── Projects (env:PROJECTS_BASE_DIR)
|
|
256
|
+
│ ├── Personal (env:VENV_ORGANIZATION_NAME)
|
|
257
|
+
│ │ ├── MyProject (env:PROJECT_NAME)
|
|
258
|
+
│ │ └── ...
|
|
259
|
+
│ └── Work (env:VENV_ORGANIZATION_NAME)
|
|
260
|
+
│ ├── MyWorkProject (env:PROJECT_NAME)
|
|
261
|
+
│ └── ...
|
|
262
|
+
├── Python (env:VENV_PYTHON_BASE_DIR)
|
|
263
|
+
│ ├── Python39
|
|
264
|
+
│ ├── Python312
|
|
265
|
+
│ └── ...
|
|
266
|
+
.
|
|
267
|
+
.
|
|
268
|
+
.
|
|
269
|
+
└── env:APPDATA (or shared directory for a shared installation)
|
|
270
|
+
└── VEnvIt (env:VENVIT_DIR)
|
|
271
|
+
├── Config (Default configuration files)
|
|
272
|
+
│ ├── VEnvMyProjectInstall.ps1
|
|
273
|
+
│ ├── VEnvMyProjectEnvVar.ps1
|
|
274
|
+
│ ├── VEnvMyProjectCustomSetup.ps1
|
|
275
|
+
│ ├── VEnvMyWorkProjectInstall.ps1
|
|
276
|
+
│ ├── VEnvMyWorkProjectEnvVar.ps1
|
|
277
|
+
│ ├── VEnvMyWorkProjectCustomSetup.ps1
|
|
278
|
+
│ └── ...
|
|
279
|
+
└── Config (User configuration files)
|
|
280
|
+
└── Secrets.ps1
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
# Shared Installation
|
|
284
|
+
|
|
285
|
+
To install a shared version of VEnvIt, follow these steps:
|
|
286
|
+
|
|
287
|
+
1. **Set Environment Variables**: Decide on the values for the system environment variables listed above and set them
|
|
288
|
+
accordingly.
|
|
289
|
+
|
|
290
|
+
1. **Remove Existing Python Installations**: Remove any native Python installations and ensure that any references to
|
|
291
|
+
Python installations are removed from the `PATH` environment variable. This step is vital for successful operation.
|
|
292
|
+
|
|
293
|
+
1. **Install Python Versions**: Install the various versions of Python you intend to use (e.g., `C:\Python\Python39`,
|
|
294
|
+
`C:\Python\Python312`). During installation, use the following settings:
|
|
295
|
+
|
|
296
|
+
- **Do Not** select "Use admin privileges when installing py.exe."
|
|
297
|
+
- **Do Not** add `python.exe` to the `PATH`.
|
|
298
|
+
- Choose "Customize installation."
|
|
299
|
+
- **Unselect** "py launcher."
|
|
300
|
+
- **Unselect** "Install for all users."
|
|
301
|
+
- **Unselect** "Create shortcuts for installed applications."
|
|
302
|
+
- **Unselect** "Add Python to environment variables."
|
|
303
|
+
- **Select** "Precompile standard library."
|
|
304
|
+
- **Select** "Download debugging tools."
|
|
305
|
+
- **Select** "Download debug binaries (requires VS 2017 or later)."
|
|
306
|
+
- Change the "Customize install location" to your desired directory (e.g., `C:\Python\Python310`).
|
|
307
|
+
|
|
308
|
+
1. **Ensure Shared Directory Exists**: The shared directory `VENVIT_DIR` must exist and be accessible.
|
|
309
|
+
|
|
310
|
+
1. **Run Installation Script**: Open a new PowerShell window **with Administrator rights**. Do not use an existing one.
|
|
311
|
+
Paste the following script into the PowerShell window:
|
|
312
|
+
|
|
313
|
+
```powershell
|
|
314
|
+
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
|
|
315
|
+
$UpgradeScriptDir = New-Item -ItemType Directory -Path (Join-Path -Path $env:TEMP -ChildPath ("venvit_" + [Guid]::NewGuid().ToString()))
|
|
316
|
+
$Tag = (Invoke-WebRequest "https://api.github.com/repos/BrightEdgeeServices/venvit/releases" | ConvertFrom-Json)[0].tag_name
|
|
317
|
+
$UpgradeScriptPath = Join-Path -Path $UpgradeScriptDir.FullName -ChildPath "Installation-Files.zip"
|
|
318
|
+
Invoke-WebRequest "https://github.com/BrightEdgeeServices/venvit/releases/download/$Tag/Installation-Files.zip" -OutFile $UpgradeScriptPath
|
|
319
|
+
Expand-Archive -Path $UpgradeScriptPath -DestinationPath $UpgradeScriptDir
|
|
320
|
+
Import-Module -Name (Join-Path -Path $UpgradeScriptDir.FullName -ChildPath "src\Install-Conclude.psm1")
|
|
321
|
+
Invoke-ConcludeInstall -Release $Tag -UpgradeScriptDir $UpgradeScriptDir
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
1. **Configure Secrets Scripts**: Configure the `Secrets.ps1` script in both `VENVIT_DIR\Secrets` and
|
|
325
|
+
`~\VenvIt\Secrets`:
|
|
326
|
+
|
|
327
|
+
- Set the ports for the various Docker containers.
|
|
328
|
+
- Set environment variables for secrets (e.g., `$env:MY_SECRET = 'AaBbCcDdE'`), ensuring they match configurations
|
|
329
|
+
in GitHub or other services.
|
|
330
|
+
|
|
331
|
+
1. **Confirm Installation**:
|
|
332
|
+
|
|
333
|
+
- Open a new PowerShell window.
|
|
334
|
+
|
|
335
|
+
- Verify that the environment variables are set correctly using `Get-ChildItem Env:`.
|
|
336
|
+
|
|
337
|
+
- Create a test project:
|
|
338
|
+
|
|
339
|
+
```powershell
|
|
340
|
+
.\vn.ps1 -ProjectName TestProject -PythonVer 310 -Organization MyOrg -ResetScripts y -DevMode y
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
- Ensure the virtual environment is activated.
|
|
344
|
+
- Verify the current directory is correct (e.g., `..\MyOrg\TestProject`).
|
|
345
|
+
- Confirm environment variables exist and have correct values.
|
|
346
|
+
|
|
347
|
+
- Initialize the test project:
|
|
348
|
+
|
|
349
|
+
```powershell
|
|
350
|
+
.\vs.ps1 -ProjectName TestProject
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
- Ensure the virtual environment is activated.
|
|
354
|
+
- Verify the current directory is correct.
|
|
355
|
+
|
|
356
|
+
- Remove the test project:
|
|
357
|
+
|
|
358
|
+
```powershell
|
|
359
|
+
.\vr.ps1 -ProjectName TestProject
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
- Ensure the virtual environment is deactivated.
|
|
363
|
+
|
|
364
|
+
# Contributor Guide
|
|
365
|
+
|
|
366
|
+
Thank you for your interest in contributing to **VEnvIt**. This project is open-source under
|
|
367
|
+
the [MIT License](https://github.com/BrightEdgeeServices/venvit/blob/master/LICENSE) and welcomes contributions in the
|
|
368
|
+
form of bug reports, feature requests, and pull requests.
|
|
369
|
+
|
|
370
|
+
## Important Resources
|
|
371
|
+
|
|
372
|
+
- **Source Code**: [GitHub Repository](https://github.com/BrightEdgeeServices/venvit)
|
|
373
|
+
- **Issue Tracker**: [GitHub Issues](https://github.com/BrightEdgeeServices/venvit/issues)
|
|
374
|
+
|
|
375
|
+
## Reporting Bugs
|
|
376
|
+
|
|
377
|
+
Please report bugs on the [Issue Tracker](https://github.com/BrightEdgeeServices/venvit/issues). When filing an issue,
|
|
378
|
+
please include:
|
|
379
|
+
|
|
380
|
+
- A detailed description of the problem.
|
|
381
|
+
- What command did you execute?
|
|
382
|
+
- What did you expect to see?
|
|
383
|
+
- What did you see instead?
|
|
384
|
+
- Steps to reproduce the issue or a test case.
|
|
385
|
+
- Information about your operating system and Python version.
|
|
386
|
+
- The version of VEnvIt you are using.
|
|
387
|
+
|
|
388
|
+
## Requesting Features
|
|
389
|
+
|
|
390
|
+
Feature requests are also handled through the [Issue Tracker](https://github.com/BrightEdgeeServices/venvit/issues).
|
|
391
|
+
Please include:
|
|
392
|
+
|
|
393
|
+
- A detailed description of the proposed feature or improvement.
|
|
394
|
+
- The benefits it would bring to the project.
|
|
395
|
+
- Any proposed solutions or implementation ideas.
|
|
396
|
+
|
|
397
|
+
## Submitting Changes
|
|
398
|
+
|
|
399
|
+
- Open a pull request to submit changes.
|
|
400
|
+
- Ensure your code follows the project's coding standards and conventions.
|
|
401
|
+
- If your changes add functionality, update the documentation accordingly.
|
|
402
|
+
- It's recommended to open an issue before starting work to discuss your ideas and approach with the maintainers.
|
|
403
|
+
|
|
404
|
+
# License
|
|
405
|
+
|
|
406
|
+
This project is licensed under the terms of
|
|
407
|
+
the [MIT License](https://github.com/BrightEdgeeServices/venvit/blob/master/LICENSE).
|
|
408
|
+
|
|
409
|
+
# Support
|
|
410
|
+
|
|
411
|
+
For support or any questions, please open an issue on
|
|
412
|
+
the [Issue Tracker](https://github.com/BrightEdgeeServices/venvit/issues).
|
|
413
|
+
|
|
414
|
+
# Example Usage of `vn.ps1`, `vs.ps1`, and `vr.ps1`
|
|
415
|
+
|
|
416
|
+
______________________________________________________________________
|
|
417
|
+
|
|
418
|
+
## Updating ReleaseNotes Instructions
|
|
419
|
+
|
|
420
|
+
1. Run the `pushpy.ps1` script or manually commit the current changes.
|
|
421
|
+
1. Generate the release notes
|
|
422
|
+
1. Use one of the following AI propmpts in Notion to generate the release notes.
|
|
423
|
+
|
|
424
|
+
- [Release - Update - General](https://www.notion.so/Release-Update-General-2c0bc8e6c6f38076b4cee82e3cf243fa?v=2c0bc8e6c6f3806e85db000c395f94ce&source=copy_link)
|
|
425
|
+
- [Release - Update - VenvIt](https://www.notion.so/Release-Update-VenvIt-2c0bc8e6c6f380de84a0f3fbb8b5dda5?v=2c0bc8e6c6f3806e85db000c395f94ce&source=copy_link)
|
|
426
|
+
|
|
427
|
+
or
|
|
428
|
+
|
|
429
|
+
1. Use the following template and manually update the ReleaseNotes.md file.
|
|
430
|
+
|
|
431
|
+
```
|
|
432
|
+
# Release ?.?.?
|
|
433
|
+
## Summary of Changes
|
|
434
|
+
- bla, bla, bla
|
|
435
|
+
## Next Heading
|
|
436
|
+
- bla, bla, bla
|
|
437
|
+
---
|
|
438
|
+
```
|
|
439
|
+
1. You can repeat step 1 multiple times.
|
|
440
|
+
1. You can repeat step 2 multiple times but update the ReleaseNotes that has not been published.
|
|
441
|
+
1. Run the `pushpr.ps1` script once you are ready to create the PR to publish the release. TOy can also manually create
|
|
442
|
+
the tag, touch a file, commit and push the changes.
|
|
443
|
+
1. Merge the PR in GitHub.
|
|
444
|
+
1. Confirm the following:
|
|
445
|
+
1. The release update reflects in GitHub
|
|
446
|
+
1. The release update notification was sent
|
|
447
|
+
|
|
448
|
+
______________________________________________________________________
|
|
449
|
+
|
|
450
|
+
[codecov_img]: https://img.shields.io/codecov/c/gh/BrightEdgeeServices/venvit "CodeCov"
|
|
451
|
+
[codecov_lnk]: (https://app.codecov.io/gh/BrightEdgeeServices/venvit) "CodeCov"
|
|
452
|
+
[gha_docu_img]: https://img.shields.io/readthedocs/venvit "Read the Docs"
|
|
453
|
+
[gha_docu_lnk]: https://github.com/BrightEdgeeServices/venvit/blob/master/.github/workflows/02-check-documentation.yml "Read the Docs"
|
|
454
|
+
[gh_issues_img]: https://img.shields.io/github/issues-raw/BrightEdgeeServices/venvit "GitHub - Issue Counter"
|
|
455
|
+
[gh_issues_lnk]: https://github.com/BrightEdgeeServices/venvit/issues "GitHub - Issue Counter"
|
|
456
|
+
[gh_language_img]: https://img.shields.io/github/languages/top/BrightEdgeeServices/venvit "GitHub - Top Language"
|
|
457
|
+
[gh_language_lnk]: https://github.com/BrightEdgeeServices/venvit "GitHub - Top Language"
|
|
458
|
+
[gh_last_commit_img]: https://img.shields.io/github/last-commit/BrightEdgeeServices/venvit/master "GitHub - Last Commit"
|
|
459
|
+
[gh_last_commit_lnk]: https://github.com/BrightEdgeeServices/venvit/commit/master "GitHub - Last Commit"
|
|
460
|
+
[maintenance_y_img]: https://img.shields.io/badge/Maintenance%20Intended-%E2%9C%94-green.svg?style=flat-square "Maintenance - intended"
|
|
461
|
+
[maintenance_y_lnk]: http://unmaintained.tech/ "Maintenance - intended"
|
|
462
|
+
[pre_commit_ci_img]: https://img.shields.io/github/actions/workflow/status/BrightEdgeeServices/venvit/01-pre-commit-and-document-check.yml?label=pre-commit "Pre-Commit"
|
|
463
|
+
[pre_commit_ci_lnk]: https://github.com/BrightEdgeeServices/venvit/blob/master/.github/workflows/01-pre-commit-and-document-check.yml "Pre-Commit"
|
|
464
|
+
[semver_link]: https://semver.org/ "Sentic Versioning - 2.0.0"
|
|
465
|
+
[semver_pic]: https://img.shields.io/badge/Semantic%20Versioning-2.0.0-brightgreen.svg?style=flat-square "Sentic Versioning - 2.0.0"
|
|
466
|
+
|