This document will serve as a record for past and future changes to seedir. It is being retroactively added after the version 0.2.0 release (so notes for prior releases will be less detailed).
The format is based on Keep a Changelog.
- The
itemlimit
now accepts a 2-tuple as an argument, indicating a separate limit for folders and files (respectively). - Added two parameters for handling errors when trying to list the children of a directory:
acceptable_listdir_errors
: One or more error types (Exceptions
) which are ignored when occurring during a directory listing call. E.g., a permissions error.denied_string
: String to add to follow directory entries for which the error was triggered.
- More test cases added
- The main algorithm for folder tree traversal has been refactored.
- The unit tests are now structured for pytest.
seedir.folderstructure.FolderStructure
is now an abstract class that cannot be directly instantiated. The functions that previously needed to be provided as arguments for the constructor must now be implemented as part of a subclass (see getting started for an example)
slash
is now totally deprecated; usefolderend
instead.
- Syntax for accessing the CLI is updated. Now, you can do
seedir
orpython -m seedir
;seedir.command_line
is renamed to enable this change.
- pathlib Path objects now accepted by
sd.seedir()
. All other arguments apply as normal; arguments accepting callables (mask
andformatter
) will see pathlib objects.
-
emoji is now an optional dependency. It can be installed with
pip install seedir[emoji]
. An error is raised if the emoji style is requested without emoji installed. -
Reorganization of
folderstructure.py
and theFolderStructure
classfolderstructurehelpers.py
has been removed. Most of the functions implemented there have become methods ofFolderStucture
.- FolderStructure has been made more user-friendly, and can now be initialized with less functions.
- There are no longer separate "real dir"/"fake dir" functions for handing item filtering/sorting.
-
Item inclusion is now prioritized above exclusion for include/exclude folders/files. The order of precedence now is mask (1), inclusion (2), exclusion (3). The code in this function was generally rewritten to be more concise (
FolderStructure._filter_items()
). -
The
~
in paths is now resolved, as well as.
and..
-
More examples in the getting started readme.
- Typos in documentation
- Removal of IPYNB checkpoints
- The
SeedirError
has been removed. All uses have been replaced with more appropriate errors, mainlyValueError
orTypeError
- Additional functionality to the
formatter
parameter: can now dynamically set other seedir arguments as well as styling ones - Added a
sticky_formatter
parameter for causing the formatter changes to continue through sub-directories. - Additional test cases for
formatter
- Add
folderend
&fileend
tokens for setting characters at end of line. Default styles have been updated to include these. - Additional documentation, specifically for
formatter
but also some smaller tweaks
- The CLI was revamped, now using argparse instead of getopts. More seedir options were added.
- The
seedir.printing.format_indent()
method now modifies dictionaries in place, rather than creating a new one - the
FakeDir.realize()
method no longer creates a reference to unused file variable
- Fix the words.txt file not being closed after opening 🤦
slash
is on warning for removal after addition offolderend
.
0.3.0 - 2021-12-20
formatter
parameter for more customizable diagrams- FakeDir methods for creating files/folders now return references to the objects created
- A
copy()
method for FakeDirs - A
siblings()
method for FakeDirs
- Documentation updates
- Added code blocks to examples in docstrings
- replaced the "cheatsheet.png" image in the Getting Started section with a markdown link
- remove broken link to
FolderStructure
class inseedir.realdir
module - fixed some examples in docstrings and readmes
- in getting started, redo examples to omit empty folders (which are omitted by GitHub)
- replace
'\s'
with' '
inseedir.fakedir.fakedir_fromstring()
- Remove .DS_Store files (thanks @timweissenfels)
- Reverted API doc style back to pdoc3 default
- remove call to
copy
method inFakedir.delete()
, which prevented non-list arguments - the
walk_apply
method is now applied to the calling folder, rather than just children
0.2.0 - 2021-05-21
- a new
folderstructure.py
module was added containing a single folder tree construction algorithm. This module is called for both real directories (seedir.realdir.seedir()
) and fake directories (seedir.fakedir.Fakedir.seedir()
). The code was also refactored to be less convoluted and more readable (and also more correct for some fringe cases)- using
depthlimit=0
with abeyond
string now produces just the root folder (this was incorrect before) - with
beyond='content'
, empty folders are only shown when thedepthlimit
is crossed - trailing separators or slashes no longer cause the name of the root folder to be empty
- using
- A
folderstructurehelpers.py
module was also added to support the main folder structure algorithm. - More unit tests were added.
name
parameter added toseedir.fakedir.randomdir
- Convert some arguments to
bool
orint
in the command line tool
- The documentation was overhauled:
- The Jupyter Notebook examples file was removed, in favor of a
gettingstarted.md
file which is included in the main page of the API docs. - The getting started README as well as the
seedir.fakedir
module are nowdoctest
-able. - New style added to the API docs.
seedir.seedir
module has been renamed toseedir.realdir
to avoid some of my confusions- added an
exampledir
to thedocs
folder for some examples
- The Jupyter Notebook examples file was removed, in favor of a
- Some changes to
seedir.fakedir.fakedir_fromstring
to handle some more failed cases. words
,FakeItem
removed from package namespace
0.1.4 - 2021-03-01
- Documentation was updated to include code formatting and within-package hyperlinks (thanks to pdoc)
- the variable name of the output of
seedir.seedir()
andseedir.fakedir()
was renamed fromrfs
tos
0.1.3 - 2020-12-31
- Code block examples added to docstrings, following this issue
0.1.2 - 2020-11-28
- new
mask
parameter for functionally filtering items, used byseedir.seedir
,seedir.FakeDir.seedir
, andseedir.fakedir
- test cases for the
mask
parameter
- Updated examples notebook
- Updated documentation
0.1.1 - 2020-11-20
Initial public release of seedir 🎉