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

Update dependencies so tests run smoothly on initial clone #127

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

katywarr
Copy link
Contributor

@katywarr katywarr commented Mar 5, 2025

The pytest dependency was missing from the required dependencies so the unit-tests failed after the repo was cloned.
In fixing this, perhaps it's useful to make installation of the project very easy using UV - hence this pull request also proposes a short addition to the README and the incorporation of an associated uv.lock file.

  • Add pytest dependency to pyproject.toml
  • Add uv.lock file for super-easy installation with uv
  • Add a note in the README for newbies to get started quickly

@Jegp
Copy link
Collaborator

Jegp commented Mar 6, 2025

Thank you for the addition. I haven't heard about uv before, but it looks pretty neat.

Currently, your changes would make NIR depending on pytest. I don't think that's wise. That's what the dev_requirements.txt is for. So, please remove pytest from pyproject.toml.

I'm happy to add the uv addition, but I would request that you move the uv description into the documentation. Possibly into the Using NIR, but it may be worth-while adding a page on installation. Of course, that would be a bit more work. Up to you :-)

@katywarr
Copy link
Contributor Author

katywarr commented Mar 6, 2025

Yes, thanks that all makes sense. I'll probably create a separate page on installation as you suggest (it's not too much work). That will also be useful to separate out in case there are other installation instructions that folk want to add in the future.

Good point wrt the dev dependency. Actually, UV has dev dependencies, so I'll try this: https://docs.astral.sh/uv/concepts/projects/dependencies/#development-dependencies.

I'll update the PR changes when I have a moment in the next few days.

@katywarr katywarr force-pushed the fix-pytest-dependency branch from 2483ab4 to 63b8e9c Compare March 6, 2025 18:12
@katywarr
Copy link
Contributor Author

katywarr commented Mar 6, 2025

All done ready for re-review.

Documentation:
I actually updated contributing.md to match the current developer guidance that is already in that file for using pip. It fits best here I think as these are instructions for developers forking the repo, rather than those simply using NIR.

Dependencies:
The development dependencies for uv are now identical to those in dev_requirements.txt (minus the main dependencies). So, pyproject.toml now includes this addition:

[dependency-groups]
dev = [
    "black>=25.1.0",
    "pre-commit>=4.1.0",
    "pytest>=8.3.5",
    "ruff>=0.9.9",
    "sphinx>=7.4.7",
]

@Jegp
Copy link
Collaborator

Jegp commented Mar 26, 2025

Thank you for the additions! It looks great to me. I'll let the tests run and merge it :)

@Jegp Jegp merged commit 7b4a1b5 into neuromorphs:main Mar 26, 2025
4 checks passed
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.

2 participants