Skip to content

Commit 078c77c

Browse files
committed
📝 Switch to .venv directory
1 parent deda15c commit 078c77c

File tree

14 files changed

+66
-67
lines changed

14 files changed

+66
-67
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Installation
5656
.. code-block:: ps1con
5757
5858
C:> py -m venv .venv
59-
C:> .\.venv\Scripts\Activate
59+
C:> .\.venv\Scripts\activate.bat
6060
C:> python -m pip install --upgrade pip
6161
C:> python -m pip install -e ".[dev]"
6262

docs/document/start.rst

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,31 @@ Installation and start
1010

1111
.. code-block:: console
1212
13-
$ python3 -m venv venv
13+
$ python3 -m venv .venv
1414
1515
.. tab:: Windows
1616

1717
.. code-block:: ps1con
1818
19-
C:> python -m venv venv
19+
C:> python -m venv .venv
2020
2121
#. Switch to the virtual environment and install Sphinx there:
2222

2323
.. tab:: Linux/macOS
2424

2525
.. code-block:: console
2626
27-
$ cd !$
28-
cd venv
29-
$ bin/python -m pip install sphinx
27+
$ . .venv/bin/activate
28+
$ (.venv) python -m pip install sphinx
3029
Creating a virtualenv for this project…
3130
3231
3332
.. tab:: Windows
3433

3534
.. code-block:: ps1con
3635
37-
C:> cd venv
38-
C:> bin/python -m pip install sphinx
36+
C:> .venv\Scripts\activate.bat
37+
C:> (.venv) python -m pip install sphinx
3938
Creating a virtualenv for this project…
4039
4140
@@ -45,7 +44,7 @@ Installation and start
4544

4645
.. code-block:: console
4746
48-
$ bin/sphinx-quickstart docs
47+
$ sphinx-quickstart docs
4948
Selected root path: docs
5049
> Separate source and build directories (y/n) [n]:
5150
> Name prefix for templates and static dir [_]:
@@ -77,7 +76,7 @@ Installation and start
7776

7877
.. code-block:: ps1con
7978
80-
C:> Scripts\sphinx-quickstart docs
79+
C:> sphinx-quickstart docs
8180
Selected root path: docs
8281
> Separate source and build directories (y/n) [n]:
8382
> Name prefix for templates and static dir [_]:
@@ -110,7 +109,7 @@ Sphinx layout
110109

111110
::
112111

113-
venv
112+
.
114113
└── docs
115114
├── Makefile
116115
├── _static
@@ -132,13 +131,13 @@ You can now generate the documentation, for example with:
132131

133132
.. code-block:: console
134133
135-
$ bin/sphinx-build -ab html docs/ docs/_build
134+
$ sphinx-build -ab html docs/ docs/_build
136135
137136
.. tab:: Windows
138137

139138
.. code-block:: ps1con
140139
141-
C:> Scripts\sphinx-build -ab html docs\ docs\_build
140+
C:> sphinx-build -ab html docs\ docs\_build
142141
143142
``a``
144143
regenerates all pages of the documentation.

docs/document/test.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ mode for this, which can be called up with the ``-n`` option, for example with:
1717

1818
.. code-block:: console
1919
20-
$ bin/python -m sphinx -nb html docs/ docs/_build/
20+
$ python -m sphinx -nb html docs/ docs/_build/
2121
2222
.. tab:: Windows
2323

2424
.. code-block:: ps1con
2525
26-
C:> Scripts\python -m sphinx -nb html docs\ docs\_build\
26+
C:> python -m sphinx -nb html docs\ docs\_build\
2727
2828
.. _link-checks:
2929

@@ -38,21 +38,21 @@ which you can call up with:
3838

3939
.. code-block:: console
4040
41-
$ bin/python -m sphinx -b linkcheck docs/ docs/_build/
41+
$ python -m sphinx -b linkcheck docs/ docs/_build/
4242
4343
.. tab:: Windows
4444

4545
.. code-block:: ps1con
4646
47-
C:> Scripts\python -m sphinx -b linkcheck docs\ docs\_build\
47+
C:> python -m sphinx -b linkcheck docs\ docs\_build\
4848
4949
The output can then look like this, for example:
5050

5151
.. tab:: Linux/macOS
5252

5353
.. code-block:: console
5454
55-
$ bin/python -m sphinx -b linkcheck docs/ docs/_build/
55+
$ python -m sphinx -b linkcheck docs/ docs/_build/
5656
Running Sphinx v3.5.2
5757
loading translations [de]... done
5858
@@ -71,7 +71,7 @@ The output can then look like this, for example:
7171

7272
.. code-block:: ps1con
7373
74-
C:> Scripts\python -m sphinx -b linkcheck docs\ docs\_build\
74+
C:> python -m sphinx -b linkcheck docs\ docs\_build\
7575
Running Sphinx v3.5.2
7676
loading translations [de]... done
7777

docs/document/uml/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ Installation
2525

2626
.. code-block:: console
2727
28-
$ bin/python -m pip install sphinxcontrib-plantuml
28+
$ python -m pip install sphinxcontrib-plantuml
2929
3030
.. tab:: Windows
3131

3232
.. code-block:: ps1con
3333
34-
C:> Scripts\python -m pip install sphinxcontrib-plantuml
34+
C:> python -m pip install sphinxcontrib-plantuml
3535
3636
#. We then configure the ``conf.py``:
3737

docs/libs/distribution.rst

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -297,20 +297,20 @@ You can install these optional dependencies, for example with:
297297
.. code-block:: console
298298
299299
$ cd /PATH/TO/YOUR/DISTRIBUTION_PACKAGE
300-
$ python3 -m venv .
301-
$ . bin/activate
300+
$ python3 -m venv .venv
301+
$ . .venv/bin/activate
302302
$ python -m pip install --upgrade pip
303-
$ python -m pip install -e '.[dev]'
303+
$ python -m pip install -e ".[dev]"
304304
305305
.. tab:: Windows
306306

307307
.. code-block:: ps1
308308
309309
> cd C:\PATH\TO\YOUR\DISTRIBUTION_PACKAGE
310-
> python3 -m venv .
311-
> Scripts\activate.bat
310+
> python3 -m venv .venv
311+
> .venv\Scripts\activate.bat
312312
> python -m pip install --upgrade pip
313-
> python -m pip install -e '.[dev]'
313+
> python -m pip install -e ".[dev]"
314314
315315
:file:`src` package
316316
-------------------
@@ -534,29 +534,29 @@ Testing
534534
535535
$ mkdir test_env
536536
$ cd test_env
537-
$ python3 -m venv .
538-
$ source bin/activate
539-
$ python -m pip install dist/dataprep-0.1.0-py3-none-any.whl
540-
Processing ./dist/dataprep-0.1.0-py3-none-any.whl
541-
Collecting pandas
542-
Using cached pandas-1.3.4-cp39-cp39-macosx_10_9_x86_64.whl (11.6 MB)
537+
$ python3 -m venv .venv
538+
$ . .venv/bin/activate
539+
$ python -m pip install dist/dataprep-0.1.0-cp313-cp313-macosx_13_0_arm64.whl
540+
Processing ./dist/dataprep-0.1.0-cp313-cp313-macosx_13_0_arm64.whl
541+
Collecting Cython (from dataprep==0.1.0)
542+
Using cached Cython-3.0.11-py2.py3-none-any.whl.metadata (3.2 kB)
543543
544-
Successfully installed dataprep-0.1.0 numpy-1.21.4 pandas-1.3.4 python-dateutil-2.8.2 pytz-2021.3 six-1.16.0
544+
Successfully installed Cython-3.0.11 dataprep-0.1.0 numpy-2.1.2 pandas-2.2.3 python-dateutil-2.9.0.post0 pytz-2024.2 six-1.16.0 tzdata-2024.2
545545
546546
.. tab:: Windows
547547

548548
.. code-block:: console
549549
550550
> mkdir test_env
551551
> cd test_env
552-
> python -m venv .
553-
> Scripts\activate.bat
554-
> python -m pip install dist/dataprep-0.1.0-py3-none-any.whl
555-
Processing ./dist/dataprep-0.1.0-py3-none-any.whl
556-
Collecting pandas
557-
Using cached pandas-1.3.4-cp39-cp39-macosx_10_9_x86_64.whl (11.6 MB)
552+
> python -m venv .venv
553+
> .venv\Scripts\activate.bat
554+
> python -m pip install dist/dataprep-0.1.0-cp313-cp313-win_amd64.whl
555+
Processing ./dist/dataprep-0.1.0-cp313-cp313-win_amd64.whl
556+
Collecting Cython (from dataprep==0.1.0)
557+
Using cached Cython-3.0.11-cp313-cp313-win_amd64.whl.metadata (3.2 kB)
558558
559-
Successfully installed dataprep-0.1.0 numpy-1.21.4 pandas-1.3.4 python-dateutil-2.8.2 pytz-2021.3 six-1.16.0
559+
Successfully installed Cython-3.0.11 dataprep-0.1.0 numpy-2.1.2 pandas-2.2.3 python-dateutil-2.9.0.post0 pytz-2024.2 six-1.16.0 tzdata-2024.2
560560
561561
You can then check the :term:`Wheel` file with:
562562

@@ -565,8 +565,8 @@ You can then check the :term:`Wheel` file with:
565565
$ mkdir test_env
566566
$ cd !$
567567
cd test_env
568-
$ python3 -m venv .
569-
$ source bin/activate
568+
$ python3 -m venv .venv
569+
$ . .venv/bin/activate
570570
$ python -m pip install dist/dataprep-0.1.0-py3-none-any.whl
571571
Processing ./dist/dataprep-0.1.0-py3-none-any.whl
572572
Collecting pandas

docs/libs/templating/features.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ CookieCutter features
2424

2525
.. code-block:: console
2626
27-
$ bin/python
27+
$ python
2828
>>> from cookiecutter.main import cookiecutter
2929
>>> cookiecutter('.https://github.com/veit/cookiecutter-namespace-template.git')
3030
full_name [Veit Schiele]:

docs/libs/upload-install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ a new :term:`virtual environment` and install your package on *Test PyPI*:
100100
.. code-block:: console
101101
102102
$ python3 -m venv test_env
103-
$ source test_env/bin/activate
103+
$ . test_env/bin/activate
104104
$ pip install -i https://test.pypi.org/simple/ minimal_example
105105
106106
.. note::

docs/test/coverage.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ You can create a report for the test coverage with Coverage.py.
3232

3333
.. code-block:: console
3434
35-
$ bin/python -m pip install coverage pytest-cov
35+
$ python -m pip install coverage pytest-cov
3636
3737
.. tab:: Windows
3838

3939
.. code-block:: ps1con
4040
41-
C:> Scripts\python -m pip install coverage pytest-cov
41+
C:> python -m pip install coverage pytest-cov
4242
4343
.. note::
4444
If you want to determine the test coverage for Python 2 and Python<3.6, you
@@ -54,8 +54,8 @@ The normal pytest output is followed by the coverage report, as shown here:
5454
.. code-block:: pytest
5555
5656
$ cd /PATH/TO/items
57-
$ python3 -m venv .
58-
$ . bin/activate
57+
$ python3 -m venv .venv
58+
$ . .venv/bin/activate
5959
$ python -m pip install ".[dev]"
6060
$ pytest --cov=items
6161
============================= test session starts ==============================
@@ -171,8 +171,8 @@ by executing coverage html after a previous coverage run:
171171
.. code-block:: console
172172
173173
$ cd /PATH/TO/items
174-
$ python3 -m venv .
175-
$ . bin/activate
174+
$ python3 -m venv .venv
175+
$ . .venv/bin/activate
176176
$ python -m pip install ".[dev]"
177177
$ pytest --cov=items --cov-report=html
178178

docs/test/doctest.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ tests specified in a docstring are fulfilled.
6464

6565
.. code-block:: console
6666
67-
C:> Scripts\python -m doctest arithmetic.py -v
67+
C:> python -m doctest arithmetic.py -v
6868
Trying:
6969
add(7,6)
7070
Expecting:

docs/test/hypothesis.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@ fail and find bugs with little effort.
1212

1313
.. code-block:: console
1414
15-
$ bin/python -m pip install hypothesis
15+
$ python -m pip install hypothesis
1616
1717
.. tab:: Windows
1818

1919
.. code-block:: ps1con
2020
21-
C:> Scripts\python -m pip install hypothesis
21+
C:> python -m pip install hypothesis
2222
2323
Alternatively, Hypothesis can also be installed with extensions, for example:
2424

2525
.. tab:: Linux/macOS
2626

2727
.. code-block:: console
2828
29-
$ bin/python -m pip install hypothesis[numpy,pandas]
29+
$ python -m pip install hypothesis[numpy,pandas]
3030
3131
.. tab:: Windows
3232

3333
.. code-block:: ps1con
3434
35-
C:> Scripts\python -m pip install hypothesis[numpy,pandas]
35+
C:> python -m pip install hypothesis[numpy,pandas]
3636
3737
#. Write a test:
3838

@@ -56,7 +56,7 @@ fail and find bugs with little effort.
5656

5757
.. code-block:: console
5858
59-
$ bin/python -m pytest test_hypothesis.py
59+
$ python -m pytest test_hypothesis.py
6060
============================= test session starts ==============================
6161
platform darwin -- Python 3.13.0, pytest-8.3.3, pluggy-1.5.0
6262
rootdir: /Users/veit/cusy/trn/python-basics/docs/test
@@ -96,7 +96,7 @@ fail and find bugs with little effort.
9696

9797
.. code-block:: ps1con
9898
99-
C:> Scripts\python -m pytest test_hypothesis.py
99+
C:> python -m pytest test_hypothesis.py
100100
============================= test session starts ==============================
101101
platform win32 -- Python 3.13.0, pytest-8.3.3, pluggy-1.5.0
102102
rootdir: C:\Users\veit\python-basics\docs\test

0 commit comments

Comments
 (0)