pyutils.git
14 months agoFix another place for types -> typez
Scott Gasch [Sun, 2 Apr 2023 19:14:12 +0000 (12:14 -0700)]
Fix another place for types -> typez

14 months agoMake cron.py warn on no --timeout which can lead to stale locks.
Scott Gasch [Sat, 1 Apr 2023 18:49:59 +0000 (11:49 -0700)]
Make cron.py warn on no --timeout which can lead to stale locks.

14 months agoFix a bug around the computation of zookeeper lockfile expirations.
Scott Gasch [Sat, 1 Apr 2023 18:48:59 +0000 (11:48 -0700)]
Fix a bug around the computation of zookeeper lockfile expirations.

14 months agoRemove package.
Scott Gasch [Sat, 18 Mar 2023 21:07:31 +0000 (14:07 -0700)]
Remove package.

14 months agoUse CreateFileWithMode for cache.
Scott Gasch [Fri, 10 Mar 2023 20:36:55 +0000 (12:36 -0800)]
Use CreateFileWithMode for cache.

14 months agoMake persistent use tighter permissions by default.
Scott Gasch [Mon, 6 Mar 2023 17:40:40 +0000 (09:40 -0800)]
Make persistent use tighter permissions by default.

14 months agoFix clear_preexisting_handers functionality.
Scott Gasch [Mon, 6 Mar 2023 04:36:39 +0000 (20:36 -0800)]
Fix clear_preexisting_handers functionality.

14 months agoAdds a doctest.
Scott Gasch [Sun, 5 Mar 2023 02:28:00 +0000 (18:28 -0800)]
Adds a doctest.

14 months agoAnother types reference in the docs.
Scott Gasch [Sun, 5 Mar 2023 02:18:53 +0000 (18:18 -0800)]
Another types reference in the docs.

14 months agoRename in the docs.
Scott Gasch [Sun, 5 Mar 2023 02:18:14 +0000 (18:18 -0800)]
Rename in the docs.

14 months agotypes -> typez as the name mirrors a python core library name.
Scott Gasch [Sun, 5 Mar 2023 02:15:52 +0000 (18:15 -0800)]
types -> typez as the name mirrors a python core library name.

15 months agoAdd and use valid_byte_count.
Scott Gasch [Sat, 4 Mar 2023 00:01:40 +0000 (16:01 -0800)]
Add and use valid_byte_count.

15 months agoCut version 0.0.1b13
Scott Gasch [Fri, 3 Mar 2023 22:57:35 +0000 (14:57 -0800)]
Cut version 0.0.1b13

- Remove tprint, add docs.
- Document this logging stuff.
- Removes my hacky --lmodule which I will miss dearly but it was preventing the cool LoggingContext which is now added.
- Cleanup.
- Adds LoggingContext.
- Cut version 0.0.1b12
- Do this logging stuff the right way.
- Cut version 0.0.1b11
- Rename that class; it doesn't just prepend...
- Improve pydocs.
- Fix pydocs
- Create methods to dynamically prepend or append messages to all log messages produced by the current thread.
- Update docs.
- Cut version 0.0.1b10
- More cleanup.
- More spring cleaning.
- I guess it's 2023 now...
- Adds a new color.
- Augment logging at startup in debug mode; fix a bug in config.
- Fix logger.exception messages in example code.
- Fix logger.exception() calls.
- Use full path for grep.
- Make logging use execute_probabilstically.
- Improve docs and add a doctest.
- Adds execute_probabilistically.
- Minor tweaks.
- Adds CreateFileWithMode helper to create a new file with a given mode more easily.
- Cut version 0.0.1b9

15 months agoRemove tprint, add docs.
Scott Gasch [Fri, 3 Mar 2023 20:08:21 +0000 (12:08 -0800)]
Remove tprint, add docs.

15 months agoDocument this logging stuff.
Scott Gasch [Fri, 3 Mar 2023 20:02:46 +0000 (12:02 -0800)]
Document this logging stuff.

15 months agoRemoves my hacky --lmodule which I will miss dearly but it was
Scott Gasch [Fri, 3 Mar 2023 19:20:44 +0000 (11:20 -0800)]
Removes my hacky --lmodule which I will miss dearly but it was
preventing the cool LoggingContext which is now added.

15 months agoCleanup.
Scott Gasch [Fri, 3 Mar 2023 00:03:56 +0000 (16:03 -0800)]
Cleanup.

15 months agoAdds LoggingContext.
Scott Gasch [Thu, 2 Mar 2023 22:38:46 +0000 (14:38 -0800)]
Adds LoggingContext.

15 months agoCut version 0.0.1b12
Scott Gasch [Thu, 2 Mar 2023 17:04:29 +0000 (09:04 -0800)]
Cut version 0.0.1b12

- Do this logging stuff the right way.
- Cut version 0.0.1b11
- Rename that class; it doesn't just prepend...
- Improve pydocs.
- Fix pydocs
- Create methods to dynamically prepend or append messages to all log messages produced by the current thread.
- Update docs.
- Cut version 0.0.1b10
- More cleanup.
- More spring cleaning.
- I guess it's 2023 now...
- Adds a new color.
- Augment logging at startup in debug mode; fix a bug in config.
- Fix logger.exception messages in example code.
- Fix logger.exception() calls.
- Use full path for grep.
- Make logging use execute_probabilstically.
- Improve docs and add a doctest.
- Adds execute_probabilistically.
- Minor tweaks.
- Adds CreateFileWithMode helper to create a new file with a given mode more easily.
- Cut version 0.0.1b9

15 months agoDo this logging stuff the right way.
Scott Gasch [Thu, 2 Mar 2023 06:16:17 +0000 (22:16 -0800)]
Do this logging stuff the right way.

15 months agoCut version 0.0.1b11
Scott Gasch [Thu, 2 Mar 2023 00:14:21 +0000 (16:14 -0800)]
Cut version 0.0.1b11

- Rename that class; it doesn't just prepend...
- Improve pydocs.
- Fix pydocs
- Create methods to dynamically prepend or append messages to all log messages produced by the current thread.
- Update docs.
- Cut version 0.0.1b10
- More cleanup.
- More spring cleaning.
- I guess it's 2023 now...
- Adds a new color.
- Augment logging at startup in debug mode; fix a bug in config.
- Fix logger.exception messages in example code.
- Fix logger.exception() calls.
- Use full path for grep.
- Make logging use execute_probabilstically.
- Improve docs and add a doctest.
- Adds execute_probabilistically.
- Minor tweaks.
- Adds CreateFileWithMode helper to create a new file with a given mode more easily.
- Cut version 0.0.1b9

15 months agoRename that class; it doesn't just prepend...
Scott Gasch [Wed, 1 Mar 2023 23:32:48 +0000 (15:32 -0800)]
Rename that class; it doesn't just prepend...

15 months agoImprove pydocs.
Scott Gasch [Wed, 1 Mar 2023 23:30:18 +0000 (15:30 -0800)]
Improve pydocs.

15 months agoFix pydocs
Scott Gasch [Wed, 1 Mar 2023 23:23:39 +0000 (15:23 -0800)]
Fix pydocs

15 months agoCreate methods to dynamically prepend or append messages to all log
Scott Gasch [Wed, 1 Mar 2023 23:08:43 +0000 (15:08 -0800)]
Create methods to dynamically prepend or append messages to all log
messages produced by the current thread.

15 months agoUpdate docs.
Scott Gasch [Wed, 1 Mar 2023 20:45:24 +0000 (12:45 -0800)]
Update docs.

15 months agoCut version 0.0.1b10
Scott Gasch [Wed, 1 Mar 2023 05:19:37 +0000 (21:19 -0800)]
Cut version 0.0.1b10

- More cleanup.
- More spring cleaning.
- I guess it's 2023 now...
- Adds a new color.
- Augment logging at startup in debug mode; fix a bug in config.
- Fix logger.exception messages in example code.
- Fix logger.exception() calls.
- Use full path for grep.
- Make logging use execute_probabilstically.
- Improve docs and add a doctest.
- Adds execute_probabilistically.
- Minor tweaks.
- Adds CreateFileWithMode helper to create a new file with a given mode more easily.
- Cut version 0.0.1b9

15 months agoMore cleanup.
Scott Gasch [Wed, 1 Mar 2023 05:08:28 +0000 (21:08 -0800)]
More cleanup.

15 months agoMore spring cleaning.
Scott Gasch [Tue, 28 Feb 2023 17:41:26 +0000 (09:41 -0800)]
More spring cleaning.

15 months agoI guess it's 2023 now...
Scott Gasch [Tue, 28 Feb 2023 16:09:57 +0000 (08:09 -0800)]
I guess it's 2023 now...

15 months agoAdds a new color.
Scott Gasch [Tue, 28 Feb 2023 16:06:30 +0000 (08:06 -0800)]
Adds a new color.

15 months agoAugment logging at startup in debug mode; fix a bug in config.
Scott Gasch [Mon, 27 Feb 2023 02:16:38 +0000 (18:16 -0800)]
Augment logging at startup in debug mode; fix a bug in config.

15 months agoFix logger.exception messages in example code.
Scott Gasch [Sun, 26 Feb 2023 17:34:12 +0000 (09:34 -0800)]
Fix logger.exception messages in example code.

15 months agoFix logger.exception() calls.
Scott Gasch [Sun, 26 Feb 2023 17:02:45 +0000 (09:02 -0800)]
Fix logger.exception() calls.

15 months agoUse full path for grep.
Scott Gasch [Sun, 26 Feb 2023 17:01:23 +0000 (09:01 -0800)]
Use full path for grep.

15 months agoMake logging use execute_probabilstically.
Scott Gasch [Sat, 18 Feb 2023 21:38:18 +0000 (13:38 -0800)]
Make logging use execute_probabilstically.

15 months agoImprove docs and add a doctest.
Scott Gasch [Sat, 18 Feb 2023 19:56:00 +0000 (11:56 -0800)]
Improve docs and add a doctest.

15 months agoAdds execute_probabilistically.
Scott Gasch [Sat, 18 Feb 2023 19:51:51 +0000 (11:51 -0800)]
Adds execute_probabilistically.

15 months agoMinor tweaks.
Scott Gasch [Fri, 10 Feb 2023 00:26:46 +0000 (16:26 -0800)]
Minor tweaks.

15 months agoAdds CreateFileWithMode helper to create a new file with a given
Scott Gasch [Thu, 9 Feb 2023 23:34:50 +0000 (15:34 -0800)]
Adds CreateFileWithMode helper to create a new file with a given
mode more easily.

15 months agoCut version 0.0.1b9
Scott Gasch [Thu, 9 Feb 2023 22:14:42 +0000 (14:14 -0800)]
Cut version 0.0.1b9

- Fix typo in README.
- Remove the requirement that filename is a file from is_*.
- Typos in docs.
- Update docs.
- Adds remove_edge and shortest path.
- Cut version 0.0.1b8

15 months agoFix typo in README.
Scott Gasch [Thu, 9 Feb 2023 22:05:12 +0000 (14:05 -0800)]
Fix typo in README.

16 months agoRemove the requirement that filename is a file from is_*.
Scott Gasch [Wed, 11 Jan 2023 04:36:01 +0000 (20:36 -0800)]
Remove the requirement that filename is a file from is_*.

17 months agoTypos in docs.
Scott Gasch [Sat, 17 Dec 2022 20:04:43 +0000 (12:04 -0800)]
Typos in docs.

17 months agoUpdate docs.
Scott Gasch [Sat, 17 Dec 2022 20:02:14 +0000 (12:02 -0800)]
Update docs.

17 months agoAdds remove_edge and shortest path.
Scott Gasch [Sat, 17 Dec 2022 20:01:01 +0000 (12:01 -0800)]
Adds remove_edge and shortest path.

17 months agoCut version 0.0.1b8
Scott Gasch [Sat, 17 Dec 2022 06:12:56 +0000 (22:12 -0800)]
Cut version 0.0.1b8

- Docs for Graph.
- Adds Graph.
- Tiebreak ordering of ranges with the same lower bound using upper bound.
- More docs...
- More docs.
- Update docs again.
- Update docs and type hints in interval_tree.  Add it to the pydocs.
- Fix interval_tree so it actually works.  Add unittests.
- Bug and readability fix.
- Adds IntervalTree.
- Remove more annoying warning messages dumped to console from library code.
- Be less annoying.
- Make argparse utils' valid_date work with the default format of UNIX date.
- Improve identifier for zookeeper based lockfiles.
- Adds support for zookeeper-based lockfiles.
- Make the processed cmdline available to callers.
- Fixup/improve error message when giving up on lock acquisition.
- Improve error message for logs.
- Do not touch timestamp if cronjob failed!
- Fix docs.
- Only upload one wheel.
- Update docs.
- Update docs.
- Tweak cut_version.sh again.
- Cut version 0.0.1b7

17 months agoDocs for Graph.
Scott Gasch [Sat, 17 Dec 2022 06:09:46 +0000 (22:09 -0800)]
Docs for Graph.

17 months agoAdds Graph.
Scott Gasch [Sat, 17 Dec 2022 05:44:24 +0000 (21:44 -0800)]
Adds Graph.

17 months agoTiebreak ordering of ranges with the same lower bound using upper bound.
Scott Gasch [Fri, 16 Dec 2022 00:26:54 +0000 (16:26 -0800)]
Tiebreak ordering of ranges with the same lower bound using upper bound.

17 months agoMore docs...
Scott Gasch [Thu, 15 Dec 2022 23:47:21 +0000 (15:47 -0800)]
More docs...

17 months agoMore docs.
Scott Gasch [Thu, 15 Dec 2022 23:44:46 +0000 (15:44 -0800)]
More docs.

17 months agoUpdate docs again.
Scott Gasch [Thu, 15 Dec 2022 23:40:08 +0000 (15:40 -0800)]
Update docs again.

17 months agoUpdate docs and type hints in interval_tree. Add it to the pydocs.
Scott Gasch [Thu, 15 Dec 2022 23:34:37 +0000 (15:34 -0800)]
Update docs and type hints in interval_tree.  Add it to the pydocs.

17 months agoFix interval_tree so it actually works. Add unittests.
Scott Gasch [Thu, 15 Dec 2022 23:16:21 +0000 (15:16 -0800)]
Fix interval_tree so it actually works.  Add unittests.

17 months agoBug and readability fix.
Scott Gasch [Thu, 15 Dec 2022 07:08:00 +0000 (23:08 -0800)]
Bug and readability fix.

17 months agoAdds IntervalTree.
Scott Gasch [Tue, 13 Dec 2022 22:36:23 +0000 (14:36 -0800)]
Adds IntervalTree.

17 months agoRemove more annoying warning messages dumped to console from library code.
Scott Gasch [Sun, 11 Dec 2022 20:05:49 +0000 (12:05 -0800)]
Remove more annoying warning messages dumped to console from library code.

17 months agoBe less annoying.
Scott Gasch [Sun, 11 Dec 2022 20:04:28 +0000 (12:04 -0800)]
Be less annoying.

17 months agoMake argparse utils' valid_date work with the default format of UNIX date.
Scott Gasch [Sun, 11 Dec 2022 20:02:25 +0000 (12:02 -0800)]
Make argparse utils' valid_date work with the default format of UNIX date.

17 months agoImprove identifier for zookeeper based lockfiles.
Scott Gasch [Fri, 9 Dec 2022 21:10:20 +0000 (13:10 -0800)]
Improve identifier for zookeeper based lockfiles.

17 months agoAdds support for zookeeper-based lockfiles.
Scott Gasch [Fri, 9 Dec 2022 18:48:45 +0000 (10:48 -0800)]
Adds support for zookeeper-based lockfiles.

17 months agoMake the processed cmdline available to callers.
Scott Gasch [Sun, 4 Dec 2022 03:14:47 +0000 (19:14 -0800)]
Make the processed cmdline available to callers.

18 months agoFixup/improve error message when giving up on lock acquisition.
Scott Gasch [Thu, 24 Nov 2022 20:35:36 +0000 (12:35 -0800)]
Fixup/improve error message when giving up on lock acquisition.

18 months agoImprove error message for logs.
Scott Gasch [Thu, 24 Nov 2022 18:20:35 +0000 (10:20 -0800)]
Improve error message for logs.

18 months agoDo not touch timestamp if cronjob failed!
Scott Gasch [Tue, 22 Nov 2022 20:07:34 +0000 (12:07 -0800)]
Do not touch timestamp if cronjob failed!

18 months agoFix docs.
Scott Gasch [Fri, 18 Nov 2022 17:00:54 +0000 (09:00 -0800)]
Fix docs.

18 months agoOnly upload one wheel.
Scott Gasch [Fri, 18 Nov 2022 16:54:08 +0000 (08:54 -0800)]
Only upload one wheel.

18 months agoUpdate docs.
Scott Gasch [Fri, 18 Nov 2022 16:43:09 +0000 (08:43 -0800)]
Update docs.

18 months agoUpdate docs.
Scott Gasch [Fri, 18 Nov 2022 16:38:40 +0000 (08:38 -0800)]
Update docs.

18 months agoTweak cut_version.sh again.
Scott Gasch [Thu, 17 Nov 2022 19:01:55 +0000 (11:01 -0800)]
Tweak cut_version.sh again.

18 months agoCut version 0.0.1b7
Scott Gasch [Thu, 17 Nov 2022 18:56:33 +0000 (10:56 -0800)]
Cut version 0.0.1b7

18 months agoFix stdev.
Scott Gasch [Thu, 17 Nov 2022 18:48:11 +0000 (10:48 -0800)]
Fix stdev.

18 months agoUse the right greek letter for the mean of the population, not the sample.
Scott Gasch [Thu, 17 Nov 2022 16:20:22 +0000 (08:20 -0800)]
Use the right greek letter for the mean of the population, not the sample.

18 months agoChange path of remote_worker so the macbook can work too.
Scott Gasch [Fri, 11 Nov 2022 00:29:19 +0000 (16:29 -0800)]
Change path of remote_worker so the macbook can work too.

19 months agoThis is slightly faster...
Scott Gasch [Wed, 2 Nov 2022 05:51:34 +0000 (22:51 -0700)]
This is slightly faster...

19 months agoMessing with config files for git presubmit check while cleaing
Scott Gasch [Tue, 1 Nov 2022 01:24:45 +0000 (18:24 -0700)]
Messing with config files for git presubmit check while cleaing
up string_utils lint errors.

19 months agoMore tweaking of cut_version.sh.
Scott Gasch [Mon, 31 Oct 2022 22:34:47 +0000 (15:34 -0700)]
More tweaking of cut_version.sh.

19 months agoAdds MD5 checksums to wheels.
Scott Gasch [Mon, 31 Oct 2022 22:33:13 +0000 (15:33 -0700)]
Adds MD5 checksums to wheels.

19 months agoDoc updates to argparse_utils.py.
Scott Gasch [Mon, 31 Oct 2022 22:18:53 +0000 (15:18 -0700)]
Doc updates to argparse_utils.py.

19 months agoMore changes to cut_version.sh.
Scott Gasch [Mon, 31 Oct 2022 22:18:29 +0000 (15:18 -0700)]
More changes to cut_version.sh.

19 months agoUpdate cut_version.sh.
Scott Gasch [Mon, 31 Oct 2022 15:16:44 +0000 (08:16 -0700)]
Update cut_version.sh.

19 months agoModify cut_version to check in wheel produced.
Scott Gasch [Mon, 31 Oct 2022 05:54:40 +0000 (22:54 -0700)]
Modify cut_version to check in wheel produced.

19 months agoUpdate docs in parallelize again.
Scott Gasch [Mon, 31 Oct 2022 05:53:53 +0000 (22:53 -0700)]
Update docs in parallelize again.

19 months agoAdd binary wheels.
Scott Gasch [Mon, 31 Oct 2022 05:53:06 +0000 (22:53 -0700)]
Add binary wheels.

19 months agoUpdate docs.
Scott Gasch [Sun, 30 Oct 2022 20:50:50 +0000 (13:50 -0700)]
Update docs.

19 months agoUpdate docs around development
Scott Gasch [Sun, 30 Oct 2022 20:16:20 +0000 (13:16 -0700)]
Update docs around development

19 months agoCut version 0.0.1b6
Scott Gasch [Sun, 30 Oct 2022 19:58:31 +0000 (12:58 -0700)]
Cut version 0.0.1b6

- Fix toml files after rename.  This rename is a pain!
- Cut version 0.0.1b6
- Cut version 0.0.1b6
- Fix dog generation after last rename change.
- Rename some directories (e.g. typez -> types) since they don't collide with any stdlib names.
- Add better docs with an example to SharedDict.
- Add id_generator_test.
- Add run_tests.py to the examples/README list.
- Make run_tests_serially.sh skip zookeeper_test.py too.
- Teach run_tests.py to abort inflight tests in case of emergency shutdown.
- Fix wrong TimeoutError in catch.
- Get reminder to stop leaving turds around my filesystem.
- Docs for dataclass_utils.
- Add dataclass_utils for some simple dataclass wrappers and annotation.
- Improve documentation / doctests.
- Update documentation.
- Cut version 0.0.1b5

19 months agoFix toml files after rename. This rename is a pain!
Scott Gasch [Sun, 30 Oct 2022 19:57:16 +0000 (12:57 -0700)]
Fix toml files after rename.  This rename is a pain!

19 months agoCut version 0.0.1b6
Scott Gasch [Sun, 30 Oct 2022 19:55:48 +0000 (12:55 -0700)]
Cut version 0.0.1b6

- Cut version 0.0.1b6
- Fix dog generation after last rename change.
- Rename some directories (e.g. typez -> types) since they don't collide with any stdlib names.
- Add better docs with an example to SharedDict.
- Add id_generator_test.
- Add run_tests.py to the examples/README list.
- Make run_tests_serially.sh skip zookeeper_test.py too.
- Teach run_tests.py to abort inflight tests in case of emergency shutdown.
- Fix wrong TimeoutError in catch.
- Get reminder to stop leaving turds around my filesystem.
- Docs for dataclass_utils.
- Add dataclass_utils for some simple dataclass wrappers and annotation.
- Improve documentation / doctests.
- Update documentation.
- Cut version 0.0.1b5

19 months agoCut version 0.0.1b6
Scott Gasch [Sun, 30 Oct 2022 19:52:44 +0000 (12:52 -0700)]
Cut version 0.0.1b6

- Fix docs after rename
- Rename some directories (e.g. typez -> types) since they don't collide with any stdlib names.
- Add better docs with an example to SharedDict.
- Add id_generator_test.
- Add run_tests.py to the examples/README list.
- Make run_tests_serially.sh skip zookeeper_test.py too.
- Teach run_tests.py to abort inflight tests in case of emergency shutdown.
- Fix wrong TimeoutError in catch.
- Get reminder to stop leaving turds around my filesystem.
- Docs for dataclass_utils.
- Add dataclass_utils for some simple dataclass wrappers and annotation.
- Improve documentation / doctests.
- Update documentation.
- Cut version 0.0.1b5

19 months agoFix dog generation after last rename change.
Scott Gasch [Sun, 30 Oct 2022 19:44:31 +0000 (12:44 -0700)]
Fix dog generation after last rename change.

19 months agoRename some directories (e.g. typez -> types) since they don't collide with
Scott Gasch [Sun, 30 Oct 2022 19:40:12 +0000 (12:40 -0700)]
Rename some directories (e.g. typez -> types) since they don't collide with
any stdlib names.

19 months agoAdd better docs with an example to SharedDict.
Scott Gasch [Sun, 30 Oct 2022 03:14:48 +0000 (20:14 -0700)]
Add better docs with an example to SharedDict.

19 months agoAdd id_generator_test.
Scott Gasch [Sat, 29 Oct 2022 21:37:43 +0000 (14:37 -0700)]
Add id_generator_test.

19 months agoAdd run_tests.py to the examples/README list.
Scott Gasch [Sat, 29 Oct 2022 18:00:31 +0000 (11:00 -0700)]
Add run_tests.py to the examples/README list.

19 months agoMake run_tests_serially.sh skip zookeeper_test.py too.
Scott Gasch [Sat, 29 Oct 2022 17:58:08 +0000 (10:58 -0700)]
Make run_tests_serially.sh skip zookeeper_test.py too.

19 months agoTeach run_tests.py to abort inflight tests in case of emergency shutdown.
Scott Gasch [Sat, 29 Oct 2022 17:36:30 +0000 (10:36 -0700)]
Teach run_tests.py to abort inflight tests in case of emergency shutdown.

19 months agoFix wrong TimeoutError in catch.
Scott Gasch [Sat, 29 Oct 2022 00:28:27 +0000 (17:28 -0700)]
Fix wrong TimeoutError in catch.

19 months agoGet reminder to stop leaving turds around my filesystem.
Scott Gasch [Wed, 26 Oct 2022 17:58:26 +0000 (10:58 -0700)]
Get reminder to stop leaving turds around my filesystem.