Skip to content

Commit

Permalink
Merge pull request #569 from bashtage/refresh
Browse files Browse the repository at this point in the history
Refresh files and fix packaging warnings
  • Loading branch information
bashtage authored Dec 1, 2023
2 parents 39816fa + 7640068 commit ab3335e
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 71 deletions.
9 changes: 2 additions & 7 deletions examples/asset-pricing_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"metadata": {},
"outputs": [],
"source": [
"data.iloc[:, 6:] = data.iloc[:, 6:].values - data[[\"RF\"]].values"
Expand Down Expand Up @@ -417,7 +412,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.12.0"
},
"pycharm": {
"stem_cell": {
Expand Down
2 changes: 1 addition & 1 deletion examples/asset-pricing_formulas.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.12.0"
},
"pycharm": {
"stem_cell": {
Expand Down
2 changes: 1 addition & 1 deletion examples/iv_absorbing-regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.12.0"
},
"pycharm": {
"stem_cell": {
Expand Down
2 changes: 1 addition & 1 deletion examples/iv_advanced-examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.12.0"
},
"nbsphinx": {
"allow_errors": true
Expand Down
2 changes: 1 addition & 1 deletion examples/iv_basic-examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.12.0"
},
"pycharm": {
"stem_cell": {
Expand Down
44 changes: 7 additions & 37 deletions examples/iv_using-formulas.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
Expand All @@ -98,12 +93,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"metadata": {},
"outputs": [],
"source": [
"formula = (\n",
Expand All @@ -115,12 +105,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"metadata": {},
"outputs": [],
"source": [
"iv_res = mod.fit(cov_type=\"robust\")\n",
Expand All @@ -139,12 +124,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"metadata": {},
"outputs": [],
"source": [
"formula = (\n",
Expand All @@ -166,12 +146,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"metadata": {},
"outputs": [],
"source": [
"formula = \"ldrugexp ~ 1 + totchr + female + age + linc + blhisp + hi_empunion\"\n",
Expand All @@ -192,12 +167,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"metadata": {},
"outputs": [],
"source": [
"from linearmodels.iv import compare\n",
Expand All @@ -222,7 +192,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.12.0"
},
"pycharm": {
"stem_cell": {
Expand Down
2 changes: 1 addition & 1 deletion examples/panel_data-formats.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.12.0"
},
"pycharm": {
"stem_cell": {
Expand Down
2 changes: 1 addition & 1 deletion examples/panel_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.12.0"
},
"pycharm": {
"stem_cell": {
Expand Down
2 changes: 1 addition & 1 deletion examples/panel_using-formulas.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.12.0"
},
"pycharm": {
"stem_cell": {
Expand Down
2 changes: 1 addition & 1 deletion examples/system_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.12.0"
},
"pycharm": {
"stem_cell": {
Expand Down
16 changes: 3 additions & 13 deletions examples/system_formulas.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
Expand All @@ -45,12 +40,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"metadata": {},
"outputs": [],
"source": [
"from collections import OrderedDict\n",
Expand Down Expand Up @@ -189,7 +179,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.12.0"
},
"pycharm": {
"stem_cell": {
Expand Down
2 changes: 1 addition & 1 deletion examples/system_three-stage-ls.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.12.0"
},
"pycharm": {
"stem_cell": {
Expand Down
2 changes: 1 addition & 1 deletion linearmodels/tests/asset_pricing/test_formulas.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def test_starting_values_options(data):

def test_escaped_formula(data, model):
def transform(fmla):
names = [f"`{factor.strip().replace('_',' ')}`" for factor in fmla.split("+")]
names = [f"`{factor.strip().replace('_', ' ')}`" for factor in fmla.split("+")]
return " + ".join(names)

formula_factors = transform(FORMULA_FACTORS)
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
xarray>=0.16
mypy>=1.3
black[jupyter]==23.7.0
black[jupyter]==23.11.0
pytest>=7.3.0
isort>=5.12
ipython
Expand Down
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black[jupyter]==23.7.0
black[jupyter]==23.11.0
coverage
flake8
isort
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ Cython>=0.29.34
pyhdfe>=0.1
formulaic>=0.6.5
# versioning
setuptools_scm[toml]>=7.0.0,<8.0.0
setuptools_scm[toml]>=8.0.0,<9.0.0

3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def run_setup(binary: bool = True) -> None:
license="NCSA",
description="Linear Panel, Instrumental Variable, Asset Pricing, and System "
"Regression models for Python",
packages=find_namespace_packages(),
packages=["linearmodels"]
+ [f"linearmodels.{v}" for v in find_namespace_packages("linearmodels")],
package_dir={"linearmodels": "./linearmodels"},
author="Kevin Sheppard",
author_email="[email protected]",
Expand Down

0 comments on commit ab3335e

Please sign in to comment.