Skip to content

build: migrate dependency management from requirements.txt to uv#3

Open
ganow wants to merge 5 commits into
devfrom
feat/uv-migration
Open

build: migrate dependency management from requirements.txt to uv#3
ganow wants to merge 5 commits into
devfrom
feat/uv-migration

Conversation

@ganow
Copy link
Copy Markdown

@ganow ganow commented Jun 3, 2026

Overview

Migrate dependency management from requirements.txt to uv (pyproject.toml + uv.lock). Along the way, this also fixes a few issues found in README.md, data/files.json, and evaluation.ipynb.

Changes

Migration to uv (main)

Replace requirements.txt with pyproject.toml + uv.lock, and update the README setup instructions to use uv sync. Dependencies are carried over as-is from requirements.txt, with jupyter / pycortex added under an optional visualization group.

Incidental fixes

Clean up minor issues found while running the examples (outdated script name in the README, a JSON syntax error, unused imports in the notebook). As part of this, I restored the pycortex download entry in data/files.json by recovering it from the commit history; I'm not certain about its details yet and have asked the previous maintainer in #2, but restored it for now so the Pycortex visualization works.

Verification

Verified end-to-end by running the Examples section of the README:

# Download example data (in the ./data directory)
python download.py fmri_deeprecon_fmriprep_hcpvc
python download.py features_imagenet_training_vgg19_random5000
python download.py features_imagenet_test_vgg19_random5000
python download.py pycortex  # Optional, required for Pycortex visualization

# Training and test
python train_encoder_fastl2lir.py config/example_encoding_deeprecon_hcp_rois_vgg19_random5000_pyfastl2lir_alpha100_select500units.yaml
python predict_fmri_fastl2lir.py config/example_encoding_deeprecon_hcp_rois_vgg19_random5000_pyfastl2lir_alpha100_select500units.yaml

# Evaluation
jupyter notebook evaluation.ipynb

🤖 Generated with Claude Code

@ganow ganow requested a review from KenyaOtsuka June 3, 2026 14:56
Copy link
Copy Markdown

@KenyaOtsuka KenyaOtsuka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left one inline comment about a typo.

Also, since jupyter and pycortex are included as optional dependencies under the visualization extra, I think it would be helpful to mention in the README that users need to run uv sync --extra visualization before running evaluation.ipynb.

Other than that, the changes look good to me.

Comment thread pyproject.toml
[project]
name = "feature-encoding"
version = "0.1.0"
description = "DNN feature encoding analysis to predict fMRI responses (Nonaki et al., 2021)"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nonaki should be Nonaka

@ganow
Copy link
Copy Markdown
Author

ganow commented Jun 4, 2026

@KenyaOtsuka Thank you for reviewing this PR! All of your comments make sense. I'll apply them later

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