Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add files from python tests to .gitignore #8410

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

jameslamb
Copy link
Contributor

Working on #8409, I ran the Python unit tests locally on my Mac tonight.

how I did that (click me)

Created a conda environment.

mamba env create \
    --name xgboost-dev \
        pythoon=3.10 \
        pandas \
        numpy \
        scipy \
        dask \
        distributed \
        hypothesis \
        pytest \
        pytest-cov \
        matplotlib

source activate xgboost-dev

Built the library and ran the tests.

brew install ninja
mkdir build
cd build
cmake \
    -GNinja \
    -DGOOGLE_TEST=ON \
    -DUSE_DMLC_GTEST=ON \
    -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
    ..

ninja -j2

cd ../python-package
python setup.py install

cd ../
pytest tests/python

After doing that, I saw a few untracked files that look like they were generated by the tests, and probably shouldn't be checked into source control.

git status
demo/CLI/regression/featmap.txt
demo/CLI/regression/machine.txt
demo/rank/__MACOSX/
dtest.dmatrix
model-0.json
model-1.json

This PR proposes adding .gitignore rules to prevent them from being checked in.

Thanks very much for your time and consideration.

Copy link
Member

@trivialfis trivialfis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the cleanup!

@trivialfis trivialfis merged commit b1b2524 into dmlc:master Nov 2, 2022
@jameslamb jameslamb deleted the local-dev-gitignore branch January 18, 2023 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants