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

Recursively git ignore .log files #701

Merged
merged 2 commits into from
Mar 19, 2021

Conversation

dandye
Copy link
Contributor

@dandye dandye commented Mar 18, 2021

Description of proposed changes

Recursively git ignore all *.log files (update: those created by bash run_tests.sh now cleaned up since #703)

Although #703 cleans up the .log files created by unit tests, this approach future proofs (assuming future .log files aren't desired in src tree).

Related issue(s)

Fixes #700

Testing

Steps taken to test the proposed changes:

Execute run_tests.sh:

(nextstrain)  ddye@cornix  ~/Projects/nextstrain/augur   git_ignore_run_tests_logs  bash run_tests.sh
Running unit tests and doctests with pytest
================================================================================================= test session starts ==================================================================================================
platform darwin -- Python 3.9.2, pytest-5.4.3, py-1.10.0, pluggy-0.13.1 -- /usr/local/opt/[email protected]/bin/python3.9
cachedir: .pytest_cache
rootdir: /Users/ddye/Projects/nextstrain/augur, inifile: pytest.python3.ini, testpaths: augur/, tests/
plugins: mock-2.0.0, cov-2.8.1
collected 241 items

augur/align.py::augur.align.strip_non_reference PASSED
...

Verify the .log files no longer dirty git:

(nextstrain)  ✘ ddye@cornix  ~/Projects/nextstrain/augur   git_ignore_run_tests_logs  git status
On branch git_ignore_run_tests_logs
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	alignment.fasta.to_align.fasta

nothing added to commit but untracked files present (use "git add" to track)

@huddlej huddlej mentioned this pull request Mar 18, 2021
@huddlej
Copy link
Contributor

huddlej commented Mar 18, 2021

Thank you for taking the time to prepare and submit this PR, @dandye! Ignoring *.log files seems like a good idea generally, but I've opted for a solution in #703 that removes the log files after they get created. This way we avoid the unnecessary files completely instead of ignoring them.

If you'd like to revise this PR to ignore all log files, we could definitely merge that.

If you're interested in contributing more to Augur, check out the other open issues and leave a comment on any issue(s) you'd like to tackle.

@dandye
Copy link
Contributor Author

dandye commented Mar 19, 2021

Thank you for taking the time to prepare and submit this PR, @dandye! Ignoring *.log files seems like a good idea generally, but I've opted for a solution in #703 that removes the log files after they get created. This way we avoid the unnecessary files completely instead of ignoring them.

If you'd like to revise this PR to ignore all log files, we could definitely merge that.

If you're interested in contributing more to Augur, check out the other open issues and leave a comment on any issue(s) you'd like to tackle.

Thank you for the nice welcome message!

At your suggestion, I've pushed an update to recursively git ignore all log files, which I believe obviates the .gitignore entry for "slurm logs" (which I've deleted).

@dandye dandye changed the title Git ignore log files created by run_tests Recursively git ignore .log files Mar 19, 2021
Copy link
Contributor

@huddlej huddlej left a comment

Choose a reason for hiding this comment

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

Great! Thanks, @dandye!

@huddlej huddlej merged commit 5492c86 into nextstrain:master Mar 19, 2021
@huddlej huddlej added this to the Next release 11.X.X milestone Mar 19, 2021
@dandye dandye deleted the git_ignore_run_tests_logs branch March 19, 2021 23:09
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.

Running tests produces untracked files
2 participants