Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 35 additions & 18 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,24 +1,41 @@
Next release
============
v1.9rc1
=======

* Require Python 3.10 or newer.
* Support pandas 2 and 3, NumPy 2, and current PyTables, with minimum
versions of pandas 1.5, NumPy 1.21, PyTables 3.8, and PyToolz 0.12.
* Behavior change under pandas 3: with ``copy_col=False``, pandas's
2026/09/16

Release candidate for v1.9, the first release since v1.8 in October 2022.
It restores compatibility with current versions of Python, Pandas, and
NumPy, modernizes the packaging and continuous integration, and fixes two
long-standing issues.

* Requires Python 3.10 or later, and is tested on Python 3.10 through 3.14
with NumPy 1.21 through 2.x, Pandas 1.5 through 3.x, PyTables 3.8+, and
PyToolz 0.12+. Drops support for Python 2 and for Python 3.9 and earlier
(#62).
* Behavior change under Pandas 3: with ``copy_col=False``, Pandas's
mandatory copy-on-write means that modifying a column returned from a
table no longer writes through to the table's underlying DataFrame.
Use ``update_col`` or ``update_col_from_series`` to change table values.
* Modernize Python packaging and continuous integration: tests run on
Linux, macOS, and Windows, and every pull request also builds and
installs the package and builds the documentation.
* Automate publishing to PyPI from GitHub releases using Trusted
Publishing, and document the contribution and release process.
* ``to_frame(columns)`` now returns columns in the order requested,
whether they are local or registered columns (previously the order
of registered columns varied from call to call), and
``merge_tables(columns=...)`` resolves columns in the order given.
Use ``update_col`` or ``update_col_from_series`` to change table values
(#62).
* ``to_frame(columns)`` returns columns in the order requested, whether
they are local or registered columns; since v1.4 the order of registered
columns had varied from call to call. ``merge_tables(columns=...)``
likewise resolves columns in the order given (#57, #68).
* ``broadcast`` accepts lists of column names for ``cast_on`` and
``onto_on``, for merges on multiple columns, as ``pandas.merge`` does.
``onto_on``, for merges on multiple columns, as ``pandas.merge`` does
(#37, #68).
* Moves package metadata to ``pyproject.toml`` and removes ``setup.py``
(#62).
* Replaces the 2022 GitHub Actions workflows with continuous integration
that tests the minimum and current dependency versions on Linux, macOS,
and Windows, checks code quality, validates the built distributions, and
builds the documentation with warnings as errors (#62, #66). Releases are
built, verified, and published to PyPI by a GitHub Actions workflow using
Trusted Publishing (#67).
* ``main`` is now the integration branch; ``dev`` is retired (#62).
* Documents the project's scope and status in the README (#64).
* Thanks to Paul Waddell for the compatibility, packaging, and CI work, and
to Jeff Doyle for the multi-column broadcast report.

v1.8
====
Expand Down Expand Up @@ -67,7 +84,7 @@ v1.4.0
======

* Modify `merge_tables` behavior in case of identical column names in multiple
tables
tables
* Add `cast` option to `update_col_from_series` to handle type mismatches
* Updated logic for outputting HDF5 files
* Add file compression to `run` and `write_tables`
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022, UrbanSim Inc. All rights reserved.
Copyright (c) 2014-2026, UrbanSim Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@

# General information about the project.
project = 'Orca'
copyright = '2022, UrbanSim Inc'
copyright = '2014-2026, UrbanSim Inc.'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.8'
version = '1.9'
# The full version, including alpha/beta/rc tags.
release = '1.8'
release = '1.9rc1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
20 changes: 10 additions & 10 deletions docs/source/core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ to register those relationships::
orca.broadcast(cast='c', onto='d', cast_index=True, onto_on='c_id')

The syntax is similar to that of the
`pandas merge function <http://pandas.pydata.org/pandas-docs/stable/generated/pandas.merge.html#pandas.merge>`__,
`pandas merge function <https://pandas.pydata.org/docs/reference/api/pandas.merge.html>`__,
and indeed ``merge`` is used behind the scenes.
Once the broadcasts are defined, use the
:py:func:`~orca.orca.merge_tables` function to get a
Expand Down Expand Up @@ -153,7 +153,7 @@ going into the merge so you can limit which columns end up in the final table.
they are in the ``columns=`` list.)

.. note:: :py:func:`~orca.orca.merge_tables` calls
`pandas.merge <http://pandas.pydata.org/pandas-docs/stable/generated/pandas.merge.html#pandas.merge>`__
`pandas.merge <https://pandas.pydata.org/docs/reference/api/pandas.merge.html>`__
with ``how='inner'``, meaning that only items that
appear in both tables are kept in the merged table.

Expand Down Expand Up @@ -435,7 +435,7 @@ You start pipelines by calling the :py:func:`~orca.orca.run` function and
listing which steps you want to run.
Calling :py:func:`~orca.orca.run` with just a list of steps,
as in the above example, will run through the steps once.
To run the pipeline over some a sequence, provide those values as a sequence
To run the pipeline over a sequence, provide those values as a sequence
to :py:func:`~orca.orca.run` using the ``iter_vars`` argument.

The ``iter_var`` injectable stores the current value from the ``iter_vars`` argument to :py:func:`~orca.orca.run` function.
Expand All @@ -447,8 +447,8 @@ stored in that order.

In [77]: @orca.step()
....: def print_year(iter_var,iter_step):
....: print '*** the iteration value is {} ***'.format(iter_var)
....: print '*** step number {0} is named {1} ***'.format(iter_step.step_num, iter_step.step_name)
....: print('*** the iteration value is {} ***'.format(iter_var))
....: print('*** step number {0} is named {1} ***'.format(iter_step.step_num, iter_step.step_name))
....:

In [78]: orca.run(['print_year'], iter_vars=range(2010, 2015))
Expand Down Expand Up @@ -570,7 +570,7 @@ Archiving Data
An option to the :py:func:`~orca.orca.run` function is to have
it save table data at set intervals.
Tables (and only tables) are saved as DataFrames_ to an HDF5 file via pandas'
`HDFStore <http://pandas.pydata.org/pandas-docs/stable/io.html#hdf5-pytables>`__
`HDFStore <https://pandas.pydata.org/docs/user_guide/io.html#hdf5-pytables>`__
feature. If Orca is running only one loop the tables are stored
under their registered names. If it is running multiple iterations the tables are
stored under names like ``'<iter_var>/<table name>'``.
Expand All @@ -590,7 +590,7 @@ the names of registered variables in order to
inject variables when evaluating functions.
For that reason, it's important that variables be registered with names
that are also
`valid Python variables <http://en.wikibooks.org/wiki/Python_Beginner_to_Expert/Native_Types>`__.
`valid Python variables <https://en.wikibooks.org/wiki/Python_Beginner_to_Expert/Native_Types>`__.

Variable Expressions
~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -712,6 +712,6 @@ API Docs
.. automodule:: orca.orca
:members:

.. _DataFrame: http://pandas.pydata.org/pandas-docs/stable/dsintro.html#dataframe
.. _DataFrames: http://pandas.pydata.org/pandas-docs/stable/dsintro.html#dataframe
.. _Series: http://pandas.pydata.org/pandas-docs/stable/dsintro.html#series
.. _DataFrame: https://pandas.pydata.org/docs/user_guide/dsintro.html#dataframe
.. _DataFrames: https://pandas.pydata.org/docs/user_guide/dsintro.html#dataframe
.. _Series: https://pandas.pydata.org/docs/user_guide/dsintro.html#series
18 changes: 9 additions & 9 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ over a set of input data.
Goals
~~~~~

Orca has explit goals of flexibility, transparency, lazy execution,
Orca has explicit goals of flexibility, transparency, lazy execution,
and encouraging good practices. Those goals are achieved by:

* Flexibility
Expand Down Expand Up @@ -49,7 +49,7 @@ via decorators.
Orca calls these functions by matching their arguments to other registered
data.
(This format is heavily inspired by
`pytest's fixtures <http://pytest.org/latest/fixture.html#fixture>`__.)
`pytest's fixtures <https://docs.pytest.org/en/stable/how-to/fixtures.html>`__.)
The main components of a pipeline include:

* Steps
Expand Down Expand Up @@ -119,7 +119,7 @@ Orca offers some conveniences for streamlining the construction of pipelines:
Installation
------------

Orca requires Pandas, PyTables, and PyToolz, which will be installed automatically if they are not already present in your Python environment.
Orca requires Python 3.10 or later, and depends on Pandas, PyTables, and PyToolz, which will be installed automatically if they are not already present in your Python environment.


You can install Orca with pip::
Expand All @@ -135,7 +135,7 @@ Links
-----

* `GitHub <https://github.com/udst/orca>`__
* `PyPi <https://pypi.python.org/pypi/orca>`__
* `PyPI <https://pypi.org/project/orca/>`__

Contents
--------
Expand All @@ -154,8 +154,8 @@ Indices and tables
* :ref:`modindex`
* :ref:`search`

.. _Pandas: http://pandas.pydata.org/
.. _UrbanSim: http://udst.github.io/urbansim/
.. _DataFrame: http://pandas.pydata.org/pandas-docs/stable/dsintro.html#dataframe
.. _DataFrames: http://pandas.pydata.org/pandas-docs/stable/dsintro.html#dataframe
.. _Series: http://pandas.pydata.org/pandas-docs/stable/dsintro.html#series
.. _Pandas: https://pandas.pydata.org/
.. _UrbanSim: https://udst.github.io/urbansim/
.. _DataFrame: https://pandas.pydata.org/docs/user_guide/dsintro.html#dataframe
.. _DataFrames: https://pandas.pydata.org/docs/user_guide/dsintro.html#dataframe
.. _Series: https://pandas.pydata.org/docs/user_guide/dsintro.html#series
2 changes: 1 addition & 1 deletion orca/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.9.dev3"
__version__ = "1.9rc1"

from .orca import *

Expand Down
2 changes: 1 addition & 1 deletion orca/orca.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Orca
# Copyright (C) 2022 UrbanSim Inc.
# Copyright (C) 2014-2026 UrbanSim Inc.
# See full license in LICENSE.

import logging
Expand Down
2 changes: 1 addition & 1 deletion orca/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Orca
# Copyright (C) 2022 UrbanSim Inc.
# Copyright (C) 2014-2026 UrbanSim Inc.
# See full license in LICENSE.
2 changes: 1 addition & 1 deletion orca/tests/test_mergetables.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Orca
# Copyright (C) 2022 UrbanSim Inc.
# Copyright (C) 2014-2026 UrbanSim Inc.
# See full license in LICENSE.

import pandas as pd
Expand Down
2 changes: 1 addition & 1 deletion orca/tests/test_orca.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Orca
# Copyright (C) 2022 UrbanSim Inc.
# Copyright (C) 2014-2026 UrbanSim Inc.
# See full license in LICENSE.

import os
Expand Down
2 changes: 1 addition & 1 deletion orca/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Orca
# Copyright (C) 2022 UrbanSim Inc.
# Copyright (C) 2014-2026 UrbanSim Inc.
# See full license in LICENSE.

from .utils import *
2 changes: 1 addition & 1 deletion orca/utils/logutil.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Orca
# Copyright (C) 2022 UrbanSim Inc.
# Copyright (C) 2014-2026 UrbanSim Inc.
# See full license in LICENSE.

import contextlib
Expand Down
2 changes: 1 addition & 1 deletion orca/utils/testing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Orca
# Copyright (C) 2022 UrbanSim Inc.
# Copyright (C) 2014-2026 UrbanSim Inc.
# See full license in LICENSE.

"""
Expand Down
2 changes: 1 addition & 1 deletion orca/utils/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Orca
# Copyright (C) 2022 UrbanSim Inc.
# Copyright (C) 2014-2026 UrbanSim Inc.
# See full license in LICENSE.
2 changes: 1 addition & 1 deletion orca/utils/tests/test_testing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Orca
# Copyright (C) 2022 UrbanSim Inc.
# Copyright (C) 2014-2026 UrbanSim Inc.
# See full license in LICENSE.

import pandas as pd
Expand Down