You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs build is now broken due to ModuleNotFound errors because dependencies are not installed by default in the current build. The build will install some dependencies via conda (formerly pip) with a requirements file, sbt package the wheel, and run setup.py with the pweave command.
A bit of history
From 8db45241..07bd8ce8 we had the following change
The requirements-condaforge.txt that is now used in the circle CI build is:
--- /dev/null
+++ b/pyrasterframes/src/main/python/requirements-condaforge.txt
@@ -0,0 +1,4 @@
+# These packages should be installed from conda-forge, given their complex binary components.
+gdal==2.4.4
+rasterio[s3]
+rtree
Root cause
Now what we are seeing is missing deprecation and shapely modules in the circle CI docs job. Basically anything that is not in the setup_requires in setup.py could result in a ModuleNotFound error. Because sbt is running python setup.py pweave it does not install or source install dependencies in that task. Stop me if you have heard this before.
Basically there is tension between managing the dependencies for installation and what dependencies we want to run the pweave command in setup.py.
Proposed solution:
Refactor the PweaveDocs class out of setup.py into a standalone script perhaps pyrasterframes/src/main/python/docs/build.py. In the proposed build.py, no longer extend distutils.cmd.Command. For desired command line option parsing, use something like argparse instead of the Command's pattern. As far as I can tell, there is not much else of the Command that we are currently taking advantage of.
Circle docs job should:
conda install dependencies from requirements file (stays the same)
call sbt (mild refactoring of current build definition)
sbt package to build assembly jar and whl
sbt test/compile
run python -m pip install pyrasterframes/target/python/this is important and new
sbt makeSite -- mostly the same
refactor the current pySetup task to instead run python pyrasterframes/target/python/docs/build.py with desired options such as quick
This will enable us to:
maintain the conda requirements file as basically our set of recommended pre-requisites due to the complicated binaries
remove several packages from setup_requires because setup no longer requires them
continue to use install_requires for managing those dependencies
alternative?
If there is a way for us to explicitly declare that a distutils Command should extend or depend upon the install command itself, this could simplify the specification of the circle job.
The text was updated successfully, but these errors were encountered:
The docs build is now broken due to ModuleNotFound errors because dependencies are not installed by default in the current build. The build will install some dependencies via conda (formerly pip) with a requirements file, sbt package the wheel, and run setup.py with the pweave command.
A bit of history
From 8db45241..07bd8ce8 we had the following change
The
requirements.txt
file was deleted but contained the following lovelies which were also repeated, not quite verbatim, in our setup.py:The
requirements-condaforge.txt
that is now used in the circle CI build is:Root cause
Now what we are seeing is missing deprecation and shapely modules in the circle CI
docs
job. Basically anything that is not in thesetup_requires
insetup.py
could result in a ModuleNotFound error. Because sbt is runningpython setup.py pweave
it does not install or source install dependencies in that task. Stop me if you have heard this before.Basically there is tension between managing the dependencies for installation and what dependencies we want to run the
pweave
command insetup.py
.Proposed solution:
Refactor the
PweaveDocs
class out ofsetup.py
into a standalone script perhapspyrasterframes/src/main/python/docs/build.py
. In the proposed build.py, no longer extenddistutils.cmd.Command
. For desired command line option parsing, use something likeargparse
instead of the Command's pattern. As far as I can tell, there is not much else of the Command that we are currently taking advantage of.Circle
docs
job should:sbt
(mild refactoring of current build definition)sbt package
to build assembly jar and whlsbt test/compile
python -m pip install pyrasterframes/target/python/
this is important and newsbt makeSite
-- mostly the samepySetup
task to instead runpython pyrasterframes/target/python/docs/build.py
with desired options such as quickThis will enable us to:
setup_requires
because setup no longer requires theminstall_requires
for managing those dependenciesalternative?
If there is a way for us to explicitly declare that a distutils
Command
should extend or depend upon the install command itself, this could simplify the specification of the circle job.The text was updated successfully, but these errors were encountered: