Releases: bmeares/Meerschaum
v1.0.1
v1.0.1
- Added
citus
as an official database flavor.
Citus is a distributed database built on PostgreSQL. When anid
column is provided, Meerschaum will callcreate_distributed_table()
on the pipe's ID index. Citus has also been added to the official test suite. - Changed
end
datetimes to be exclusive.
Theend
parameter now generates<
instead of<=
. This shouldn't be a major breaking change but is important to be aware of. - Bumped
rich
to v12.4.4.
v1.0.0
v1.0.0: Mutable at Last
What's New
-
Inserts and Updates
An additional layer of processing separates new rows from updated rows. Meerschaum uses yourdatetime
andid
columns (if you specified anid
column) to determine which rows have changed. Therefore a primary key is not required, as long as thedatetime
column is unique or thedatetime
andid
columns together emulate a composite primary key.Meerschaum will insert new rows as before as well as creating a temporary table (same name as the pipe's target but with a leading underscore). The syncing engine then issues the appropriate
MERGE
orUPDATE
query to update all of the rows in a batch.For example, the following lines of code will result in a table with only 1 row:
>>> import meerschaum as mrsm >>> pipe = mrsm.Pipe('foo', 'bar', columns={'datetime': 'dt', 'id': 'id'}) >>> >>> ### Insert the first row. >>> pipe.sync([{'dt': '2022-06-26', 'id': 1, 'value': 10}]) >>> >>> ### Duplicate row, no change. >>> pipe.sync([{'dt': '2022-06-26', 'id': 1, 'value': 10}]) >>> >>> ### Update the value columns of the first row. >>> pipe.sync([{'dt': '2022-06-26', 'id': 1, 'value': 100}])
-
Data Type Enforcement.
Incoming DataFrames will be cast to the pipe's existing data types, and if you want total control, you can manually specify the Pandas data types for as many columns as you like under thedtypes
key ofPipe.parameters
, e.g.:columns: datetime: timestamp_utc id: station_id dtypes: timestamp_utc: 'datetime64[ns]' station_id: 'Int64' station_name: 'object'
-
Allow for
NULL
inINT
columns.
Before pandas v1.3.0, including a null value in an int column would cast it to a float. Nowpd.NA
has been added and is leveraged in Meerschaum's data type inference system. -
Plugins respect
.gitignore
When publishing a plugin that is contained in a git repository, Meerschaum will parse your.gitignore
file to determine which files to omit. -
Private API Mode.
Require authentication on all API endpoints withstart api --private
. -
No Authentication API Mode.
Adding--no-auth
will disable all authentication on all API endpoints, including the web console.
Bugfixes
-
Plugin packaging
A breaking bug in the process of packaging and publishing Meerschaum plugins has been patched. -
Correct object names in Oracle SQL.
Oracle has finally been brought up to speed with other flavors. -
Multi-module plugins fix.
A small but important fix for multi-module plugins has been applied for their virtual environments. -
Improved virtual environment handling for Debian systems.
Ifvenv
is not available, Meerschaum now better handles falling back tovirtualenv
. -
Allow for syncing lists of dicts.
In addition to syncing a dict of lists,Pipe.sync()
now supports a list of dicts. -
Allow for
begin
to equalNone
forPipe.fetch()
.
The behavior of determiningbegin
fromPipe.get_sync_time()
only takes place whenbegin
is omitted, not when it isNone
. Nowbegin=None
will not add a lower bound to the query.
v0.6.5
v0.6.3 – v0.6.5: Durable Venvs
- Improved durability of the virtual environments.
The functionmeerschaum.utils.packages.manually_import_module()
behaves as expected, allowing you to import different versions of modules. More work needs to be done to see if reintroducing import hooks would be beneficial. - Activate plugin virtual environments for API plugins.
If a plugin uses the@api_plugin
decorator, its virtual environment will be activated before starting the API server. This could potentially cause problems if you have many API plugins with conflicting dependencies, but this could be mitigated by isolating environments withMRSM_ROOT_DIR
. - Changed
name
toimport_name
fordetermine_version()
.
The first argument inmeerschaum.utils.packages.determine_version()
has been renamed fromname
to the less-ambiguousimport_name
. - Shortened the IDs for API environments.
Rather than a long UUID, each instance of the API server will have a randomly generated ID of six letters. Keep in mind it is randomly generated, so please excuse any randomly generated words. - Removed version enforcement for uvicorn and gunicorn.
Uvicorn has a lot of hidden imports, and using our home-brewed import system breaks things. Instead, we now use the defaultattempt_import
behavior ofcheck_update=False
. - Reintroduced
verify packages
tosetup.py
.
Upgrading Meerschaum will check if the virtual environment packages satisfy their required versions. - Moved
pkg_resources
patch from the module-level.
In v0.6.3, the monkey-patching forflask-compress
happened at the module level, but this was quickly moved to a lazy patch in v0.6.4. - Bugfixes
Versions 0.6.3 and 0.6.4 were yanked due to some unforeseen broken features. - Bumped several dependencies.
v0.6.2
v0.6.0 – v0.6.2: Robust Plugins and Beautiful Pipes
Potentially Breaking Changes
- Renamed
meerschaum.connectors.sql.tools
tomeerschaum.utils.sql
.
A dummy module was created at the old import path, but this will be removed in future releases. - Migrated to
meerschaum.core
.
Important class definitions (e.g.User
) have been migrated frommeerschaum._internal
tomeerschaum.core
. You can still importmeerschaum.core.Pipe
asmrsm.Pipe
, however. - Moved
meerschaum.actions.shell
tomeerschaum._internal.shell
.
Finally marked it off the to-do list! Pipe.__str__()
andPipe.__repr__()
now return stylized strings.
This should make reading logs significantly more pleasant. You can add syntax highlighting back to strings containingPipe()
withmeerschaum.utils.formatting.highlight_pipes()
.
New Features
- Plugins
Exposed themeerschaum.Plugin
class, which will make cross-pollinating between plugins simpler. - Uninstall procedure
Plugins
now ship with a properuninstall()
method. - Sharing dependencies
Plugins may now import dependencies from a required plugin's virtual environment. E.g. if pluginfoo
requiresplugin:bar
, andbar
requirespandas
, thenfoo
will be able to importpandas
. - Allow other repos for required plugins.
You can now specify the keys of a required plugin's repo following@
, e.g.foo
may requireplugin:bar@api:main
. - Isolate package cache.
Each virtual environment now uses an isolated cache folder. - Handle multiple versions of packages in
determine_version()
When verifying packages, if multipledist-info
directories are found in a virtual environment, import the package in a subprocess to determine its__version__
. - Specify a target table.
Pipe.target
(Pipe.parameters['target']
) now governs the name of the underlying SQL table.
Bugfixes
- Circular dependency resolver
Multiple plugins may now depend on each other without entering a recursive loop. - Held back
dash_extensions
due to breaking API changes.
Future releases will migrate todash_extensions>1.0.0
. - Fixed
meerschaum.plugins.add_plugin_argument()
.
Refactoring broke something awhile back; more plugins-focused tests are needed. - Fixed an issue with
fontawesome
andmkdocs-material
. - Fixed pickling issue with
mrsm.Pipe
.
Documentation
pdoc
changes.
Added__pdoc__
and__all__
to public modules to simplify the package docs.- Lots of cleanup.
Almost all of the docstrings have been edited.
v0.5.14
v0.5.13
- Key negation when selecting pipes.
Prefix connector, metric, or location with_
to select pipes that do NOT have that key. - Added the
setup plugins
command.
Run the commandsetup plugins
followed by a list of plugins to execute theirsetup()
functions. - Renamed pipes' keys methods function.
The functionmeerschaum.utils.get_pipes.methods()
is renamed tomeerschaum.utils.get_pipes.fetch_pipes_keys()
. - Improved stability for DuckDB.
- Bumped depdenencies.
DuckDB, FastAPI, and Uvicorn have been updated to their latest stable versions.
v0.5.12
- Improved Oracle support.
Oracle SQL has been fully integrated into the testing suite, and critical bugs have been addressed. - Added the
install required
command.
When developing plugins, run the commandinstall required
to install the packages in the plugin'srequired
list into its virtual environment. - Migrated docstrings.
To improve legibility, many docstrings have been rewritten from reST- to numpy-style. This will make browsing docs.meerschaum.io easier.
v0.5.10
- Added the
clear pipes
command.
Users may now delete specific rows within a pipe usingpipe.clear()
. This new method includes support for the--begin
,--end
, and--params
flags. - Changed the default behavior of
--begin
.
The--begin
flag is now only included when the user specifies and no longer defaults to the sync time. - Added
--timeout-seconds
.
The flags--timeout-seconds
and--timeout
make the syncing engine sync each pipe in a separate subprocess and will kill the process if the sync exceeds the number of provided seconds. - Fixed shell argparse bug.
When editing command line arguments within the shell, edge cases no longer cause the shell to exit.
v0.5.9
v0.5.6
v0.5.6
- Added support for
gunicorn
.
Gunicorn may be used to manage API processes with the--production
or--gunicorn
flags. The--production
flag is not default in the Docker image of the API server. - Updated
bootstrap pipes
flow.
The interactive bootstrapping wizard now makes use of the newregister()
plugins API as well as asking for thevalue
column. - Fixed edge cases in
Pipe.filter_existing()
.
Better enforcement ofNaT
as well as--begin
and--end
now reduces edge-case bugs and unexpected behavior. - Re-introduced the
full
Docker image.
Inclusion of thestart gui
command led to the full version of the Docker image requiring GTK and dependencies. Now you can forward the GUI withdocker run -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix bmeares/meerschaum:full start gui
- Fixed plugin installation bug (again).
- Allow for plugins with hyphens in the name.
- Lots of refactoring and tiny bugfixes.