Skip to content

Commit

Permalink
Use python instead of python3
Browse files Browse the repository at this point in the history
  • Loading branch information
haukex committed Jan 9, 2025
1 parent c9ef4f0 commit a501d56
Show file tree
Hide file tree
Showing 38 changed files with 54 additions and 55 deletions.
27 changes: 13 additions & 14 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
// https://aka.ms/devcontainer.json
{
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": false,
"installOhMyZsh": false,
"installOhMyZshConfig": false,
"username": "none",
"nonFreePackages": true
},
{ // https://aka.ms/devcontainer.json
// https://github.com/devcontainers/images/tree/main/src/python
"image": "mcr.microsoft.com/devcontainers/python:3.13-bookworm",
"features": {
/* `features/common-utils` is already in the python image; it's missing non-free
* packages, but that's only manpages-posix and manpages-posix-dev. */
// "ghcr.io/devcontainers/features/node:1": {},
// "ghcr.io/devcontainers/features/docker-in-docker:2": {},
// "ghcr.io/haukex/devcontainer-features/perl:1": {},
"ghcr.io/lukewiwa/features/shellcheck:0": {},
"ghcr.io/guiyomh/features/vim:0": {}
},
"postCreateCommand": ".devcontainer/initialize.sh"
}
},
"postCreateCommand": ".devcontainer/initialize.sh"
}
/* vim: set filetype=javascript ts=4 sw=4 expandtab : */
6 changes: 3 additions & 3 deletions .devcontainer/initialize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
set -euxo pipefail
cd "$( dirname "${BASH_SOURCE[0]}" )"/..

python3 -m venv .venv
python -m venv .venv
# shellcheck source=/dev/null
source .venv/bin/activate
python3 -m pip install --upgrade pip wheel
pip install -r requirements.txt -r requirements-dev.txt
python -m pip install --upgrade pip wheel
python -m pip install -r requirements.txt -r requirements-dev.txt
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
requirements-dev.txt
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip wheel
pip install -r requirements.txt -r requirements-dev.txt
python -m pip install --upgrade pip wheel
python -m pip install -r requirements.txt -r requirements-dev.txt
- name: Run tests
run: ./prove.sh
2 changes: 1 addition & 1 deletion checksum.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""File checksumming tool.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion checksum_gui.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Graphical frontend for file checksumming tool.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion datatypes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Data type library with type checks and type inferral.
These types are based on and are compatible with Postgres data types, but are
Expand Down
2 changes: 1 addition & 1 deletion deltaparse.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Parser for "time delta" strings.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion hashedfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!python3
#!python
"""A library for representing files together with their hashes.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion jsonvalidate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Utility functions to load and validate JSON Schemas.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion loggerdata/importdefs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Common definitions used in the importing of logger data.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion loggerdata/importer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!python3
#!python
"""General-purpose logger data importer functions.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion loggerdata/metadata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Metadata for representing datalogger data tables.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion loggerdata/qualitycheck.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!python3
#!python
"""Basic Data Quality checking functions
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion loggerdata/toa5/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!python3
#!python
"""Functions for handling TOA5 files.
.. deprecated:: 2024-10-18
Expand Down
2 changes: 1 addition & 1 deletion loggerdata/toa5/dataimport.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Functions for importing TOA5 data files.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion loggerdata/toa5/pandas.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Functions for reading TOA5 files into Pandas data frames.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion lsb_obo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!python3
#!python
"""Test whether two decimal numbers are off-by-one on their least significant digit.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion prove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1
if [ "$OSTYPE" == "msys" ] # e.g. Git bash on Windows
then
PYTHONWARNDEFAULTENCODING=1 python3 -m unittest "$@"
PYTHONWARNDEFAULTENCODING=1 python -m unittest "$@"
else
PYTHONWARNDEFAULTENCODING=1 coverage run --branch -m unittest "$@"
if coverage report --skip-covered --show-missing --fail-under=100
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# python3 -m pip install --upgrade pip wheel
# pip3 install --upgrade --upgrade-strategy=eager -r requirements.txt
# python -m pip install --upgrade pip wheel
# python -m pip install --upgrade --upgrade-strategy=eager -r requirements.txt
more-itertools >= 9.1.0
igbpyutils >= 0.3.2
Unidecode
Expand Down
2 changes: 1 addition & 1 deletion safe_filenames_check.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Utility to check for Windows-safe filenames.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion sqlite3helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!python3
#!python
"""Helpers for SQLite3 databases used as logger data storage.
The functions in this module provide helpers for our use case of importing
Expand Down
2 changes: 1 addition & 1 deletion tests/test_checksum.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for file checksumming tool.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_datatypes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for datatypes library.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_deltaparse.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for deltaparse.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_hashedfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for hashedfile library.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_jsonvalidate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for jsonvalidate.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_logger_importdefs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for loggerdata.importdefs
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_logger_importer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for loggerdata.importer
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_logger_metadata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for loggerdata.metadata.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_logger_qualitycheck.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for loggerdata.qualitycheck.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_lsb_obo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for lsb_obo.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_safe_filenames_check.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for uniutils.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sqlite3helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for Sqlite3 Helper.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_toa5.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for loggerdata.toa5.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_toa5_dataimport.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for loggerdata.toa5.dataimport
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_toa5_pandas.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for loggerdata.toa5.pandas
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion tests/test_uniutils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Tests for uniutils.
Author, Copyright, and License
Expand Down
2 changes: 1 addition & 1 deletion uniutils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python
"""Various Unicode related utility functions.
Author, Copyright, and License
Expand Down

0 comments on commit a501d56

Please sign in to comment.