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

Read config from pyproject.toml #152

Merged
merged 5 commits into from Oct 21, 2021
Merged

Read config from pyproject.toml #152

merged 5 commits into from Oct 21, 2021

Conversation

dbatten5
Copy link
Contributor

add support for loading and reading from an autoimport config section in a pyproject.toml file - the first part of the work needed for #148. i thought this could go in first as its own pr, then the actual config option needed for #148 could follow in another pr, but if you prefer it as one pr then happy to go ahead with that.

4cd0231
Add utils module and pyproject utils

1a38f61
Add AutoImportConfig class to find and parse config files

0e831fd
Add types-toml package for mypy

i can see the github workflow is failing at the mypy stage. i believe this is due to mypy needing a types-toml package, not quite sure where i need to define this though

Checklist

  • Add test cases to all the changes you introduce
  • Update the documentation for the changes

@dbatten5 dbatten5 changed the title Read config from pyproject Read config from pyproject.toml Oct 15, 2021
src/autoimport/config.py Outdated Show resolved Hide resolved
Copy link
Owner

@lyz-code lyz-code left a comment

Choose a reason for hiding this comment

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

Super awesome contribution! thank you so much. Your code is beautiful and follows the project style flawlessly.

It makes sense to me too to add the functionality in two separate pull requests, although if you change your mind and want to add everything here it's OK too

src/autoimport/config.py Outdated Show resolved Hide resolved
src/autoimport/config.py Show resolved Hide resolved
tests/unit/test_config.py Outdated Show resolved Hide resolved
requirements-dev.in Show resolved Hide resolved
tests/unit/test_utils.py Show resolved Hide resolved
@lyz-code
Copy link
Owner

Also one question, I don't know why I don't see the CI results in this PR, I had to navigate to the Actions tab. Is it only me? or you don't see them either?

It's weird because it didn't gave me the option to enable the CI actions, which usually does when a new contributor opens a PR

@dbatten5
Copy link
Contributor Author

Also one question, I don't know why I don't see the CI results in this PR, I had to navigate to the Actions tab. Is it only me? or you don't see them either?

It's weird because it didn't gave me the option to enable the CI actions, which usually does when a new contributor opens a PR

hmm yeah i don't see it either, strange

tests/unit/test_config.py Outdated Show resolved Hide resolved
tests/unit/test_utils.py Show resolved Hide resolved
@lyz-code
Copy link
Owner

Thank you so much @dbatten5 for the contribution. I'll wait until a real use case is implemented in order to make a new release

@lyz-code lyz-code merged commit 21eb2bd into lyz-code:master Oct 21, 2021
Jasha10 added a commit to Jasha10/autoimport that referenced this pull request Nov 21, 2021
@Jasha10 Jasha10 mentioned this pull request Nov 21, 2021
2 tasks
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

2 participants