Add ability to pass agents to python

Aberta
#2 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
python, scala
Domínio
api

Direção de pesquisa

Nenhum arquivo ou teste é mencionado. Comece rastreando o comportamento existente de py:set e py:runresult e, em seguida, defina como as variáveis dos agentes se tornam objetos Python somente leitura semelhantes a dict. O trabalho estará concluído quando os agentes puderem ser passados para Python e a documentação declarar claramente que os valores podem ficar desatualizados após alterações no NetLogo.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

I think they should be represented as dict-like objects, where keys are agent variables.

For a first pass, they should be read-only.

One tricky thing is keeping them in sync with NetLogo. For instance:

py:set "t" turtle 0
ask turtle 0 [ set color red ]
print py:runresult "t['color']" ;; This will be out of date

I think just not caring is good enough for a first pass, as long as it's clear in the docs. Otherwise, we'd have to track and sync all agent-objects on every call, which sounds awful.

I think they should be represented as dict-like objects, where keys are agent variables.

For a first pass, they should be read-only.

One tricky thing is keeping them in sync with NetLogo. For instance:

py:set "t" turtle 0
ask turtle 0 [ set color red ]
print py:runresult "t['color']" ;; This will be out of date

I think just not caring is good enough for a first pass, as long as it's clear in the docs. Otherwise, we'd have to track and sync all agent-objects on every call, which sounds awful.

Copied from https://github.com/qiemem/PythonExtension/issues/2

Linguagem predominante
Scala
Estrelas
31
Forks
16
Métricas de merge de PRs
Nenhum PR com merge em 30d

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de NetLogo/Python-Extension

Todas as issues de NetLogo/Python-Extension

Issues semelhantes

Mais issues de Scala

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.