Skip to content

Instantly share code, notes, and snippets.

View Johnetordoff's full-sized avatar

John Tordoff Johnetordoff

View GitHub Profile
No tasks/local.py file found. Did you remember to copy local-dist.py to local.py?
File "/opt/hostedtoolcache/Python/3.11.1/x64/bin/invoke", line 8, in <module>
Testing modules "['tests']"
sys.exit(program.run())
^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/invoke/program.py", line 380, in run
self.execute()
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/invoke/program.py", line 565, in execute
executor.execute(*self.tasks)
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/invoke/executor.py", line 127, in execute
ImportError: cannot import name 'formatargspec' from 'inspect' (/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/inspect.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.1/x64/bin/invoke", line 8, in <module>
sys.exit(program.run())
^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/invoke/program.py", line 380, in run
self.execute()
Testing modules "['tests']"
File "/opt/hostedtoolcache/Python/3.11.1/x64/bin/invoke", line 8, in <module>
sys.exit(program.run())
^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/invoke/program.py", line 380, in run
self.execute()
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/invoke/program.py", line 565, in execute
executor.execute(*self.tasks)
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/invoke/executor.py", line 127, in execute
result = call.task(*args, **call.kwargs)
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.1/x64/bin/invoke", line 8, in <module>
sys.exit(program.run())
^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/invoke/program.py", line 380, in run
self.execute()
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/invoke/program.py", line 565, in execute
executor.execute(*self.tasks)
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/invoke/executor.py", line 127, in execute
result = call.task(*args, **call.kwargs)
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.1/x64/bin/invoke", line 8, in <module>
sys.exit(program.run())
^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/invoke/program.py", line 380, in run
self.execute()
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/invoke/program.py", line 565, in execute
executor.execute(*self.tasks)
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/invoke/executor.py", line 127, in execute
result = call.task(*args, **call.kwargs)
@Johnetordoff
Johnetordoff / gist:21e711e8d5d3c3a9a968095ee570c55d
Created October 6, 2022 15:50
collection moderation action detail
{
"data":{
"id":"632d3aa5135dff000ba8fa32",
"type":"collection-submission-actions",
"attributes":{
"trigger":"approve",
"comment":"",
"from_state":"unapproved",
"to_state":"approved",
"date_created":"2022-09-23T04:48:37.939683Z",
@Johnetordoff
Johnetordoff / gist:720e748087a43b59acb2b81b768b67d2
Created October 6, 2022 15:47
collections-submissions action list view
{
"data":[
{
"id":"632d3aa56f1177000a24210f",
"type":"collection-submission-actions",
"attributes":{
"trigger":"submit",
"comment":"",
"from_state":"in_progress",
"to_state":"unapproved",
@Johnetordoff
Johnetordoff / gist:7ffeebf9fb9b3c4396040c4e720c587c
Created October 5, 2022 13:52
cuurent collection endpoints api/collections/urls.py
url(r'^$', views.CollectionList.as_view(), name=views.CollectionList.view_name),
url(r'^(?P<collection_id>\w+)/$', views.CollectionDetail.as_view(), name=views.CollectionDetail.view_name),
url(r'^(?P<collection_id>\w+)/collected_metadata/$', views.CollectedMetaList.as_view(), name=views.CollectedMetaList.view_name),
url(r'^(?P<collection_id>\w+)/collected_metadata/(?P<cgm_id>\w+)/$', views.CollectedMetaDetail.as_view(), name=views.CollectedMetaDetail.view_name),
url(r'^(?P<collection_id>\w+)/collected_metadata/(?P<cgm_id>\w+)/subjects/$', views.CollectedMetaSubjectsList.as_view(), name=views.CollectedMetaSubjectsList.view_name),
url(r'^(?P<collection_id>\w+)/collected_metadata/(?P<cgm_id>\w+)/relationships/subjects/$', views.CollectedMetaSubjectsRelationship.as_view(), name=views.CollectedMetaSubjectsRelationship.view_name),
url(r'^(?P<collection_id>\w+)/linked_nodes/$', views.LinkedNodesList.as_view(), name=views.LinkedNodesList.view_name),
url(r'^(?P<collection_id>\w+)/linked
2022-09-08T13:51:54.3112026Z
2022-09-08T13:51:54.3115243Z =================================== FAILURES ===================================
2022-09-08T13:51:54.3219642Z _ TestSchemaResponseActionListPOSTBehavior.test_POST_approve__writes_action_and_advances_state[pre-moderation-ApprovalStates.PENDING_MODERATION] _
2022-09-08T13:51:54.3220374Z api_tests/actions/views/test_schema_response_action_list.py:496: in test_POST_approve__writes_action_and_advances_state
2022-09-08T13:51:54.3220928Z app.post_json_api(make_api_url(schema_response), payload, auth=registration.creator.auth)
2022-09-08T13:51:54.3221628Z E AttributeError: 'OSFUser' object has no attribute 'auth'
2022-09-08T13:51:54.3222285Z _ TestSchemaResponseActionListPOSTBehavior.test_POST_approve__writes_action_and_advances_state[None-ApprovalStates.APPROVED] _
2022-09-08T13:51:54.3222873Z api_tests/actions/views/test_schema_response_action_list.py:496: in test_POST_approve__writes_action_and_advances_state
2022-09-08T13:51:54.3223357Z app.post
Prefetch guids
In [112]: str(OSFUser.objects.filter().prefetch_related('guids').query)
Out[112]: 'SELECT "osf_osfuser"."id", "osf_osfuser"."password", "osf_osfuser"."last_login", "osf_osfuser"."is_superuser", "osf_osfuser"."created", "osf_osfuser"."modified", "osf_osfuser"."content_type_pk", "osf_osfuser"."spam_status", "osf_osfuser"."spam_pro_tip", "osf_osfuser"."spam_data", "osf_osfuser"."date_last_reported", "osf_osfuser"."reports", "osf_osfuser"."username", "osf_osfuser"."fullname", "osf_osfuser"."is_registered", "osf_osfuser"."security_messages", "osf_osfuser"."is_invited", "osf_osfuser"."unclaimed_records", "osf_osfuser"."contributor_added_email_records", "osf_osfuser"."member_added_email_records", "osf_osfuser"."group_connected_email_records", "osf_osfuser"."merged_by_id", "osf_osfuser"."verification_key", "osf_osfuser"."verification_key_v2", "osf_osfuser"."email_last_sent", "osf_osfuser"."change_password_last_attempt", "osf_osfuser"."old_password_invalid_attempts", "osf_osfuser"."email_verifications