- Analyzers that can't be loaded properly are now skipped when restoring application state (e.g. if the video or design file has been moved since the last run)
- Added a 404 page with instructions in case application is run without UI
- Other minor fixes
- Triumphant return of the readthedocs page
- Tutorial
- Major step forward documenting the Python library, along with multiple tiny tweaks to the Python codebase. Mainly cleaned up & removed unused methods.
- Fix disappearing
feature_parametersin new analysis dialog and on the configure page - Add CLI commands to interact with the git repository
- For end users that may not want to deal with git
- Throwback to the "mandatory update system" of the olden days: update to new release versions if any are available, but when you actually want to.
- Setup ~ CLI commands
- Deployment scripts execute
shapeflow/setup/post-deploy.pyas a setup step - :class:`shapeflow.cli.GetCompiledUi`
- :class:`shapeflow.cli.SetupCairo`
- :class:`shapeflow.cli.Declutter`
- Deployment scripts execute
- Make
cairoan optional dependency- No longer depend on
OnionSVG; design file rendering is now handled by :class:`shapeflow.design.onions.Peeler` and :class:`shapeflow.design.render.Renderer`. - SVG layer operations (
lxml) are decoupled from rendering - Renderers are selected based on the system configuration:
cairois still the go-to option, but we can now fall back onWand(ImageMagick) and the commandline interface of a Windows installation of Inkscape.
- No longer depend on
- Fix
tkinterdialog windows not appearing on Windowstkintercan't handle not being in the main thread, which was the case in the "updated" version of :mod:`shapeflow.util.filedialog`.- Should not have deprecated subprocess-based filedialog script; it was added in the first place to solve this issue.
- Made subprocess-based file dialogs complain on cancel / error; this bug stayed unnoticed because they used to be silent about it.
Add frontend tests
- And also some general clean-up and fixes in the process
Deprecate caching contexts and related functionality
- We’re assuming that caching will never be performed in advance of an analysis. Instead, we rely on caching during an analysis to speed up any subsequent analyses.
Separate internal routing from general
Flaskrouting- API routes are organised based on :class:`shapeflow.core.Dispatcher`
- :class:`~shapeflow.core.Dispatcher` instances map addresses to :class:`~shapeflow.core.Endpoint` instances
- Nested :class:`~shapeflow.core.Dispatcher`s include the addresses of any child :class:`~shapeflow.core.Dispatcher` instances in their own address space
- The top-level :class:`~shapeflow.core.Dispatcher` has a flat address space of all endpoints, which it uses to resolve requests
- The Flask server delegates requests to this top-level
:class:`~shapeflow.core.Dispatcher` for addresses
starting with
"/api/"
Expose :class:`~shapeflow.core.Endpoint` instances with own :func:`~shapeflow.core.Endpoint.expose` method instead of global function
Deprecate
RootInstance/BackendInstance- Implementation should not care about routing
Note
This means that methods of
BackendInstancesubclass instances nested in :class:`~shapeflow.video.VideoAnalyzer` can no longer be exposed at :class:`~shapeflow.core.Endpoint` instances. Only methods of objects directly associated with :class:`~shapeflow.core.Dispatcher` instances can be exposed.More sensible API structure
- Global top-level API at :data:`shapeflow.api.api`
- Group related functionality
api: general stuffapi.fs: dealing with files and directoriesapi.cache: dealing with the cacheapi.db: dealing with the databaseapi.va: dealing with analyzersapi.va.<id>: dealing with a specific analyzer
Open analyzers are handled by new :class:`~shapeflow.core.Dispatcher` instances
- Analyzer methods should be exposed with the placeholder
:class:`~shapeflow.core.Dispatcher` at
api.va.__id__- By themselves, methods exposed in this way can’t be invoked since they don’t have an instance yet
- New analyzers are opened from
:class:`~shapeflow.main._VideoAnalyzerManager` and given an
id- Use shorter
idstrings for URL readability - Associate newly instantiated
:class:`~shapeflow.video.VideoAnalyzer` with a new
:class:`~shapeflow.core.Dispatcher` instance at
api.va.<id> - This :class:`~shapeflow.core.Dispatcher`, binds methods exposed in
api.va.__id__to the :class:`~shapeflow.video.VideoAnalyzer` instance - Now these methods can be invoked
when requested by
/api/va/<id>/<endpoint>
- Use shorter
- Included in top-level address space at launch to reduce address resolution overhead
- Analyzer methods should be exposed with the placeholder
:class:`~shapeflow.core.Dispatcher` at
Mirror API structure in frontend
api.js
- Subcommands to divide up the functionality of the library.
- Implemented to make accessing backend schemas easier when testing the
frontend; instead of starting the whole server,
run
sf.py dump <path>. The server is now a subcommand,serve. - Potentially useful commands to add in the future
analyzecould run a single analysis as specified in a .json filecheckoutcould set the repository to a specific versionsetupcould replace in-repo setup scripts
- It may also be interesting to make these commands accessible from the frontend
- Implemented to make accessing backend schemas easier when testing the
frontend; instead of starting the whole server,
run
- Some major naming changes
- Entry point script
shapeflow.pybecomessf.py - Server-related stuff renamed from
maintoserver
- Entry point script
- Tutorials and high-level documentation
The first year of development was at isimple, named after the technology/the team that used it for some reason.
Because the original repository was a bit too large, its git history was rewritten after moving to shapeflow. The old repository is still up to preserve this history and to support legacy deployment scripts.
Removed...
- Compiled JavaScript from
ui/dist/ - An accidentally huge screenshot, mysteriously named datetime
- An accidentally huge BMP file
- Compiled JavaScript from
All in all, the repo went from almost 30MB to about 6MB
bfg --delete-folders dist . bfg --delete-files datetime . bfg --delete-files img.bmp . git reflow expire --expire=now --all git --prune=now --aggressive