tox-envfile 0.0.4__py3-none-any.whl → 0.0.6__py3-none-any.whl

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.
tox_envfile/__init__.py CHANGED
@@ -1 +1 @@
1
- from tox_envfile.main import tox_configure
1
+ from tox_envfile.plugin import tox_configure
@@ -0,0 +1,206 @@
1
+ Metadata-Version: 2.1
2
+ Name: tox-envfile
3
+ Version: 0.0.6
4
+ Summary: Load env files in your tox envs.
5
+ Home-page: https://github.com/hypothesis/tox-envfile
6
+ Project-URL: Bug Tracker, https://github.com/hypothesis/tox-envfile/issues
7
+ Project-URL: Changelog, https://github.com/hypothesis/tox-envfile/releases
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: BSD License
10
+ Classifier: Intended Audience :: Developers
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: python-dotenv
15
+
16
+ <a href="https://github.com/hypothesis/tox-envfile/actions/workflows/ci.yml?query=branch%3Amain"><img src="https://img.shields.io/github/actions/workflow/status/hypothesis/tox-envfile/ci.yml?branch=main"></a>
17
+ <a href="https://pypi.org/project/tox-envfile"><img src="https://img.shields.io/pypi/v/tox-envfile"></a>
18
+ <a><img src="https://img.shields.io/badge/python-3.12 | 3.11 | 3.10 | 3.9 | 3.8-success"></a>
19
+ <a href="https://github.com/hypothesis/tox-envfile/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-BSD--2--Clause-success"></a>
20
+ <a href="https://github.com/hypothesis/cookiecutters/tree/main/pypackage"><img src="https://img.shields.io/badge/cookiecutter-pypackage-success"></a>
21
+ <a href="https://black.readthedocs.io/en/stable/"><img src="https://img.shields.io/badge/code%20style-black-000000"></a>
22
+
23
+ # tox-envfile
24
+
25
+ Load env files in your tox envs.
26
+
27
+ tox-envfile reads environment variables from a file named `.devdata.env` in the
28
+ same directory as your `tox.ini` file and adds them to the environment that tox
29
+ runs your commands in.
30
+
31
+ This is a pretty dumb plugin for now: all of the environment variables in
32
+ `.devdata.env` will be loaded into the environment for every tox env that you
33
+ run, unconditionally. Any existing envvars with conflicting names will be
34
+ overwritten. Only a single environment file is supported and it must be named
35
+ `.devdata.env`.
36
+
37
+ env File Format
38
+ ---------------
39
+
40
+ [python-dotenv](https://saurabh-kumar.com/python-dotenv/) is used for the env file parsing.
41
+
42
+ The `.devdata.env` file should be an env file with contents that look like
43
+ this:
44
+
45
+ ```shell
46
+ # a comment that will be ignored.
47
+ REDIS_ADDRESS=localhost:6379
48
+ MEANING_OF_LIFE=42
49
+ MULTILINE_VAR="hello\nworld"
50
+ ```
51
+
52
+ Or like this:
53
+
54
+ ```shell
55
+ export S3_BUCKET=YOURS3BUCKET
56
+ export SECRET_KEY=YOURSECRETKEYGOESHERE
57
+ ```
58
+
59
+ POSIX variable expansion works, using variables from the environment or from
60
+ earlier lines in the env file:
61
+
62
+ ```shell
63
+ CONFIG_PATH=${HOME}/.config/foo
64
+ DOMAIN=example.org
65
+ EMAIL=admin@${DOMAIN}
66
+ ```
67
+
68
+ ## Setting up Your tox-envfile Development Environment
69
+
70
+ First you'll need to install:
71
+
72
+ * [Git](https://git-scm.com/).
73
+ On Ubuntu: `sudo apt install git`, on macOS: `brew install git`.
74
+ * [GNU Make](https://www.gnu.org/software/make/).
75
+ This is probably already installed, run `make --version` to check.
76
+ * [pyenv](https://github.com/pyenv/pyenv).
77
+ Follow the instructions in pyenv's README to install it.
78
+ The **Homebrew** method works best on macOS.
79
+ The **Basic GitHub Checkout** method works best on Ubuntu.
80
+ You _don't_ need to set up pyenv's shell integration ("shims"), you can
81
+ [use pyenv without shims](https://github.com/pyenv/pyenv#using-pyenv-without-shims).
82
+
83
+ Then to set up your development environment:
84
+
85
+ ```terminal
86
+ git clone https://github.com/hypothesis/tox-envfile.git
87
+ cd tox-envfile
88
+ make help
89
+ ```
90
+
91
+ ## Releasing a New Version of the Project
92
+
93
+ 1. First, to get PyPI publishing working you need to go to:
94
+ <https://github.com/organizations/hypothesis/settings/secrets/actions/PYPI_TOKEN>
95
+ and add tox-envfile to the `PYPI_TOKEN` secret's selected
96
+ repositories.
97
+
98
+ 2. Now that the tox-envfile project has access to the `PYPI_TOKEN` secret
99
+ you can release a new version by just [creating a new GitHub release](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository).
100
+ Publishing a new GitHub release will automatically trigger
101
+ [a GitHub Actions workflow](.github/workflows/pypi.yml)
102
+ that will build the new version of your Python package and upload it to
103
+ <https://pypi.org/project/tox-envfile>.
104
+
105
+ ## Changing the Project's Python Versions
106
+
107
+ To change what versions of Python the project uses:
108
+
109
+ 1. Change the Python versions in the
110
+ [cookiecutter.json](.cookiecutter/cookiecutter.json) file. For example:
111
+
112
+ ```json
113
+ "python_versions": "3.10.4, 3.9.12",
114
+ ```
115
+
116
+ 2. Re-run the cookiecutter template:
117
+
118
+ ```terminal
119
+ make template
120
+ ```
121
+
122
+ 3. Commit everything to git and send a pull request
123
+
124
+ ## Changing the Project's Python Dependencies
125
+
126
+ To change the production dependencies in the `setup.cfg` file:
127
+
128
+ 1. Change the dependencies in the [`.cookiecutter/includes/setuptools/install_requires`](.cookiecutter/includes/setuptools/install_requires) file.
129
+ If this file doesn't exist yet create it and add some dependencies to it.
130
+ For example:
131
+
132
+ ```
133
+ pyramid
134
+ sqlalchemy
135
+ celery
136
+ ```
137
+
138
+ 2. Re-run the cookiecutter template:
139
+
140
+ ```terminal
141
+ make template
142
+ ```
143
+
144
+ 3. Commit everything to git and send a pull request
145
+
146
+ To change the project's formatting, linting and test dependencies:
147
+
148
+ 1. Change the dependencies in the [`.cookiecutter/includes/tox/deps`](.cookiecutter/includes/tox/deps) file.
149
+ If this file doesn't exist yet create it and add some dependencies to it.
150
+ Use tox's [factor-conditional settings](https://tox.wiki/en/latest/config.html#factors-and-factor-conditional-settings)
151
+ to limit which environment(s) each dependency is used in.
152
+ For example:
153
+
154
+ ```
155
+ lint: flake8,
156
+ format: autopep8,
157
+ lint,tests: pytest-faker,
158
+ ```
159
+
160
+ 2. Re-run the cookiecutter template:
161
+
162
+ ```terminal
163
+ make template
164
+ ```
165
+
166
+ 3. Commit everything to git and send a pull request
167
+
168
+ Testing Manually
169
+ ----------------
170
+
171
+ To test it manually you can install your local development copy of
172
+ `tox-envfile` into the local development environment of another tox-using
173
+ project such as
174
+ [cookiecutter-pypackage-test](https://github.com/hypothesis/cookiecutter-pypackage-test):
175
+
176
+ 1. Install a local development copy of `cookiecutter-pypackage-test` in a temporary directory:
177
+
178
+ ```terminal
179
+ git clone https://github.com/hypothesis/cookiecutter-pypackage-test.git /tmp/cookiecutter-pypackage-test
180
+ ```
181
+
182
+ 2. Run `cookiecutter-pypackage-test`'s `make sure` command to make sure that
183
+ everything is working and to trigger tox to create its `.tox/.tox`
184
+ venv:
185
+
186
+ ```terminal
187
+ make --directory "/tmp/cookiecutter-pypackage-test" sure
188
+ ```
189
+
190
+ 3. Uninstall the production copy of `tox-envfile` from `cookiecutter-pypackage-test`'s `.tox/.tox` venv:
191
+
192
+ ```terminal
193
+ /tmp/cookiecutter-pypackage-test/.tox/.tox/bin/pip uninstall tox-envfile
194
+ ```
195
+
196
+ 4. Install your local development copy of `tox-envfile` into `cookiecutter-pypackage-test`'s `.tox/.tox` venv:
197
+
198
+ ```terminal
199
+ /tmp/cookiecutter-pypackage-test/.tox/.tox/bin/pip install -e .
200
+ ```
201
+
202
+ 5. Now `cookiecutter-pypackage-test` commands will use your local development copy of `tox-envfile`:
203
+
204
+ ```terminal
205
+ make --directory "/tmp/cookiecutter-pypackage-test" test
206
+ ```
@@ -0,0 +1,8 @@
1
+ tox_envfile/__init__.py,sha256=QYYaJKPtsRn1iDs3euGfMdC2Z93-w-uFhYxzyg0k6Rs,45
2
+ tox_envfile/plugin.py,sha256=G5R2fu1KOWF5NJ0SHGdq4cIyntW-yX3XSOH2okrj4Ck,344
3
+ tox_envfile-0.0.6.dist-info/LICENSE,sha256=dBzUThlLQ34NAPMuoq9vyDNVRMrQJX0DHJqa5S4qc7M,1320
4
+ tox_envfile-0.0.6.dist-info/METADATA,sha256=V-CAY4jRTRiCjMaoVZchXF1wCHBsCmbjcqkCdiZs130,7086
5
+ tox_envfile-0.0.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
+ tox_envfile-0.0.6.dist-info/entry_points.txt,sha256=GEYCdOwC6X70XpS5Gt71rnmuGgMTje8QiBLWi_trr4Y,32
7
+ tox_envfile-0.0.6.dist-info/top_level.txt,sha256=Dv2s9K5Qd8CyUm7ZPvBsz_aoTe2QPAglDimil5l9VFk,12
8
+ tox_envfile-0.0.6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.37.1)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,71 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: tox-envfile
3
- Version: 0.0.4
4
- Summary: Load env files in your tox envs.
5
- Home-page: https://github.com/hypothesis/tox-envfile
6
- Project-URL: Bug Tracker, https://github.com/hypothesis/tox-envfile/issues
7
- Project-URL: Changelog, https://github.com/hypothesis/tox-envfile/releases
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: BSD License
10
- Classifier: Intended Audience :: Developers
11
- Requires-Python: >=3.8
12
- Description-Content-Type: text/markdown
13
- License-File: LICENSE
14
- Requires-Dist: python-dotenv
15
-
16
- <a href="https://github.com/hypothesis/tox-envfile/actions/workflows/ci.yml?query=branch%3Amain"><img src="https://img.shields.io/github/workflow/status/hypothesis/tox-envfile/CI/main"></a>
17
- <a href="https://pypi.org/project/tox-envfile"><img src="https://img.shields.io/pypi/v/tox-envfile"></a>
18
- <a><img src="https://img.shields.io/badge/python-3.10 | 3.9 | 3.8-success"></a>
19
- <a href="https://github.com/hypothesis/tox-envfile/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-BSD--2--Clause-success"></a>
20
- <a href="https://github.com/hypothesis/cookiecutters/tree/main/pypackage"><img src="https://img.shields.io/badge/cookiecutter-pypackage-success"></a>
21
- <a href="https://black.readthedocs.io/en/stable/"><img src="https://img.shields.io/badge/code%20style-black-000000"></a>
22
-
23
- # tox-envfile
24
-
25
- Load env files in your tox envs.
26
-
27
- For installation instructions see [INSTALL.md](https://github.com/hypothesis/tox-envfile/blob/main/INSTALL.md).
28
-
29
- For how to set up a tox-envfile development environment see
30
- [HACKING.md](https://github.com/hypothesis/tox-envfile/blob/main/HACKING.md).
31
-
32
- tox-envfile reads environment variables from a file named `.devdata.env` in the
33
- same directory as your `tox.ini` file and adds them to the environment that tox
34
- runs your commands in.
35
-
36
- This is a pretty dumb plugin for now: all of the environment variables in
37
- `.devdata.env` will be loaded into the environment for every tox env that you
38
- run, unconditionally. Any existing envvars with conflicting names will be
39
- overwritten. Only a single environment file is supported and it must be named
40
- `.devdata.env`.
41
-
42
- env File Format
43
- ---------------
44
-
45
- [python-dotenv](https://saurabh-kumar.com/python-dotenv/) is used for the env file parsing.
46
-
47
- The `.devdata.env` file should be an env file with contents that look like
48
- this:
49
-
50
- ```shell
51
- # a comment that will be ignored.
52
- REDIS_ADDRESS=localhost:6379
53
- MEANING_OF_LIFE=42
54
- MULTILINE_VAR="hello\nworld"
55
- ```
56
-
57
- Or like this:
58
-
59
- ```shell
60
- export S3_BUCKET=YOURS3BUCKET
61
- export SECRET_KEY=YOURSECRETKEYGOESHERE
62
- ```
63
-
64
- POSIX variable expansion works, using variables from the environment or from
65
- earlier lines in the env file:
66
-
67
- ```shell
68
- CONFIG_PATH=${HOME}/.config/foo
69
- DOMAIN=example.org
70
- EMAIL=admin@${DOMAIN}
71
- ```
@@ -1,8 +0,0 @@
1
- tox_envfile/__init__.py,sha256=Rfupoi4NArJRSY9ydXUb2Wq9RzDjU83OVnTUIMoz1RQ,43
2
- tox_envfile/main.py,sha256=G5R2fu1KOWF5NJ0SHGdq4cIyntW-yX3XSOH2okrj4Ck,344
3
- tox_envfile-0.0.4.dist-info/LICENSE,sha256=dBzUThlLQ34NAPMuoq9vyDNVRMrQJX0DHJqa5S4qc7M,1320
4
- tox_envfile-0.0.4.dist-info/METADATA,sha256=K3IPnWs8Z-qQQBHosx-aiFGx0E8glqZfqlUpRmPMlAQ,2784
5
- tox_envfile-0.0.4.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
6
- tox_envfile-0.0.4.dist-info/entry_points.txt,sha256=GEYCdOwC6X70XpS5Gt71rnmuGgMTje8QiBLWi_trr4Y,32
7
- tox_envfile-0.0.4.dist-info/top_level.txt,sha256=Dv2s9K5Qd8CyUm7ZPvBsz_aoTe2QPAglDimil5l9VFk,12
8
- tox_envfile-0.0.4.dist-info/RECORD,,
File without changes