QuantEcon / jupinx

Jupyter + Sphinx Utilities and Tools
https://quantecon.github.io/jupinx/
20 stars 4 forks source link

jupinx-quickstart fails with `jupinx/theme/minimal/ not a directory` #75

Closed GavinHuttley closed 4 years ago

GavinHuttley commented 4 years ago

This version jupinx 0.2.1, running in a conda environment list included conda-env.txt.

 $ mkdir jupinx-project
(jupinx) [gavin@eratosthenes.uds.anu.edu.au ~/Desktop/Inbox]
 $ cd jupinx-project/
(jupinx) [gavin@eratosthenes.uds.anu.edu.au ~/Desktop/Inbox/jupinx-project]
 $ jupinx-quickstart 
Welcome to the Jupinx 0.2.1 quickstart utility.

Please enter values for the following settings (just press Enter to
accept a default value, if one is given in brackets).

Enter the root path for documentation.
> Root path for the documentation [.]: 

The project name will occur in several places in the built documentation.
> Project name: blah
> Author name(s): blah

Jupinx has the notion of a "version" and a "release" for the
software. Each version can have multiple releases. For example, for
Python the version is something like 2.5 or 3.0, while the release is
something like 2.5.1 or 3.0a1.  If you don't need this dual structure,
just set both to the same value.
> Project version []: 2019
> Project release [2019]: 

If the documents are to be written in a language other than English,
you can select a language here by its language code. Sphinx will then
translate text that it generates into that language.

For a list of supported codes, see
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language.
> Project language [en]: 

Select the kernels which you want for your jupyter notebook conversion
> Do you want to have python3 in your kernel list? (y/n) [y]: 
> Do you want to have python2 in your kernel list? (y/n) [y]: n
> Do you want to have julia-1.1 in your kernel list? (y/n) [y]: n
> Do you want to have julia-1.2 in your kernel list? (y/n) [y]: n
Indicate which of the following Sphinx extensions should be installed:
> sphinxcontrib-jupyter package has been found in your system. Would you like to upgrade it? (y/n) [y]: 
> sphinxcontrib-bibtex package has been found in your system. Would you like to upgrade it? (y/n) [y]: 

Traceback (most recent call last):
  File "/Users/gavin/miniconda3/envs/jupinx/bin/jupinx-quickstart", line 10, in <module>
    sys.exit(main())
  File "/Users/gavin/miniconda3/envs/jupinx/lib/python3.7/site-packages/jupinx/cmd/quickstart.py", line 527, in main
    generate(d, overwrite=False)
  File "/Users/gavin/miniconda3/envs/jupinx/lib/python3.7/site-packages/jupinx/cmd/quickstart.py", line 379, in generate
    copy_tree(source_theme_path + "/", target_theme_path , preserve_symlinks=1)
  File "/Users/gavin/miniconda3/envs/jupinx/lib/python3.7/distutils/dir_util.py", line 124, in copy_tree
    "cannot copy tree '%s': not a directory" % src)
distutils.errors.DistutilsFileError: cannot copy tree '/Users/gavin/miniconda3/envs/jupinx/lib/python3.7/site-packages/jupinx/theme/minimal/
[conda-env.txt](https://github.com/QuantEcon/jupinx/files/3737302/conda-env.txt)
': not a directory
mmcky commented 4 years ago

Hmm. Thanks @GavinHuttley I will look into this. Was working well on my linux development box but I suspect the support files haven't been bundled with the release. Thanks for reporting this!

GavinHuttley commented 4 years ago

In one of my too many projects, I have an option in setup.py as follows:

    package_data={'ensembldb3' : ['data/ensembldb_download.cfg',
                                  'data/mysql.cfg',
                                  'data/species.tsv']}
mmcky commented 4 years ago

Thanks @GavinHuttley -- forgot to include the asset in the MANIFEST file.

mmcky commented 4 years ago

Will release 0.2.2 shortly. I tested this one in a new environment. I should setup CI :-)

GavinHuttley commented 4 years ago

CI is a good idea! We've started using azure for cogent3 and it's been extremely useful at catching regressions, particularly cross-platform issues.

mmcky commented 4 years ago

thanks @GavinHuttley agreed. We use CI for all our other projects -- just thought this one was small enough. I guess the lesson is that it is always useful :-).

mmcky commented 4 years ago

ok - thanks @GavinHuttley 0.2.2 is released with theme assets. Thanks for reporting so quickly!

pip install jupinx --upgrade

There is one known issue in this release (https://github.com/QuantEcon/jupinx/issues/76) so please start with an empty directory. Thanks.