astropy / package-template

Template for packages that use Astropy. Maintainer: @astrofrog
http://docs.astropy.org/projects/package-template/en/latest/
Other
60 stars 63 forks source link

template fails to build when rtd option set to no #527

Closed havok2063 closed 11 months ago

havok2063 commented 1 year ago

The package template fails to build when setting the use_read_the_docs option to no.

cookiecutter gh:astropy/package-template

package_name [packagename]: mytest
module_name [mytest]:
short_description [mytest]: this is a test
author_name [Astropy Developers]:
author_email []:
Select license:
1 - BSD 3-Clause
2 - GNU GPL v3+
3 - Apache Software Licence 2.0
4 - BSD 2-Clause
5 - Other
Choose from 1, 2, 3, 4, 5 [1]: 1
project_url [http://docs.astropy.org/projects/package-template/]:
use_compiled_extensions [y]:
include_example_code [y]:
edit_on_github_extension [False]:
github_project [astropy/astropy]:
use_gh_actions [y]: n
use_read_the_docs [y]: n
sphinx_theme [astropy-bootstrap]:
required_dependencies [astropy]:
optional_dependencies []:
Select minimum_python_version:
1 - 3.7
2 - 3.8
3 - 3.9
4 - 3.10
Choose from 1, 2, 3, 4 [1]: 3
Traceback (most recent call last):
  File "/var/folders/js/s2zfzbv16019vjh0dft_l_w0000263/T/tmp6turtc8j.py", line 47, in <module>
    remove_file('.rtd-environment.yml')
  File "/var/folders/js/s2zfzbv16019vjh0dft_l_w0000263/T/tmp6turtc8j.py", line 8, in remove_file
    os.remove(os.path.join(PROJECT_DIRECTORY, filepath))
FileNotFoundError: [Errno 2] No such file or directory: '/Users/havok/Work/mytest/.rtd-environment.yml'
ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
pllim commented 1 year ago

Thanks for reporting this! Could you please try https://github.com/OpenAstronomy/packaging-guide ? Also see https://github.com/astropy/package-template#pending-deprecation-warning .

havok2063 commented 1 year ago

Whoops. Missed the deprecation warning! Will switch to that. Thanks.

pllim commented 11 months ago

https://github.com/astropy/package-template#deprecation-warning