Skip to content

Commit a4636e7

Browse files
authored
Merge pull request #577 from bashtage/formalize-pip-pre-testing
CI: Formalize pip pre testing
2 parents 1550352 + 1040ede commit a4636e7

File tree

7 files changed

+28
-59
lines changed

7 files changed

+28
-59
lines changed

appveyor.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

azure-pipelines.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ variables:
1313
TEST_INSTALL: false
1414
MPLBACKEND: agg
1515
coverage: true
16+
test.install: false
17+
pip.pre: false
1618

1719
jobs:
1820
- template: ci/azure_template_posix.yml

ci/azure_template_posix.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
XARRAY: 22.0
5757
python310_latest:
5858
python.version: '3.10'
59+
FORMULAIC: 1.0.1
5960
XXHASH: true
6061
python311_latest:
6162
python.version: '3.11'
@@ -69,7 +70,7 @@ jobs:
6970
LM_TEST_COPY_ON_WRITE: 1
7071
python312_pre:
7172
python.version: '3.12'
72-
PIP_PRE: true
73+
pip.pre: true
7374
maxParallel: 10
7475

7576
steps:
@@ -119,7 +120,7 @@ jobs:
119120
python -c "import linearmodels; linearmodels.test(['-n', 'auto', '--junitxml=../junit/test-results.xml'])"
120121
popd
121122
displayName: 'Run tests (site-packages)'
122-
condition: eq(variables['test.install'], 'true')
123+
condition: and(eq(variables['test.install'], 'true'), ne(variables['pip.pre'], 'true'))
123124
124125
- script: |
125126
echo "Testing editable install"
@@ -129,7 +130,15 @@ jobs:
129130
echo pytest -m "${PYTEST_PATTERN}" --junitxml=junit/test-results.xml -n auto --durations=25 ${COVERAGE_OPTS} linearmodels/tests
130131
pytest -m "${PYTEST_PATTERN}" --junitxml=junit/test-results.xml -n auto --durations=25 ${COVERAGE_OPTS} linearmodels/tests
131132
displayName: 'Run tests (editable)'
132-
condition: ne(variables['test.install'], 'true')
133+
condition: and(ne(variables['test.install'], 'true'), ne(variables['pip.pre'], 'true'))
134+
135+
- script: |
136+
echo "Testing pip-pre"
137+
echo pytest -m "${PYTEST_PATTERN}" --junitxml=junit/test-results.xml -n auto --durations=25 ${COVERAGE_OPTS} linearmodels/tests
138+
pytest -m "${PYTEST_PATTERN}" --junitxml=junit/test-results.xml -n auto --durations=25 ${COVERAGE_OPTS} linearmodels/tests
139+
displayName: 'Run tests (pip pre)'
140+
condition: eq(variables['pip.pre'], 'true')
141+
continueOnError: true
133142
134143
- task: PublishTestResults@2
135144
inputs:

doc/make.bat

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ set SOURCEDIR=source
1111
set BUILDDIR=build
1212
set SPHINXPROJ=linearmodels
1313
set SPHINXOPTS=
14+
set PYDEVD_DISABLE_FILE_VALIDATION=1
1415

1516
if "%1" == "" goto help
1617

@@ -23,15 +24,18 @@ if errorlevel 9009 (
2324
echo.may add the Sphinx directory to PATH.
2425
echo.
2526
echo.If you don't have Sphinx installed, grab it from
26-
echo.http://sphinx-doc.org/
27+
echo.https://sphinx-doc.org/
28+
set PYDEVD_DISABLE_FILE_VALIDATION=
2729
exit /b 1
2830
)
2931

3032
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
33+
set PYDEVD_DISABLE_FILE_VALIDATION=
3134
goto end
3235

3336
:help
3437
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
38+
set PYDEVD_DISABLE_FILE_VALIDATION=
3539

3640
:end
3741
popd

doc/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ nbformat
1111
matplotlib
1212
seaborn
1313
mypy_extensions>=0.4
14-
mistune<2
14+
# mistune<2

doc/source/changes/5.0.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Verion 5.4
2+
----------
3+
- Compatability with NumPy 2
4+
- Compatability with recent pandas releases
5+
16
Version 5.3
27
-----------
38
- Bumped the minimum formulaic to 0.6.5.

linearmodels/panel/model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1878,7 +1878,9 @@ def fit(
18781878
if self._constant:
18791879
assert isinstance(self._constant_index, int)
18801880
self._constant_index = int(
1881-
np.argwhere(np.array(retain) == self._constant_index)
1881+
np.squeeze(
1882+
np.argwhere(np.array(retain) == self._constant_index)
1883+
)
18821884
)
18831885

18841886
# Adjust exog

0 commit comments

Comments
 (0)