Closed turbomam closed 3 years ago
merge-pipenv
make
runs to completion but complains about the documentation structure:INFO - Cleaning site directory INFO - Building documentation to directory: /Users/MAM/Documents/gitrepos/cr2/ccdhmodel/docs INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration:
- AlcoholExposureObservation.md ...
- treatment__treatment_type.md INFO - Documentation built in 7.12 seconds
make test
runs to completion with 1 pass and 0 failuresmake generate-model
with no preparation on my part% make generate-model pipenv install Installing dependencies from Pipfile.lock (60b98b)... 🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 2/2 — 00:00:12 To activate this project's virtualenv, run pipenv shell. Alternatively, run a command inside the virtualenv with pipenv run. CDM_GOOGLE_SHEET_ID=1oWS7cao-fgz2MKWtyr8h2dEL9unX__0bJrWKv6mQmM4 PIPENV_IGNORE_INSTALLED=1 pipenv run python vendor/sheet2linkml/sheet2linkml.py --output model/schema/crdch_model.yaml Traceback (most recent call last): File "vendor/sheet2linkml/sheet2linkml.py", line 6, in
from sheet2linkml import cli File "/Users/MAM/Documents/gitrepos/cr2/ccdhmodel/vendor/sheet2linkml/sheet2linkml/cli.py", line 16, in from sheet2linkml.source.gsheetmodel.gsheetmodel import GSheetModel File "/Users/MAM/Documents/gitrepos/cr2/ccdhmodel/vendor/sheet2linkml/sheet2linkml/source/gsheetmodel/gsheetmodel.py", line 2, in from sheet2linkml.source.gsheetmodel.mappings import Mappings File "/Users/MAM/Documents/gitrepos/cr2/ccdhmodel/vendor/sheet2linkml/sheet2linkml/source/gsheetmodel/mappings.py", line 20, in class Mappings: File "/Users/MAM/Documents/gitrepos/cr2/ccdhmodel/vendor/sheet2linkml/sheet2linkml/source/gsheetmodel/mappings.py", line 72, in Mappings ) -> list[Mapping]: TypeError: 'type' object is not subscriptable make: *** [generate-model] Error 1
OAuth is limited to 100 sensitive scope logins until the OAuth consent screen is verified. This may require a verification process that can take several days.
client_secret_*.apps.googleusercontent.com.json
.ccdhmodel
directory and give it this name: google_api_credentials.json
make generate-model
in the root of your local ccdhmodel
directorystill getting TypeError: 'type' object is not subscriptable
as above
also copied google_api_credentials.json
into vendor/sheet2linkml/
Cheating by going to a previous ccdhmodel folder
google_api_credentials.json
is in repo root
% make generate-model
pipenv install Installing dependencies from Pipfile.lock (60b98b)... 🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 2/2 — 00:00:11 To activate this project's virtualenv, run pipenv shell. Alternatively, run a command inside the virtualenv with pipenv run. CDM_GOOGLE_SHEET_ID=1oWS7cao-fgz2MKWtyr8h2dEL9unX__0bJrWKv6mQmM4 PIPENV_IGNORE_INSTALLED=1 pipenv run python vendor/sheet2linkml/sheet2linkml.py --output model/schema/crdch_model.yaml Loading .env environment variables... Please go to this URL and finish the authentication flow: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=25191608779-77qsof3vglumvlbn2d9n35p55ntncb8e.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fspreadsheets.readonly+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.metadata.readonly&state=Gd75o3pF7DyO48W90x1tKgg66OPcTD&prompt=consent&access_type=offline Enter the authorization code:
Enter the authorization code
prompt and hit enterSee https://github.com/cancerDHC/ccdhmodel/pull/96#issuecomment-917125453
I don't see this. On the "OAuth consent screen" tab on your GCI APIs and Services page, could you please make sure that your app has a publishing status of "Testing" and that your e-mail address has been added to the list of Test Users? I think that's the way to suppress this warning.
git checkout merge-pipenv
~/Downloads/client_secret_*.apps.googleusercontent.com.json
to ./google_api_credentials.json
Maybe not necessary any more?
ccdhmodel % cat > .env
CDM_GOOGLE_SHEET_ID=1oWS7cao-fgz2MKWtyr8h2dEL9unX__0bJrWKv6mQmM4
ccdhmodel %
make generate-model
Pipenv setup went well
CDM_GOOGLE_SHEET_ID=1oWS7cao-fgz2MKWtyr8h2dEL9unX__0bJrWKv6mQmM4 PIPENV_IGNORE_INSTALLED=1 pipenv run python vendor/sheet2linkml/sheet2linkml.py --output model/schema/crdch_model.yaml
Loading .env environment variables...
Please go to this URL and finish the authentication flow: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=25191608779-77qsof3vglumvlbn2d9n35p55ntncb8e.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fspreadsheets.readonly+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.metadata.readonly&state=MdfyOWgvngrocYbtHRLEam6T3m7Ket&prompt=consent&access_type=offline
Enter the authorization code:
Pasted link into browser. No "Google hasn’t verified this app" warning!
Confirmed that I want to authenticate as MAM@lbl.gov. Approved the data access requests. Copied the provided code and pasted back into terminal. Hit enter. Model generation goes to completion.
Odd. Too bad we couldn't get to the bottom of what was going on. Still, it's nice to have this documented in the issues!
Why odd? I was trying to say that everything works and makes more sense to me now. Maybe that's not clear amidst all of the verbosity.
Ah, I thought the problem had "fixed itself", which is always annoying :). Looking more closely, it looks like maybe "set to GCP publication status to testing" worked!
I think the contents on the README file for this repo are fairly succinct, and that this issue is ready to be closed.
See https://github.com/cancerDHC/ccdhmodel/pull/96#pullrequestreview-750440905