Repository: conda-forge/staged-recipes
Pull request #29586: Add nuscenes-devkit
Author: login: jeongseok-meta
Labels: name: review-requested
name: python
Created: 2025-04-01T01:45:14Z | Merged: 2025-04-01T16:31:21Z

<!--
Thank you very much for putting in this recipe PR!

This repository is very active, so if you need help with a PR, please let the
right people know. There are language-specific teams for reviewing recipes.

| Language        | Name of review team           |
| --------------- | ----------------------------- |
| python          | `@conda-forge/help-python`    |
| python/c hybrid | `@conda-forge/help-python-c`  |
| r               | `@conda-forge/help-r`         |
| java            | `@conda-forge/help-java`      |
| nodejs          | `@conda-forge/help-nodejs`    |
| c/c++           | `@conda-forge/help-c-cpp`     |
| perl            | `@conda-forge/help-perl`      |
| Julia           | `@conda-forge/help-julia`     |
| ruby            | `@conda-forge/help-ruby`      |
| Rust            | `@conda-forge/help-rust`      |
| Go              | `@conda-forge/help-go`        |
| other           | `@conda-forge/staged-recipes` |

Once the PR is ready for review, please mention one of the teams above in a
new comment. i.e. `@conda-forge/help-some-language, ready for review!`
Then, a bot will label the PR as 'review-requested'.

Due to GitHub limitations, first time contributors to conda-forge are unable
to ping conda-forge teams directly, but you can [ask a bot to ping the team][1]
using a special command in a comment on the PR to get the attention of the
`staged-recipes` team. You can also consider asking on our [Zulip chat][2]
if your recipe isn't reviewed promptly.

[1]: https://conda-forge.org/docs/maintainer/infrastructure.html#conda-forge-admin-please-ping-team
[2]: https://conda-forge.zulipchat.com

All apologies in advance if your recipe PR does not receive prompt attention.
This is a high volume repository and the reviewers are volunteers. Review times
vary depending on the number of reviewers on a given language team and may be days
or weeks. We are always looking for more staged-recipe reviewers. If you are
interested in volunteering, please contact a member of @conda-forge/core.
We'd love to have the help!
-->

Checklist
- [x] Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
- [x] License file is packaged (see [here](https://github.com/conda-forge/staged-recipes/blob/5eddbd7fc9d1502169089da06c3688d9759be978/recipes/example/meta.yaml#L64-L73) for an example).
- [x] Source is from official source.
- [x] Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
- [x] If static libraries are linked in, the license of the static library is packaged.
- [x] Package does not ship static libraries. If static libraries are needed, [follow CFEP-18](https://github.com/conda-forge/cfep/blob/main/cfep-18.md).
- [x] Build number is 0.
- [x] A tarball (`url`) rather than a repo (e.g. `git_url`) is used in your recipe (see [here](https://conda-forge.org/docs/maintainer/adding_pkgs.html#build-from-tarballs-not-repos) for more details).
- [x] GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
- [x] When in trouble, please check our [knowledge base documentation](https://conda-forge.org/docs/maintainer/knowledge_base.html) before pinging a team.



Diff:
diff --git a/recipes/nuscenes-devkit/meta.yaml b/recipes/nuscenes-devkit/meta.yaml
new file mode 100644
index 0000000000000..b81fcdbde6a63
--- /dev/null
+++ b/recipes/nuscenes-devkit/meta.yaml
@@ -0,0 +1,61 @@
+{% set name = "nuscenes-devkit" %}
+{% set version = "1.1.2" %}
+
+package:
+  name: {{ name|lower }}
+  version: {{ version }}
+
+source:
+  url: https://github.com/nutonomy/nuscenes-devkit/archive/v{{ version }}.tar.gz
+  sha256: 2efafb81a7c13b5e4dc278f28636a26f43335929792e80fa70a78a0ad45a9744
+  patches:
+    - patches/0001-Use-os-specific-path-seperator.patch
+
+build:
+  noarch: python
+  number: 0
+  script: {{ PYTHON }} -m pip install ./setup -vv --no-deps --no-build-isolation
+
+requirements:
+  host:
+    - pip
+    - python {{ python_min }}
+    - setuptools
+  run:
+    - python >={{ python_min }}
+    - cachetools
+    - descartes
+    - fire
+    - flake8
+    - flake8-import-order
+    - jupyter
+    - matplotlib <3.6.0
+    - numpy >=1.22.0,<2.0.0
+    - parameterized
+    - pillow >6.2.1
+    - py-opencv >=4.5.4.58
+    - pycocotools >=2.0.1
+    - pyquaternion >=0.9.5
+    - scikit-learn
+    - scipy
+    - shapely <2.0.0
+    - tqdm
+
+test:
+  imports:
+    - nuscenes
+  commands:
+    - pip check
+  requires:
+    - pip
+    - python {{ python_min }}
+
+about:
+  home: https://github.com/nutonomy/nuscenes-devkit
+  summary: The devkit of the nuScenes dataset
+  license: Apache-2.0
+  license_file: LICENSE.txt
+
+extra:
+  recipe-maintainers:
+    - jeongseok-meta
diff --git a/recipes/nuscenes-devkit/patches/0001-Use-os-specific-path-seperator.patch b/recipes/nuscenes-devkit/patches/0001-Use-os-specific-path-seperator.patch
new file mode 100644
index 0000000000000..a10cf927856c2
--- /dev/null
+++ b/recipes/nuscenes-devkit/patches/0001-Use-os-specific-path-seperator.patch
@@ -0,0 +1,25 @@
+From 99b15b3ddede054a14e210da65ee7037bd52140d Mon Sep 17 00:00:00 2001
+From: Jeongseok Lee <jeongseok@meta.com>
+Date: Tue, 1 Apr 2025 08:23:27 -0700
+Subject: [PATCH] Use os specific path seperator
+
+---
+ setup/setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup/setup.py b/setup/setup.py
+index a7acc89..c44f1d8 100644
+--- a/setup/setup.py
++++ b/setup/setup.py
+@@ -32,7 +32,7 @@ def get_dirlist(_rootdir):
+ # Get subfolders recursively
+ os.chdir('..')
+ rootdir = 'python-sdk'
+-packages = [d.replace('/', '.').replace('{}.'.format(rootdir), '') for d in get_dirlist(rootdir)]
++packages = [os.path.relpath(d, rootdir).replace(os.sep, '.') for d in get_dirlist(rootdir)]
+ 
+ # Filter out Python cache folders
+ packages = [p for p in packages if not p.endswith('__pycache__')]
+-- 
+2.49.0.windows.1
+


Reviews:
user: login: ocefpaf
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-01T16:15:21Z
user: login: jeongseok-meta
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-01T16:18:12Z
user: login: ocefpaf
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-01T16:29:16Z

Review comments:
diff_hunk: @@ -0,0 +1,63 @@
+{% set name = "nuscenes-devkit" %}
+{% set version = "1.1.2" %}
+
+package:
+  name: {{ name|lower }}
+  version: {{ version }}
+
+source:
+  url: https://github.com/nutonomy/nuscenes-devkit/archive/v{{ version }}.tar.gz
+  sha256: 2efafb81a7c13b5e4dc278f28636a26f43335929792e80fa70a78a0ad45a9744
+  patches:
+    - patches/0001-Use-os-specific-path-seperator.patch
+
+build:
+  noarch: python
+  number: 0
+  script: {{ PYTHON }} -m pip install ./setup -vv --no-deps --no-build-isolation
+
+requirements:
+  host:
+    - pip
+    - python {{ python_min }}
+    - setuptools
+  run:
+    - python >={{ python_min }}
+    - cachetools
+    - descartes
+    - fire
+    - flake8
+    - flake8-import-order
+    - jupyter
+    - matplotlib <3.6.0
+    - numpy >=1.22.0,<2.0.0
+    - parameterized
+    - pillow >6.2.1
+    - py-opencv >=4.5.4.58
+    - pycocotools >=2.0.1
+    - pyquaternion >=0.9.5
+    - scikit-learn
+    - scipy
+    - shapely <2.0.0
+    - tqdm
+
+test:
+  imports:
+    - nuscenes
+  commands:
+    - pip check
+  requires:
+    - pip
+    - pytest
+    - pytest-benchmark
path: recipes/nuscenes-devkit/meta.yaml
user: login: ocefpaf
body: Are you running the tests? These don't seem to be used.
created_at: 2025-04-01T16:15:21Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,63 @@
+{% set name = "nuscenes-devkit" %}
+{% set version = "1.1.2" %}
+
+package:
+  name: {{ name|lower }}
+  version: {{ version }}
+
+source:
+  url: https://github.com/nutonomy/nuscenes-devkit/archive/v{{ version }}.tar.gz
+  sha256: 2efafb81a7c13b5e4dc278f28636a26f43335929792e80fa70a78a0ad45a9744
+  patches:
+    - patches/0001-Use-os-specific-path-seperator.patch
+
+build:
+  noarch: python
+  number: 0
+  script: {{ PYTHON }} -m pip install ./setup -vv --no-deps --no-build-isolation
+
+requirements:
+  host:
+    - pip
+    - python {{ python_min }}
+    - setuptools
+  run:
+    - python >={{ python_min }}
+    - cachetools
+    - descartes
+    - fire
+    - flake8
+    - flake8-import-order
+    - jupyter
+    - matplotlib <3.6.0
+    - numpy >=1.22.0,<2.0.0
+    - parameterized
+    - pillow >6.2.1
+    - py-opencv >=4.5.4.58
+    - pycocotools >=2.0.1
+    - pyquaternion >=0.9.5
+    - scikit-learn
+    - scipy
+    - shapely <2.0.0
+    - tqdm
+
+test:
+  imports:
+    - nuscenes
+  commands:
+    - pip check
+  requires:
+    - pip
+    - pytest
+    - pytest-benchmark
path: recipes/nuscenes-devkit/meta.yaml
user: login: jeongseok-meta
body: This might only be necessary when building for an older version. I will remove these to make sure.
created_at: 2025-04-01T16:18:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,63 @@
+{% set name = "nuscenes-devkit" %}
+{% set version = "1.1.2" %}
+
+package:
+  name: {{ name|lower }}
+  version: {{ version }}
+
+source:
+  url: https://github.com/nutonomy/nuscenes-devkit/archive/v{{ version }}.tar.gz
+  sha256: 2efafb81a7c13b5e4dc278f28636a26f43335929792e80fa70a78a0ad45a9744
+  patches:
+    - patches/0001-Use-os-specific-path-seperator.patch
+
+build:
+  noarch: python
+  number: 0
+  script: {{ PYTHON }} -m pip install ./setup -vv --no-deps --no-build-isolation
+
+requirements:
+  host:
+    - pip
+    - python {{ python_min }}
+    - setuptools
+  run:
+    - python >={{ python_min }}
+    - cachetools
+    - descartes
+    - fire
+    - flake8
+    - flake8-import-order
+    - jupyter
+    - matplotlib <3.6.0
+    - numpy >=1.22.0,<2.0.0
+    - parameterized
+    - pillow >6.2.1
+    - py-opencv >=4.5.4.58
+    - pycocotools >=2.0.1
+    - pyquaternion >=0.9.5
+    - scikit-learn
+    - scipy
+    - shapely <2.0.0
+    - tqdm
+
+test:
+  imports:
+    - nuscenes
+  commands:
+    - pip check
+  requires:
+    - pip
+    - pytest
+    - pytest-benchmark
path: recipes/nuscenes-devkit/meta.yaml
user: login: ocefpaf
body: If you are running the tests, sure. If those are needed at runtime due to an error in listing dependencies upstream, then you will need to add them to run and not only test. Hopefully that is no the case, but I did see some packages with that in the past.
created_at: 2025-04-01T16:29:16Z
author_association: MEMBER

PR comments:
user: login: github-actions[bot]
created_at: 2025-04-01T01:46:37Z
body: Hi! This is the staged-recipes linter and your PR looks excellent! :rocket:


author_association: CONTRIBUTOR
user: login: conda-forge-admin
created_at: 2025-04-01T01:47:00Z
body: Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (```recipes/nuscenes-devkit/meta.yaml```) and found it was in an excellent condition.

I do have some suggestions for making it better though...


For **recipes/nuscenes-devkit/meta.yaml**:

 * ℹ️ Recipes should usually depend on `matplotlib-base` as opposed to `matplotlib` so that runtime environments do not require large packages like `qt`.


<sub>This message was generated by GitHub Actions workflow run [https://github.com/conda-forge/conda-forge-webservices/actions/runs/14200791470](https://github.com/conda-forge/conda-forge-webservices/actions/runs/14200791470). Examine the logs at this URL for more detail.</sub>

author_association: CONTRIBUTOR
user: login: jeongseok-meta
created_at: 2025-04-01T16:09:56Z
body: @conda-forge/help-python, ready for review!
author_association: CONTRIBUTOR