NERC-CEH / plankton_ml

A project for image processing and analysis pipelines for plankton sampling
GNU General Public License v3.0
0 stars 1 forks source link

Layout and minimal changes #23

Closed jmarshrossney closed 2 months ago

jmarshrossney commented 3 months ago

This PR collects a small handful of changes which I'm hoping are sufficiently non-contentious to bundle together.

  1. Switch to a src/ layout.
  2. Add the [build-system] table to pyproject.toml (using setuptools for now)
  3. Remove the part of prepare_image that moves the tensor to the default cuda device if available
  4. Filter out deprecation warnings from the pytest output since these are all coming from the fact that we are using an old PyTorch version

As a side note, the main motivation was that I was experiencing a few problems just pip installing the package in editable mode, which made me feel like I was 20 again and unable to figure out why I couldn't import the package I'd just installed. Completing the pyproject.toml and changing to src/ fixed these issues today, as it happened.

jmarshrossney commented 3 months ago

Of negligible importance to us but the change to README.md was based on reading this: https://docs.pytest.org/en/latest/explanation/pythonpath.html#pytest-vs-python-m-pytest

metazool commented 3 months ago

Super happy with this, ideally want to merge #22 first so there aren't conflicts over layout, it's a good trigger to nudge the relevant people