-
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
Plans for Package Tooling #1
Comments
Oh haha I just pushed some initial stuff right now |
I certainly agree with And to that I'd like to add |
Ruff is on the list 😄. Agreed on sp-repo-review, I use that frequently. |
I prefer I've been using both for a while now in all of my (typed) projects, and never had any problems with backwards-compatibility or something. |
Great! I'm totally down to use stricter checkers. But we should have the most used ones as part of the CI. We can't force users, whom given the scope of the array-api we hope will be a large and varied audience, to use specific type checkers. |
@jorenham What do you think of the rest of the suggestions? Just compiling the full consensus list up top. |
I'm not very familiar with
Yes please.
Hmm first time I heard of it. I've used pytest-doctestplus in Lmo, which sounds similar. Any idea how these two differ?
100% agree I think it's also important to explicitly state somewhere that we follow the official typing spec, knowing that mypy doesn't always follow it (and has >1000 confirmed bugs at the moment). |
Maybe we should discuss the runtime contents of the package in another issue, and keep this one focussed on the tooling and CI stuff? |
I don't think it has
🎉
pytest-doctestplus used to be in Astropy (which I'm still in). I've used both extensively and can say that
Totally agree. |
I'm not familiar with the walled-garden package layout. But I'm a bit worried that it might be more suitable for larger projects. Because in the early stages of development I can imagine that ssomething like that could become rather annoying, because at that point it's not uncommon to change private stuff into public stuff, and vice-versa. So what do you think about starting with just a since package (with or without a |
SGTM. |
When running on multiple python versions then it already helps. In our case, we're probably gonna want to include big-boy packages like tensorflow and cupy in the testing pipeline, which could slow things down a lot. |
Ok sounds good 👌🏻 |
Sure, then let's start with tox. I'll experiment with |
Oh and perhaps it won't really make a lot of sense to use it in our case, but in case that it does, then |
Big fan of hypothesis. |
Tox + |
and semver for versioning? |
Although... given the date-versioning of the array-api... |
and should we enfore a commit style, like gitmoji or something? |
Yes. |
good point 🤔 We probably don't want to limit outselves to a single array-api version, so I think we can just use our own independent versioning scheme? |
First time I heard of edit: maybe this? |
Spitballing. We probably want to commit to supporting, e.g. 2-versions back + most recent, of the array-api. E.g.
|
I use |
https://github.com/adamchainz/blacken-docs for pre-commit? |
https://github.com/codespell-project/codespell or https://cspell.org for pre-commit? |
I think that the availability of So yea, maybe we do need to maintain different versions. And if we do, then it indeed makes sense to start with the earliest one that can be reasonably typed, and then work our way up. I'm not familiar with https://github.com/meeseeksmachine, but it sounds like something that could be interesting for |
Ah yes it is; I'm actually using it in So that's a 👍🏻 |
Ah. Yes, I think so. Covered 👍 |
Have we covered all the basics? |
I briefly tried mdformat + mdformat-ruff a while back, but it didn't live up to its expectations unfortunately |
Yea I believe so. We can go ahead and do the actual setup now 👍🏻 |
The current |
Do you mind if I force push to main to update the commit message in gitmoji style? |
(I could also undo the commit altogether, and do it over with a PR) |
Sure! A beautiful git history from the start ✨ |
apparently at least one commit is required, so I made it an empty one instead |
@jorenham, what's the min version of the API we want to support? |
I guess 2021? |
What are the set of labels that we want? Maybe start with the full gitmoji set? |
I was just thinking about the labels. But yea, I guess we could try the gitmoji approach? That way we could even automate it if we wanted to |
SGTM! |
I added gitmoji labels. |
I would suggest working on the most recent version first, though |
In terms of backporting code across versions, it's much harder to work backwards than forwards. |
The stuff that will work for v2021 will probably also work with v2024, nut not the other way around. |
... and I guess what I'm trying to say with this; is that we'll also be atarting with the latest version if we start with the first version. But there's of course the chance that when we "arrive" at the latest version, we realize that we need to adjust something in the first "layer" in order for us to add the sprinkles on the top. But because we don't have to worry about backcomp (i.e. because of #1 (comment)), that's not a problem, so we could take bites out of the bottom of cake without issue (ok I'm hungry now). |
I think I get you 😅 I just meant that the most important "end-goal" is compatibility with the latest version of the standard - feel free to do whatever makes sense to get there |
@lucascolley assuming that the array api versions are backwards compatible, then we'll always be compatible with the latest version this way 👌🏻 |
Agreed-Upon Package Plans:
(Read full Issue thread to see discussion)
Configuration/CI/CD:
pyproject.toml
(nosetup.py
orsetup.cfg
)uv
, including in CIhatch
hatch-vcs
src
-layoutpytest
for testssybil
for doctests.tox
(+tox-uv
)pre-commit
sp-repo-review
ruff
(configured in pyproject.toml), not black / isort / pylint / etc.YYYY-MM-minor.bug
main
+ branch-per-version format: e.g.main
,2023-11.2.1
(Original Comment)
Here's a list of my suggestions for this package. @jorenham LMK what you agree with.
Configuration/CI/CD:
pyproject.toml
, nosetup.py
orsetup.cfg
ruff
(configured in pyproject.toml), not black / isort / pylint / etc.uv
, including in CIhatch
andhatch-vcs
pre-commit
Docs:
Package layout:
Package Contents:
Array
. Let's start (pre-release) by not making it parametric, then see what we can do well, e.g. lessons from optype.and the full version contains all the attributes and methods.
Namespace
DType
,Device
, etc.The text was updated successfully, but these errors were encountered: