-
Notifications
You must be signed in to change notification settings - Fork 1
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
Developer tools #8
Conversation
- Minimum Python set to 3.8 for consistency with sklearn (see #4) - Move package version into __init__.py for bumpversion compat - Apply black and isort to setup.py
- Add all developer tool dependencies to setup.py - Add README with developer documentation - Add generated cache and coverage files to gitignore - Add pre-commit configuration
@aazuspan, again you are way ahead of me, but this is great stuff for me to be exposed to. Pre-commits, Github actions, and bumpversion/twine are all very new to me, so I will do some background work to get up to speed on those. But I have a few comments/edits to share at this point:
|
Interesting... I don't think I added anything that could override your global VSCode settings, so I'm at a loss. In the pre-commit config, I just use black with its default line length of 88, and then set
Sounds good! I'll clean that up a little.
I haven't used a src layout before, but I'm finding there are some nice advantages to it. I've definitely had bugs that resulted from my tests running on an old installed version of the package rather than the current source code, which the src layout prevents by forcing you to use an editable install. I'm happy sticking with it, unless we encounter problems down the line.
I would certainly still consider you the primary author both in that we're building the code off of your past work and that you'll most likely be involved in maintaining it beyond my contributions, but I do appreciate the consideration. I don't believe there's any clean way to handle multiple authors in a
I made the Github action editable originally without thinking about it, then realized it would never need to be editable and removed it for clarity. I don't think it would have caused any problems though. I did mention I sometimes play fast and loose with commits...
Good question. When |
This was me. I had competing formatters with realizing it. I stripped my
Sounds good, I agree
I agree with all of this (other than your humility ;)). I've used
I think I'm following all the logic here. Is the more accepted standard now?
If you didn't have bumpversion in a dependency/tool, would you just manually change the version in
I don't foresee branching off I've tested out pre-commit and got it to intentionally fail on a commit, so that's fun to see. Do we need to worry that we have similar
But based on what I read, pre-commit isn't using all the plug-ins configured, so it's probably a non-issue. I guess the next question is whether there are any flake8 plugins that we do want to use in the pre-commit? Last question: You mentioned setting up I think that's the extent of my usefulness for a review. I'm comfortable merging if you are (other than that small |
Good idea!
Yes, that's my understanding. I don't fully grasp the benefit over a
Manual, at least until we switched to a
Good point! My understanding is that
Probably! I was originally going to add - repo: https://github.com/pycqa/flake8
rev: '6.0.0'
hooks:
- id: flake8
args: [--max-line-length, "88"]
additional_dependencies:
- flake8-docstrings Got any favorites you think we should add?
Yes, I went back and forth on that, but that was my thinking. Of course |
@aazuspan, finally responding to the last remaining bits on this.
Other than
Absolutely. I've found The |
Glad to hear that's not just me!
I'll add EDIT: That was easier than expected! I'm currently using my |
This looks great, @aazuspan. Couple quick follow-ups:
|
Good question... Looking at the plans, my impression was that we'd be fine with the free tier since we're working on a public repo, but they do make it sound like maybe you need a Team plan for using it in an organization repo...
Obviously it's working now, so maybe there's a caveat there. It does mention...
So maybe as long as it's just the two of us contributing we're okay without a team plan? Personally, I'd probably try just using it with a different email and if that won't work long-term, maybe we just pull it out of the CI and run it locally with personal accounts? |
Excellent, I've gone ahead and created a new Google account, signed up for a free account on Sourcery, and changed |
This PR would close #4 by setting up developer tooling and CI. Specifically, it:
3.8
black
andisort
for formattingflake8
for lintingmypy
for type-checking (currently running but doing nothing)pre-commit
to run all formatting, linting, and type-checkingpytest-cov
for measuring test coveragebumpversion
andtwine
for releasing in the futurepytest
on all supported Python versions for all pushes and PRsDespite all the commit noise (took a few tries to get all the CI configuration right), this shouldn't have made any functional changes to source code, so hopefully it should be a little easier to dig through than the last PR.
One thing I'm still on the fence about is the best way to integrate this branch. For simplicity, I'm proposing we merge it into
fb_add_estimators
since that's the only branch that's in good enough shape to pass tests and where we're likely to be focusing development, but if you foresee that being an issue (i.e. not having access to the developer tooling if we make a new branch off ofdevelop
before mergingfb_add_estimators
) we could re-consider. I'm open to suggestions there!