Repository navigation
create allspec repo? #24
Copy link
Copy link
Open
Description
Hi @albireox,
I haven't use the python_template in a very long while, so here's my attempt and the error received, if you can have a look and let me know if I did something incorrect, or if I should try it in an older miniconda than 3.11?
$ cookiecutter https://github.com/sdss/python_template.git
[1/14] full_name (John Doe): Joel Brownstein
[2/14] email (myemail@here.com): joelbrownstein@astro.utah.edu
[3/14] package_name (myproject): allspec
[4/14] repo_name (allspec):
[5/14] pip_name (sdss-allspec):
[6/14] version (0.1.0-alpha.0):
[7/14] year (2024):
[8/14] short_description (Simple Template package for creating SDSS Python projects): Simple package to generate the allspec file which would extract sdss_ids from the pipeline's database including boss and apogee spectra, or all spectra with an sdss_id
[9/14] Select packaging_system
1 - setuptools
2 - poetry
Choose from [1/2] (1):
[10/14] Select sphinx_template
1 - sphinx-bootstrap
2 - alabaster
Choose from [1/2] (1):
[11/14] Select use_releases
1 - no
2 - yes
Choose from [1/2] (1):
[12/14] Select create_git_repo
1 - yes
2 - no
Choose from [1/2] (1):
[13/14] Select exists_on_github
1 - no
2 - yes
Choose from [1/2] (1):
[14/14] github_organisation (sdss):
Traceback (most recent call last):
File "/var/folders/dz/0sxcvbqd48700v2k7mnc5b8w0000gn/T/tmp46a2p62_.py", line 53, in <module>
@invoke.task
^^^^^^^^^^^
File "/software/pkg/miniconda/3.11/lib/python3.11/site-packages/invoke/tasks.py", line 331, in task
return klass(args[0], **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/software/pkg/miniconda/3.11/lib/python3.11/site-packages/invoke/tasks.py", line 76, in __init__
self.positional = self.fill_implicit_positionals(positional)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/software/pkg/miniconda/3.11/lib/python3.11/site-packages/invoke/tasks.py", line 167, in fill_implicit_positionals
args, spec_dict = self.argspec(self.body)
^^^^^^^^^^^^^^^^^^^^^^^
File "/software/pkg/miniconda/3.11/lib/python3.11/site-packages/invoke/tasks.py", line 153, in argspec
spec = inspect.getargspec(func)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
albireox commentedon Apr 22, 2024
That sounds vaguely familiar. And seems to be this issue. Did you pip install cookiecutter? What version of cookiecutter are you using?
Can you try doing
and then run cookiecutter again? If that works I think it must be an out of date version of cookiecutter.
joelbrownstein commentedon Apr 22, 2024
I confirmed that this issue is for python 3.11, so I was able to create https://github.com/sdss/allspec using miniconda/3.9
joelbrownstein commentedon Apr 22, 2024
For the broken 3.11, I did pip install it (today) and it has:
$ cookiecutter -V
Cookiecutter 2.6.0 from /software/pkg/miniconda/3.11/lib/python3.11/site-packages (Python 3.11.4 (main, Jul 5 2023, 08:41:25) [Clang 14.0.6 ])
joelbrownstein commentedon Apr 22, 2024
sdsstools 1.1.0 requires invoke<2.0.0,>=1.3.0, but you have invoke 2.2.0 which is incompatible.
joelbrownstein commentedon Apr 22, 2024
so I think reverting invoke would work (in principle).
albireox commentedon Apr 22, 2024
Ah, good catch. Yes, that sounds very familiar. If 3.9 works for you I'd say use that for now, but I'll test and fix it. If you want to use 3.11, I think if you manually do
pip install --upgrade invokethat will upgrade invoke regardless of thesdsstoolsrequirement (which anyways should work fine withinvoke2.x) and then cookiecutter will work.joelbrownstein commentedon Apr 22, 2024
3.9 worked so I'm happy to go on to other tasks!
$ pip install --upgrade invoke
Requirement already satisfied: invoke in /software/pkg/miniconda/3.11/lib/python3.11/site-packages (2.2.0)