Skip to content

Commit

Permalink
Merge pull request #577 from bashtage/formalize-pip-pre-testing
Browse files Browse the repository at this point in the history
CI: Formalize pip pre testing
  • Loading branch information
bashtage authored Jan 4, 2024
2 parents 1550352 + 1040ede commit a4636e7
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 59 deletions.
53 changes: 0 additions & 53 deletions appveyor.yml

This file was deleted.

2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ variables:
TEST_INSTALL: false
MPLBACKEND: agg
coverage: true
test.install: false
pip.pre: false

jobs:
- template: ci/azure_template_posix.yml
Expand Down
15 changes: 12 additions & 3 deletions ci/azure_template_posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
XARRAY: 22.0
python310_latest:
python.version: '3.10'
FORMULAIC: 1.0.1
XXHASH: true
python311_latest:
python.version: '3.11'
Expand All @@ -69,7 +70,7 @@ jobs:
LM_TEST_COPY_ON_WRITE: 1
python312_pre:
python.version: '3.12'
PIP_PRE: true
pip.pre: true
maxParallel: 10

steps:
Expand Down Expand Up @@ -119,7 +120,7 @@ jobs:
python -c "import linearmodels; linearmodels.test(['-n', 'auto', '--junitxml=../junit/test-results.xml'])"
popd
displayName: 'Run tests (site-packages)'
condition: eq(variables['test.install'], 'true')
condition: and(eq(variables['test.install'], 'true'), ne(variables['pip.pre'], 'true'))
- script: |
echo "Testing editable install"
Expand All @@ -129,7 +130,15 @@ jobs:
echo pytest -m "${PYTEST_PATTERN}" --junitxml=junit/test-results.xml -n auto --durations=25 ${COVERAGE_OPTS} linearmodels/tests
pytest -m "${PYTEST_PATTERN}" --junitxml=junit/test-results.xml -n auto --durations=25 ${COVERAGE_OPTS} linearmodels/tests
displayName: 'Run tests (editable)'
condition: ne(variables['test.install'], 'true')
condition: and(ne(variables['test.install'], 'true'), ne(variables['pip.pre'], 'true'))
- script: |
echo "Testing pip-pre"
echo pytest -m "${PYTEST_PATTERN}" --junitxml=junit/test-results.xml -n auto --durations=25 ${COVERAGE_OPTS} linearmodels/tests
pytest -m "${PYTEST_PATTERN}" --junitxml=junit/test-results.xml -n auto --durations=25 ${COVERAGE_OPTS} linearmodels/tests
displayName: 'Run tests (pip pre)'
condition: eq(variables['pip.pre'], 'true')
continueOnError: true
- task: PublishTestResults@2
inputs:
Expand Down
6 changes: 5 additions & 1 deletion doc/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set SOURCEDIR=source
set BUILDDIR=build
set SPHINXPROJ=linearmodels
set SPHINXOPTS=
set PYDEVD_DISABLE_FILE_VALIDATION=1

if "%1" == "" goto help

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

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
set PYDEVD_DISABLE_FILE_VALIDATION=
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
set PYDEVD_DISABLE_FILE_VALIDATION=

:end
popd
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ nbformat
matplotlib
seaborn
mypy_extensions>=0.4
mistune<2
# mistune<2
5 changes: 5 additions & 0 deletions doc/source/changes/5.0.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Verion 5.4
----------
- Compatability with NumPy 2
- Compatability with recent pandas releases

Version 5.3
-----------
- Bumped the minimum formulaic to 0.6.5.
Expand Down
4 changes: 3 additions & 1 deletion linearmodels/panel/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1878,7 +1878,9 @@ def fit(
if self._constant:
assert isinstance(self._constant_index, int)
self._constant_index = int(
np.argwhere(np.array(retain) == self._constant_index)
np.squeeze(
np.argwhere(np.array(retain) == self._constant_index)
)
)

# Adjust exog
Expand Down

0 comments on commit a4636e7

Please sign in to comment.