Closed ganow closed 1 year ago
pip>19.02
can install deps directly from pyproject.toml
git clone ...; cd ...; pip install .[option]
for the project only containing pyproject.toml
without requirements.txt
What I've found via GitHub workflow:
pip install nipy
fails for Python >= 3.10bdpy/mri
module(update on 6/22)
I've summarized why the nipy
installation fails for Python >=3.10 in https://github.com/KamitaniLab/bdpy/issues/68#issuecomment-1602175865
(update on 6/26) I closed the issue on the nipy installation failure for Python >= 3.10 since we can expect that it will be resolved for the next nipy release. (see https://github.com/KamitaniLab/bdpy/issues/68#issuecomment-1606582724 for the details)
Coverage Report
Tests | Skipped | Failures | Errors | Time |
---|---|---|---|---|
110 | 0 :zzz: | 13 :x: | 6 :fire: | 12.347s :stopwatch: |
The reason why coverage==0% even though we have several test cases
Memo:
The GitHub workflow created in this PR only reports lint errors and type errors and does not actively intervene in existing code. Running the following commands (black
and ruff
with fix option) in {workflow/local environment} would resolve the error somewhat automatically.
$ black bdpy # formatting w/ Black
$ ruff check --fix bdpy # (partial) formatting w/ Ruff by enabling autofix option
Changes
caffe
import indl/caffe
moduleVerification
I have tested the following procedures work in the local environment.
Package building
(update on 6/22) The following works:
Until I investigated the Python build system this time, I was unaware that the
hatchling
specified inpyproject.toml
is a build backend, andhatch
is a command line frontend used to initiatehatchling
. It is not necessarily required to match the frontend with the build backend. Thebuild
tool, managed by PyPA, uses the appropriate build backend according to the specifications inpyproject.toml
, so it was not necessary to install thehatch
frontend.Installation
I have NOT tested the following works (since it'll affect the production environment), but conceptually it must work.
Deploy
(update on 6/26)
Notes
I have created initial version of the
pyproject.toml
by mitsuhiko/rye (and I privately use it for managing my dev environment). After the creation ofpyproject.toml
, I have manually edited it so that it can handle extra deps. ~I demonstrated how to build&publish the package by usinghatch
command because I thought that currently, rye is a newly developed tool andhatch
might be a better option to use as a repository default.~ I have updated the example build&deploy scripts fromhatch
tobuild
andtwine
, which seem to be widely used tools in recent years.