Code Monkey home page Code Monkey logo

csv-extension's Introduction

NetLogo

This page is for open source developers interested in the source code for NetLogo.

Other users should visit the NetLogo home page at Northwestern and the NetLogo users group on Google.

The most recent version of NetLogo can be downloaded here.

I Need Help! Where Do I Look?

This depends on what you need help with. The NetLogo community have several different channels for communicating and the best way to get help quickly is to address your request to the proper channel.

Reporting Bugs

If you have encountered a bug in the latest version of NetLogo, it might be worth checking the Known Issues page to see if other users have already reported the issue. If no one has reported the issue, please open a GitHub issue or email our bugs list. If possible, please include a model displaying the bug as well as information about what you were doing when the issue occurred. Including the model and information about the buggy interaction makes fixing the problem much easier and ensures we fix the exact problem you were experiencing. If the model isn't public, please send it to our bugs mailing list. This list is private and your model will not be shared publicly.

Learning NetLogo

We're excited that you're learning NetLogo! NetLogo comes with a tutorial which introduces the basic concepts and can help you get started. If you're looking for a textbook which explains the concepts underlying NetLogo you might look at Introduction to Agent-Based Modeling available as a paper book and/or ebook from MIT Press. The archives of an intro courses on NetLogo titled "Introduction to Agent-Based Modeling" are available on Complexity Explorer.

Help With Modeling

There are many good resources listed on the NetLogo resources page The Netlogo-Users Google group frequently tackles questions on modeling. Be aware that the the group is moderated, so most messages don't go through until at least the next business day. There is also a fairly active NetLogo community on StackOverflow. NetLogo Users tends to be a better place to ask more open-ended modeling questions, for instance "I'm interested in making a model of plate tectonics, can anyone offer advice?". StackOverflow tends to be best for asking specific questions with definite answers, for instance "How can I create a small-world network of turtles and links?".

Suggestions for New Features

While the resources we have to add new features are limited, we're happy to hear new ideas! You might quickly search our issue tracker to see if someone has suggested something similar in the past (if you find something, comment on the issue to let us know it's something people are interested in). Otherwise, please open an enhancement request on GitHub or email our feedback list.

Extension API and Controlling API support

A good place to start is in our wiki. For extension developers, see the page on the extensions API. If you're a developer of an existing extension and interested in porting it to NetLogo 6, please see the 6.0 transition guide. There is also a wiki page on the controlling API.

Often extension and embedding developers have fairly specific questions. We encourage those developers to post to the netlogo-devel Google Group or join us on Gitter.

Building from source

Our goal is that users are able to build NetLogo from source on their platform of choice (Mac, OS X, or Linux). More information can be found on our Building wiki page. If the information on this page doesn't work for you or you have trouble or are confused, please post to netlogo-devel Google Group or join us on Gitter and request help. We're trying to make building NetLogo easy, so we would love to hear any suggestions you have or problems you encounter!

Google Summer of Code

We're very excited to have been accepted to Google Summer of Code 2017 as a mentoring organization! We're even more excited that you're interested in contributing to NetLogo this summer. Please join us in our GSoC 2017 chat room if you have specific questions or are just interested in chatting. Student applications will open up on GSoC on March 20th, and that will be everyone's opportunity to formally declare their interest in working on NetLogo, and what projects they would like to contribute to. Guidelines for what we would like to see in proposals are covered on our organization page.

Please note that an accepted contribution to NetLogo or NetLogo Web is necessary for an application to be considered. Before working on a contribution, please discuss it with us in the GSoC 2017 Gitter channel. This helps us stay on top of things and might save you time working on something that someone else is already planning to do!

For Other Help

Please ask us!

You can email our feedback list or ask your question on Gitter.

Issues

We've all got them. NetLogo's are here: https://github.com/NetLogo/NetLogo/issues

Developer documentation

...is in the wiki.

Discussion group

To talk about NetLogo development, NetLogo internals, the NetLogo source code, usage of NetLogo APIs, etc., join netlogo-devel at Google Groups.

Hosted By: Cloudsmith

Package repository hosting is graciously provided by Cloudsmith.

csv-extension's People

Contributors

brandesnw avatar lacuneta avatar mrerrormessage avatar qiemem avatar sethtisue avatar thebizzle avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

csv-extension's Issues

Runtime exception when passing list of non-lists to `csv:to-file`

extensions [ csv ]
to go
  csv:to-file "test.csv" [ 1 2 3 ]
end

Produces:

error (MatchError)
 while observer running CSV:TO-FILE
  called by procedure GO
  called by Command Center

NetLogo is unable to supply you with more details about this error.  Please report the problem
at https://github.com/NetLogo/NetLogo/issues, or to [email protected], and paste the
contents of this window into your report.

scala.MatchError: 1.0 (of class java.lang.Double)
 at org.nlogo.extensions.csv.CSVExtension$ToFile$$anonfun$perform$1$$anonfun$apply$2.apply(CSVExtension.scala:88)
 at org.nlogo.extensions.csv.CSVExtension$ToFile$$anonfun$perform$1$$anonfun$apply$2.apply(CSVExtension.scala:88)
 at scala.collection.Iterator$class.foreach(Iterator.scala:772)
 at scala.collection.immutable.VectorIterator.foreach(Vector.scala:648)
 at org.nlogo.extensions.csv.CSVExtension$ToFile$$anonfun$perform$1.apply(CSVExtension.scala:88)
 at org.nlogo.extensions.csv.CSVExtension$ToFile$$anonfun$perform$1.apply(CSVExtension.scala:87)
 at org.nlogo.extensions.csv.CSVExtension.using(CSVExtension.scala:110)
 at org.nlogo.extensions.csv.CSVExtension$ToFile.perform(CSVExtension.scala:87)
 at org.nlogo.prim._extern.perform(_extern.java:54)
 at org.nlogo.nvm.Context.stepConcurrent(Context.java:91)
 at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.java:82)
 at org.nlogo.job.JobThread.org$nlogo$job$JobThread$$runPrimaryJobs(JobThread.scala:143)
 at org.nlogo.job.JobThread$$anonfun$run$1.apply$mcV$sp(JobThread.scala:78)
 at org.nlogo.job.JobThread$$anonfun$run$1.apply(JobThread.scala:76)
 at org.nlogo.job.JobThread$$anonfun$run$1.apply(JobThread.scala:76)
 at scala.util.control.Exception$Catch.apply(Exception.scala:88)
 at org.nlogo.util.Exceptions$.handling(Exceptions.scala:41)
 at org.nlogo.job.JobThread.run(JobThread.scala:75)

NetLogo 5.3.1
main: org.nlogo.app.AppFrame
thread: JobThread
Java HotSpot(TM) 64-Bit Server VM 1.8.0_74 (Oracle Corporation; 1.8.0_74-b02)
operating system: Linux 4.4.0-31-generic (amd64 processor)
Scala version 2.9.2
JOGL: (3D View not initialized)
OpenGL Graphics: (3D View not initialized)
model: Untitled

05:01:10.465 SwitchedTabsEvent (org.nlogo.app.Tabs) AWT-EventQueue-0
05:01:10.464 RuntimeErrorEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
05:01:10.464 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
05:01:10.463 AddJobEvent (org.nlogo.app.CommandLine) AWT-EventQueue-0
05:01:10.463 OutputEvent (org.nlogo.app.CommandLine) AWT-EventQueue-0
05:01:10.463 CompiledEvent (org.nlogo.window.CompilerManager) AWT-EventQueue-0
05:01:10.461 CompileMoreSourceEvent (org.nlogo.app.CommandLine) AWT-EventQueue-0
05:01:10.351 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
05:01:10.151 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
05:01:09.951 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0

Maybe the extension could be lenient and interpret csv:to-file "test.csv" [ 1 2 3 ] as a demand to write a single row. If it is deemed wiser to refuse such an input, a better error message should at least be given.

Handle boolean literals

Currently, there are the csv:*-to-strings-and-numbers reporters. It would be nice if they handled booleans as well.

is there any problem with the primitives?

I am trying to use the csv extensions with the csv:from-file primitive, but it looks like if the primitive does not exist - nor ever the csv:from-line or others... is there something I am missing?

Missing License

Hi, I want to use this on a project. What is the license?

Thanks in advance.

Clean up API

Current proposed primitives:

  • csv:csv-row-to-strings-and-numbers -> csv:from-line
  • csv:csv-to-strings-and-numbers -> csv:from-text
  • csv:file-to-strings-and-numbers -> csv:from-file
  • csv:list-to-csv-row -> csv:to-line
  • Doesn't exist yet -> csv:to-text
  • Doesn't exist yet -> csv:to-file

And then toss the *-to-strings primitives and the readable strings writer.

csv:to-file parsing bug

If item 0 of the list "row" element is a negative number, the number is written as a string.

observer> csv:to-file "myfile.csv" [[1 "two" 3] [-4 -5]]

will result in a file myfile.csv containing:

1,two,3
"-4",-5

Empty strings cause csv-row-to-* procedures to error

For example show csv:csv-row-to-strings "" gives:

error (NoSuchElementException)
 while observer running SHOW
  called by Command Center

NetLogo is unable to supply you with more details about this error.  Please report the problem
at https://github.com/NetLogo/NetLogo/issues, or to [email protected], and paste the
contents of this window into your report.

java.util.NoSuchElementException: No more CSV records available
 at org.apache.commons.csv.CSVParser$1.next(CSVParser.java:424)
 at org.apache.commons.csv.CSVParser$1.next(CSVParser.java:390)
 at scala.collection.JavaConversions$JIteratorWrapper.next(JavaConversions.scala:575)
 at scala.collection.Iterator$$anon$19.next(Iterator.scala:401)
 at org.nlogo.extensions.csv.CSVExtension$$anonfun$rowParser$1.apply(CSVExtension.scala:51)
 at org.nlogo.extensions.csv.CSVExtension$$anonfun$rowParser$1.apply(CSVExtension.scala:51)
 at org.nlogo.extensions.csv.CSVExtension$ParserPrimitive.report(CSVExtension.scala:32)
 at org.nlogo.extensions.csv.CSVExtension$ParserPrimitive.report(CSVExtension.scala:29)
 at org.nlogo.prim._externreport.report(_externreport.java:50)
 at org.nlogo.prim.etc._show.perform(_show.scala:13)
 at org.nlogo.nvm.Context.stepConcurrent(Context.java:91)
 at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.java:82)
 at org.nlogo.job.JobThread.org$nlogo$job$JobThread$$runPrimaryJobs(JobThread.scala:143)
 at org.nlogo.job.JobThread$$anonfun$run$1.apply$mcV$sp(JobThread.scala:78)
 at org.nlogo.job.JobThread$$anonfun$run$1.apply(JobThread.scala:76)
 at org.nlogo.job.JobThread$$anonfun$run$1.apply(JobThread.scala:76)
 at scala.util.control.Exception$Catch.apply(Exception.scala:88)
 at org.nlogo.util.Exceptions$.handling(Exceptions.scala:41)
 at org.nlogo.job.JobThread.run(JobThread.scala:75)

NetLogo 5.2-RC3
main: org.nlogo.app.AppFrame
thread: JobThread
Java HotSpot(TM) 64-Bit Server VM 1.6.0_65 (Apple Inc.; 1.6.0_65-b14-462-11M4609)
operating system: Mac OS X 10.9.5 (x86_64 processor)
Scala version 2.9.2
JOGL: (3D View not initialized)
OpenGL Graphics: (3D View not initialized)
model: Analysis

09:01:09.757 RuntimeErrorEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
09:01:09.757 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
09:01:09.757 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
09:01:09.757 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
09:01:09.757 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
09:01:09.757 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
09:01:09.757 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
09:01:09.757 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
09:01:09.757 InterfaceGlobalEvent (org.nlogo.app.InterfacePanel$2 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
09:01:09.757 AddJobEvent (org.nlogo.window.MonitorWidget) AWT-EventQueue-0

NetLogo/CSV-Extension should be the original

instead of it saying "forked from qiemem/CSV-Extension"

how to sort this out: I guess delete this repo, and then @qiemem transfers ownership of the original to the NetLogo org? but then we lose issues here, so hopefully there's a better way

Tests fail when running from main NetLogo repository

[info] - csv::from-file *** FAILED ***
[info]   org.nlogo.nvm.EngineException: Extension exception: Couldn't find file: test/simple.csv
[info]   at java.io.FileInputStream.open(Native Method)
[info]   at java.io.FileInputStream.<init>(FileInputStream.java:120)
[info]   at java.io.FileReader.<init>(FileReader.java:55)
[info]   at org.nlogo.extensions.csv.CSVExtension$FileParserPrimitive.report(CSVExtension.scala:45)
[info]   at org.nlogo.prim._externreport.report(_externreport.java:50)
[info]   at org.nlogo.prim._asm_procedureevaluator_report_0.perform()
[info]   at org.nlogo.nvm.Context.stepConcurrent(Context.java:91)
[info]   at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.java:82)
[info]   at org.nlogo.job.JobThread.org$nlogo$job$JobThread$$runPrimaryJobs(JobThread.scala:143)
[info]   at org.nlogo.job.JobThread$$anonfun$run$1.apply$mcV$sp(JobThread.scala:78)
[info]   ...

@qiemem, would it be OK to modify paths like you did in NetLogo/NW-Extension@d0b42e6 ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.