inveniosoftware / training

Invenio v3 Training Material
https://training.readthedocs.io
MIT License
40 stars 45 forks source link

Scaffolding update #109

Open jucapoid opened 2 years ago

jucapoid commented 2 years ago

Describe the bug

After scaffolding the skeleton on 01-getting-started when running the script bootstrap.sh, the python virtual environment stays locking "forever". The Pipfile in the skeleton might need to be updated.

Steps to Reproduce

  1. Follow 01-getting-started
  2. Execute cookiecutter gh:inveniosoftware/cookiecutter-invenio-instance -c v3.4 --no-input
  3. Execute ./scripts/bootstrap
  4. Wait forever

Expected behavior

Finish installing pipenv dependencies and lock Pipfile.

Aditional Information

I noticed it isn't just about my environment because it also happens on the virtualbox image you provided.

After trying to run pipenv install --skip-lock you get the error

ERROR: Couldn't install package: invenio

Deleting the provided Pipfile and creating one with the dependencies as they appeared solved the problem.

Here is the new Pipfile I used.

f-osorio commented 2 years ago

I've ran into this issue too. And the new pipfile got me through the locking process. However, I ran into an issue during the web packing (pipenv run invenio webpack clean buildall) stage. I'm not sure if there was something missing from the new pipfile, or something unrelated.

ERROR in ./js/invenio_search_ui/components/Results.js Module not found: Error: Can't resolve '@translations/invenio_app_rdm/i18next' in '/home/inv/.local/share/virtualenvs/my-site-PYE04Sh0/var/instance/assets/js/invenio_search_ui/components' @ ./js/invenio_search_ui/components/Results.js 14:0-64 95:15-22 @ ./js/invenio_search_ui/components/index.js @ ./js/invenio_search_ui/defaultComponents.js @ ./js/invenio_search_ui/app.js

asajedi commented 2 years ago

ERROR in ./js/invenio_search_ui/components/Results.js Module not found

I have the same issue here. Could you manage to sort it somehow? Or could anybody give a hint. Thank you very much.

jucapoid commented 2 years ago

Use the original Pipfile but change

invenio = { version = ">=3.4.0,<3.5.0", extras = ["base", "auth", "metadata", "files", "{{ cookiecutter.database }}", "elasticsearch{{ cookiecutter.elasticsearch }}" ]}

to

invenio = { version = "~=3.5.0a3", extras = ["base", "auth", "metadata", "files", "postgresql", "elasticsearch7" ]}
asajedi commented 2 years ago

Thank you very much for your reply. Unfortunately, that does not resolve the problem. Still get: ERROR in ./js/invenio_search_ui/components/Results.js Module not found: Error: Can't resolve '@translations/invenio_app_rdm/i18next' in '/home/.local/share/virtualenvs/my-site-gUTDYPBB/var/instance/assets/js/invenio_search_ui/components' @ ./js/invenio_search_ui/components/Results.js 14:0-64 95:15-22 @ ./js/invenio_search_ui/components/index.js @ ./js/invenio_search_ui/defaultComponents.js @ ./js/invenio_search_ui/app.js

Any suggestions?

f-osorio commented 2 years ago

I also added this invenio-search-ui = "<2.0.6" to the pipfile.

jucapoid commented 2 years ago

Might not be the most elegant solution but I got past it by removing 2 lines from this file https://github.com/inveniosoftware/invenio-search-ui/blob/master/invenio_search_ui/assets/semantic-ui/js/invenio_search_ui/components/Results.js

lines 24 and 114.

You can find the file on your virtualenv folder.

asajedi commented 2 years ago

Thank you very much for your reply. Adding invenio-search-ui = "<2.0.6" to pipfile did the trick. However, I miss the tabs styling in backend:

Bildschirmfoto vom 2022-04-01 17-10-33

ntarocco commented 2 years ago

To install invenio v3.4 (invenio = { version = ">=3.4.0,<3.5.0"), due to the upgrade of some dependencies, it is necessary to have:

In the Pipfile, you should add (we will fix it soon in invenio v3.4):

Using invenio = { version = "~=3.5.0a3" might also work, but I didn't test it.

ZedThree commented 2 years ago

Python 3.6 was end of life in December 2021, so it would be really good to move to a more recent version.

Using a manually created virtual environment and removing pipenv from all the scripts, I have been using invenio 3.5.0a3 successfully, except that I also require a hotfix to invenio-assets: https://github.com/inveniosoftware/invenio-assets/pull/146

ZedThree commented 2 years ago

With https://github.com/inveniosoftware/invenio-assets/pull/146 merged, I made the following change to Pipfile, and I can successfully use pipenv install --skip-lock to install the packages:

--- a/Pipfile
+++ b/Pipfile
@@ -4,7 +4,8 @@ verify_ssl = true
 name = "pypi"

 [packages]
-invenio = { version = ">=3.4.0,<3.5.0", extras = ["base", "auth", "metadata", "files", "postgresql", "elasticsearch7" ]}
+invenio = { version = ">=3.5.0a4", extras = ["base", "auth", "metadata", "files", "postgresql", "elasticsearch7" ]}
+invenio-assets = ">= 1.3.0"
 lxml = ">=4.3.0,<5.0.0"
 marshmallow = ">=3.0.0,<4.0.0"
 uwsgi = ">=2.0"

I think this implies the real fix is:

  1. Bump invenio-assets version to 1.3.0 in invenio
  2. New tag 3.5.0a5 in invenio
  3. Bump invenio version in cookiecutter-invenio-instance