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

Ignore non-test directories #5720

Merged
merged 3 commits into from Jan 28, 2022
Merged

Ignore non-test directories #5720

merged 3 commits into from Jan 28, 2022

Conversation

gjoseph92
Copy link
Collaborator

Supersedes #5719. This does make pyetst work on the root distributed directory.

cc @ian-r-rose @jrbourbeau

  • Tests added / passed
  • Passes pre-commit run --all-files

@ian-r-rose
Copy link
Collaborator

I like this solution over doing things like skip or changing names. distributed doesn't currently have a pyproject.toml, but it could. Going forward, putting configuration for tooling there would help prevent a proliferation of different one-off config files.

@gjoseph92
Copy link
Collaborator Author

Good point about pyproject.toml. I have taken the initiative to add one! Hopefully this will lower the barrier to adding other stuff in there too.

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Today we use setup.cfg for this type of configuration. I don't know much about pyproject.toml, there may be good reasons for preferring it over setup.cfg, but I'd prefer not to split configuration between both pyproject.toml and setup.cfg files. For the time being could you update

distributed/setup.cfg

Lines 41 to 42 in dbc5b0f

[tool:pytest]
addopts = -v -rsxfE --durations=20 --color=yes

instead?

pyproject.toml Outdated
@@ -0,0 +1,2 @@
[tool.pytest.ini_options]
addopts = "--ignore=continuous_integration --ignore=docs --ignore=.github"
Copy link
Member

Choose a reason for hiding this comment

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

We're not testing code snippets in the docs today, but wanted to flag that --ignore=docs may need to be removed if we want to start that level of testing

@gjoseph92
Copy link
Collaborator Author

Usage of setup.cfg is not recommended unless for very simple use cases. .cfg files use a different parser than pytest.ini and tox.ini which might cause hard to track down problems. When possible, it is recommended to use the latter files, or pyproject.toml, to hold your pytest configuration.

https://docs.pytest.org/en/6.2.x/customize.html#setup-cfg

@jrbourbeau
Copy link
Member

That's good to know. Does adding these ignores to our existing setup.cfg work in this case? I'd still prefer to not have some pytest configuration in setup.cfg and some in pyproject.toml. I think this PR should move over all the settings to pyproject.toml or keep them in setup.cfg for the time being (if they work)

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Thanks @gjoseph92! This should be good to merge once CI finishes up

Also, I opened #5725 to follow up on moving to pyproject.toml

@jrbourbeau jrbourbeau merged commit 7ed1f1a into dask:main Jan 28, 2022
gjoseph92 added a commit to gjoseph92/distributed that referenced this pull request Feb 1, 2022
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.

None yet

3 participants