From aa376298eaf1e18e79ec04bddac0b12e8285aad6 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 8 Oct 2024 13:22:03 +0200 Subject: [PATCH] Fix pre-commit (#114) * Fix pre-commit * Fix pre-commit --- .github/workflows/lint_python.yml | 3 ++- .github/workflows/pre-commit.yml | 3 +++ .github/workflows/sphinx.yml | 5 +++-- .github/workflows/trending_python.yml | 3 ++- README.md | 5 ++++- docs/README.md | 5 ----- docs/index.md | 7 ------- index.md | 2 +- pyproject.toml | 4 ++-- MonthView.py => src/MonthView.py | 0 appex_dump.py => src/appex_dump.py | 0 appex_local_copy.py => src/appex_local_copy.py | 0 attitude_to_multipeer.py => src/attitude_to_multipeer.py | 0 backup_editor_file.py => src/backup_editor_file.py | 0 battery_info.py => src/battery_info.py | 0 birthdays.py => src/birthdays.py | 0 bit_filpper.py => src/bit_filpper.py | 0 born_on_a_friday.py => src/born_on_a_friday.py | 0 cd_ls_pwd.py => src/cd_ls_pwd.py | 0 daze_left.py => src/daze_left.py | 0 dropbox_change_watcher.py => src/dropbox_change_watcher.py | 0 elapsed_time.py => src/elapsed_time.py | 0 fake_format.py => src/fake_format.py | 0 files_and_folders.py => src/files_and_folders.py | 0 .../form_dialog_from_fields_dict.py | 0 full_screen_view.py => src/full_screen_view.py | 0 image_file.py => src/image_file.py | 0 json_readable.py => src/json_readable.py | 0 not_implemented.py => src/not_implemented.py | 0 omz_env.py => src/omz_env.py | 0 platform_info.py => src/platform_info.py | 0 pythonista_docs.py => src/pythonista_docs.py | 0 pythonista_version.py => src/pythonista_version.py | 0 pyui_from_clipboard.py => src/pyui_from_clipboard.py | 0 pyui_print.py => src/pyui_print.py | 0 pyui_to_clipboard.py => src/pyui_to_clipboard.py | 0 pyui_variable.py => src/pyui_variable.py | 0 .../read_zipfile_from_github.py | 0 scroll_horizontally.py => src/scroll_horizontally.py | 0 set_theory.py => src/set_theory.py | 0 .../sqlite_get_list_from_table.py | 0 sqlite_table_layout.py => src/sqlite_table_layout.py | 0 sudoku_print.py => src/sudoku_print.py | 0 sudoku_revisited.py => src/sudoku_revisited.py | 0 tarball_from_dropbox.py => src/tarball_from_dropbox.py | 0 tarball_to_dropbox.py => src/tarball_to_dropbox.py | 0 timestamped_filename.py => src/timestamped_filename.py | 0 trending_python.py => src/trending_python.py | 0 trending_python_tester.py => src/trending_python_tester.py | 0 twitter_hack.py => src/twitter_hack.py | 0 walking_the_path.py => src/walking_the_path.py | 0 weather_where_you_are.py => src/weather_where_you_are.py | 0 world_bank_data.py => src/world_bank_data.py | 0 zap_carriage_returns.py => src/zap_carriage_returns.py | 0 54 files changed, 17 insertions(+), 20 deletions(-) delete mode 100644 docs/README.md delete mode 100644 docs/index.md rename MonthView.py => src/MonthView.py (100%) rename appex_dump.py => src/appex_dump.py (100%) rename appex_local_copy.py => src/appex_local_copy.py (100%) rename attitude_to_multipeer.py => src/attitude_to_multipeer.py (100%) rename backup_editor_file.py => src/backup_editor_file.py (100%) rename battery_info.py => src/battery_info.py (100%) rename birthdays.py => src/birthdays.py (100%) rename bit_filpper.py => src/bit_filpper.py (100%) rename born_on_a_friday.py => src/born_on_a_friday.py (100%) rename cd_ls_pwd.py => src/cd_ls_pwd.py (100%) rename daze_left.py => src/daze_left.py (100%) rename dropbox_change_watcher.py => src/dropbox_change_watcher.py (100%) rename elapsed_time.py => src/elapsed_time.py (100%) rename fake_format.py => src/fake_format.py (100%) rename files_and_folders.py => src/files_and_folders.py (100%) rename form_dialog_from_fields_dict.py => src/form_dialog_from_fields_dict.py (100%) rename full_screen_view.py => src/full_screen_view.py (100%) rename image_file.py => src/image_file.py (100%) rename json_readable.py => src/json_readable.py (100%) rename not_implemented.py => src/not_implemented.py (100%) rename omz_env.py => src/omz_env.py (100%) rename platform_info.py => src/platform_info.py (100%) rename pythonista_docs.py => src/pythonista_docs.py (100%) rename pythonista_version.py => src/pythonista_version.py (100%) rename pyui_from_clipboard.py => src/pyui_from_clipboard.py (100%) rename pyui_print.py => src/pyui_print.py (100%) rename pyui_to_clipboard.py => src/pyui_to_clipboard.py (100%) rename pyui_variable.py => src/pyui_variable.py (100%) rename read_zipfile_from_github.py => src/read_zipfile_from_github.py (100%) rename scroll_horizontally.py => src/scroll_horizontally.py (100%) rename set_theory.py => src/set_theory.py (100%) rename sqlite_get_list_from_table.py => src/sqlite_get_list_from_table.py (100%) rename sqlite_table_layout.py => src/sqlite_table_layout.py (100%) rename sudoku_print.py => src/sudoku_print.py (100%) rename sudoku_revisited.py => src/sudoku_revisited.py (100%) rename tarball_from_dropbox.py => src/tarball_from_dropbox.py (100%) rename tarball_to_dropbox.py => src/tarball_to_dropbox.py (100%) rename timestamped_filename.py => src/timestamped_filename.py (100%) rename trending_python.py => src/trending_python.py (100%) rename trending_python_tester.py => src/trending_python_tester.py (100%) rename twitter_hack.py => src/twitter_hack.py (100%) rename walking_the_path.py => src/walking_the_path.py (100%) rename weather_where_you_are.py => src/weather_where_you_are.py (100%) rename world_bank_data.py => src/world_bank_data.py (100%) rename zap_carriage_returns.py => src/zap_carriage_returns.py (100%) diff --git a/.github/workflows/lint_python.yml b/.github/workflows/lint_python.yml index ef12543..1e47996 100644 --- a/.github/workflows/lint_python.yml +++ b/.github/workflows/lint_python.yml @@ -7,7 +7,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.x + python-version: 3.13 + allow-prereleases: true - run: pip install --upgrade pip ruff setuptools wheel - name: "Ruff: Show stopper (must-fix) issues" run: ruff check --select=E9,F63,F7,F82,PLE,YTT diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 591b2b6..52101ce 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -11,6 +11,9 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 + with: + python-version: 3.13 + allow-prereleases: true - run: pip install pre-commit - run: pre-commit --version - run: pre-commit install diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 5d11613..268ee01 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -28,11 +28,12 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.x + python-version: 3.13 + allow-prereleases: true - run: pip install --upgrade pip - run: pip install myst-parser sphinx-autoapi sphinx-pyproject - uses: actions/configure-pages@v5 - - run: sphinx-build docs docs/_build/html + - run: sphinx-build -c docs . docs/_build/html - uses: actions/upload-pages-artifact@v3 with: path: docs/_build/html diff --git a/.github/workflows/trending_python.yml b/.github/workflows/trending_python.yml index 0356920..5f883be 100644 --- a/.github/workflows/trending_python.yml +++ b/.github/workflows/trending_python.yml @@ -8,6 +8,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.x + python-version: 3.13 + allow-prereleases: true - run: pip install beautifulsoup4 lxml requests - run: python trending_python.py diff --git a/README.md b/README.md index cb55789..257ec4f 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,12 @@ Ten-lines-or-less ================= -![alt text](https://img.shields.io/badge/Python-3.12-blue.svg "Python 3.12+") +![alt text](https://img.shields.io/badge/Python-3.13-blue.svg "Python 3.13+") [![lint_python](https://github.com/cclauss/Ten-lines-or-less/actions/workflows/lint_python.yml/badge.svg)](https://github.com/cclauss/Ten-lines-or-less/actions/workflows/lint_python.yml) [![pre-commit](https://github.com/cclauss/Ten-lines-or-less/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/cclauss/Ten-lines-or-less/actions/workflows/pre-commit.yml) +[![sphinx](https://github.com/cclauss/Ten-lines-or-less/actions/workflows/sphinx.yml/badge.svg)](https://github.com/cclauss/Ten-lines-or-less/actions/workflows/sphinx.yml) + +docs: Python scripts that are short but useful or interesting. diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 0eba080..0000000 --- a/docs/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Ten lines or less - -This is where the good stuff is! - -Christian Clauss diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index f72a46b..0000000 --- a/docs/index.md +++ /dev/null @@ -1,7 +0,0 @@ -# Open Metadata Exchange documentation -```{toctree} -:maxdepth: 2 -:caption: # Table of Contents - -README.md -``` diff --git a/index.md b/index.md index 20422ce..305132d 100644 --- a/index.md +++ b/index.md @@ -1,4 +1,4 @@ -# Open Metadata Exchange documentation +# Ten lines or less documentation ```{toctree} :maxdepth: 2 :caption: index.md diff --git a/pyproject.toml b/pyproject.toml index 05b0ad9..e5f456f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,10 +16,10 @@ optional-dependencies.docs = [ [tool.sphinx-pyproject] copyright = "2014, Christian Clauss" -autoapi_dirs = [ "." ] +autoapi_dirs = [ "src" ] exclude_patterns = [ ".*/*", - "docs/conf.py", + "docs/", ] extensions = [ "autoapi.extension", diff --git a/MonthView.py b/src/MonthView.py similarity index 100% rename from MonthView.py rename to src/MonthView.py diff --git a/appex_dump.py b/src/appex_dump.py similarity index 100% rename from appex_dump.py rename to src/appex_dump.py diff --git a/appex_local_copy.py b/src/appex_local_copy.py similarity index 100% rename from appex_local_copy.py rename to src/appex_local_copy.py diff --git a/attitude_to_multipeer.py b/src/attitude_to_multipeer.py similarity index 100% rename from attitude_to_multipeer.py rename to src/attitude_to_multipeer.py diff --git a/backup_editor_file.py b/src/backup_editor_file.py similarity index 100% rename from backup_editor_file.py rename to src/backup_editor_file.py diff --git a/battery_info.py b/src/battery_info.py similarity index 100% rename from battery_info.py rename to src/battery_info.py diff --git a/birthdays.py b/src/birthdays.py similarity index 100% rename from birthdays.py rename to src/birthdays.py diff --git a/bit_filpper.py b/src/bit_filpper.py similarity index 100% rename from bit_filpper.py rename to src/bit_filpper.py diff --git a/born_on_a_friday.py b/src/born_on_a_friday.py similarity index 100% rename from born_on_a_friday.py rename to src/born_on_a_friday.py diff --git a/cd_ls_pwd.py b/src/cd_ls_pwd.py similarity index 100% rename from cd_ls_pwd.py rename to src/cd_ls_pwd.py diff --git a/daze_left.py b/src/daze_left.py similarity index 100% rename from daze_left.py rename to src/daze_left.py diff --git a/dropbox_change_watcher.py b/src/dropbox_change_watcher.py similarity index 100% rename from dropbox_change_watcher.py rename to src/dropbox_change_watcher.py diff --git a/elapsed_time.py b/src/elapsed_time.py similarity index 100% rename from elapsed_time.py rename to src/elapsed_time.py diff --git a/fake_format.py b/src/fake_format.py similarity index 100% rename from fake_format.py rename to src/fake_format.py diff --git a/files_and_folders.py b/src/files_and_folders.py similarity index 100% rename from files_and_folders.py rename to src/files_and_folders.py diff --git a/form_dialog_from_fields_dict.py b/src/form_dialog_from_fields_dict.py similarity index 100% rename from form_dialog_from_fields_dict.py rename to src/form_dialog_from_fields_dict.py diff --git a/full_screen_view.py b/src/full_screen_view.py similarity index 100% rename from full_screen_view.py rename to src/full_screen_view.py diff --git a/image_file.py b/src/image_file.py similarity index 100% rename from image_file.py rename to src/image_file.py diff --git a/json_readable.py b/src/json_readable.py similarity index 100% rename from json_readable.py rename to src/json_readable.py diff --git a/not_implemented.py b/src/not_implemented.py similarity index 100% rename from not_implemented.py rename to src/not_implemented.py diff --git a/omz_env.py b/src/omz_env.py similarity index 100% rename from omz_env.py rename to src/omz_env.py diff --git a/platform_info.py b/src/platform_info.py similarity index 100% rename from platform_info.py rename to src/platform_info.py diff --git a/pythonista_docs.py b/src/pythonista_docs.py similarity index 100% rename from pythonista_docs.py rename to src/pythonista_docs.py diff --git a/pythonista_version.py b/src/pythonista_version.py similarity index 100% rename from pythonista_version.py rename to src/pythonista_version.py diff --git a/pyui_from_clipboard.py b/src/pyui_from_clipboard.py similarity index 100% rename from pyui_from_clipboard.py rename to src/pyui_from_clipboard.py diff --git a/pyui_print.py b/src/pyui_print.py similarity index 100% rename from pyui_print.py rename to src/pyui_print.py diff --git a/pyui_to_clipboard.py b/src/pyui_to_clipboard.py similarity index 100% rename from pyui_to_clipboard.py rename to src/pyui_to_clipboard.py diff --git a/pyui_variable.py b/src/pyui_variable.py similarity index 100% rename from pyui_variable.py rename to src/pyui_variable.py diff --git a/read_zipfile_from_github.py b/src/read_zipfile_from_github.py similarity index 100% rename from read_zipfile_from_github.py rename to src/read_zipfile_from_github.py diff --git a/scroll_horizontally.py b/src/scroll_horizontally.py similarity index 100% rename from scroll_horizontally.py rename to src/scroll_horizontally.py diff --git a/set_theory.py b/src/set_theory.py similarity index 100% rename from set_theory.py rename to src/set_theory.py diff --git a/sqlite_get_list_from_table.py b/src/sqlite_get_list_from_table.py similarity index 100% rename from sqlite_get_list_from_table.py rename to src/sqlite_get_list_from_table.py diff --git a/sqlite_table_layout.py b/src/sqlite_table_layout.py similarity index 100% rename from sqlite_table_layout.py rename to src/sqlite_table_layout.py diff --git a/sudoku_print.py b/src/sudoku_print.py similarity index 100% rename from sudoku_print.py rename to src/sudoku_print.py diff --git a/sudoku_revisited.py b/src/sudoku_revisited.py similarity index 100% rename from sudoku_revisited.py rename to src/sudoku_revisited.py diff --git a/tarball_from_dropbox.py b/src/tarball_from_dropbox.py similarity index 100% rename from tarball_from_dropbox.py rename to src/tarball_from_dropbox.py diff --git a/tarball_to_dropbox.py b/src/tarball_to_dropbox.py similarity index 100% rename from tarball_to_dropbox.py rename to src/tarball_to_dropbox.py diff --git a/timestamped_filename.py b/src/timestamped_filename.py similarity index 100% rename from timestamped_filename.py rename to src/timestamped_filename.py diff --git a/trending_python.py b/src/trending_python.py similarity index 100% rename from trending_python.py rename to src/trending_python.py diff --git a/trending_python_tester.py b/src/trending_python_tester.py similarity index 100% rename from trending_python_tester.py rename to src/trending_python_tester.py diff --git a/twitter_hack.py b/src/twitter_hack.py similarity index 100% rename from twitter_hack.py rename to src/twitter_hack.py diff --git a/walking_the_path.py b/src/walking_the_path.py similarity index 100% rename from walking_the_path.py rename to src/walking_the_path.py diff --git a/weather_where_you_are.py b/src/weather_where_you_are.py similarity index 100% rename from weather_where_you_are.py rename to src/weather_where_you_are.py diff --git a/world_bank_data.py b/src/world_bank_data.py similarity index 100% rename from world_bank_data.py rename to src/world_bank_data.py diff --git a/zap_carriage_returns.py b/src/zap_carriage_returns.py similarity index 100% rename from zap_carriage_returns.py rename to src/zap_carriage_returns.py