oTree Forum >

oTree source, development model, license

#1 by olafghanizadeh

oTree is a very nice project that removes barriers to entry to creating experiments, however, the open source aspect of the codebase seems to be missing. I can't find any way to access the source code of the latest versions, according to PyPi latest version is 5.10.3 from February this year. None of the repositories on Github matches with that release history: https://github.com/oTree-org?tab=repositories

There seems to be no straightforward way of contributing to the project, or fork and make customisations. A pity that any such requests has to go through a forum or an email. 

Please let me know if I have missed something on how to access the latest source code, contributing guidelines or similar.

#2 by Chris_oTree

Yes oTree is open source. If you have oTree installed on your computer, you have the source code. The package on PyPI is a zip of the source code.

#3 by Chris_oTree

People are welcome to contribute features to oTree. I am currently working heavily with a user who is in the process of contributing a major new feature. If you sent me an email with a contribution idea/request I’m sorry if I didn’t reply yet as I have been focused on these other new features.

#4 by gr0ssmann

oTree is not open source. "The Open Source Definition" of the Open Source Initiative (https://opensource.org/osd/) states:

    5. No Discrimination Against Persons or Groups
    The license must not discriminate against any person or group of persons.
    6. No Discrimination Against Fields of Endeavor
    The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.

However, using oTree for research without citation is not allowed. Therefore, oTree is not open source because open source software must not impose restrictions on users.

For the same reason, oTree is also non-Free. It violates Freedom 0 of the FSF's definition (https://www.gnu.org/philosophy/free-sw.en.html#four-freedoms):

    The freedom to run the program as you wish, for any purpose (freedom 0).

See also the Debian Free Software Guidelines: https://wiki.debian.org/DebianFreeSoftwareGuidelines

Since every oTree app uses oTree internals and attaches specifically to oTree, every oTree app developed by anyone is a derivative work of oTree. Had oTree a copyleft license, then every oTree app would have to have the same license as oTree. However, oTree has a non-copyleft license, which means that the citation requirement must be understood as an obligation upon the user of oTree - for example, someone re-running an experiment that someone else built - and not the developer of an oTree app, where a citation requirement could theoretically be permissible as an aspect of copyleft. But an EULA that makes an obligation upon a user is incompatible with open source and Free Software.

Note that I am not saying whether that's good or bad or should be changed. Just pointing out the actual definitions. oTree is better described as proprietary "source-available software" (https://en.wikipedia.org/wiki/Source-available_software).

#5 by Chris_oTree

Thank you for your opinion but I don't agree with your analysis.

You say that oTree violates "The license must not restrict anyone from making use of the program in a specific field of endeavor". However, "using oTree for research without citation" is not a field of endeavor, or anything like those examples about not being used for genetic research or business.

You also cite "5. No Discrimination Against Persons or Groups" but I don't see how that relates to the point being made.

#6 by gmdcastillo

One thing I think we can agree is that oTree definitely doesn't follow open development. It would be lovely if we could contribute with pull requests and use GitHub to submit issues.

#7 by peterjc

I agree that oTree doesn't follow an open development model. If anything, oTree is now less open than it was - as an example the issue tracker on the core repository has been closed.

Relevant to this discussion, issue 542 was about the GitHub repository missing recent releases - https://github.com/oTree-org/otree-core/issues/542#issuecomment-891813714 - and the code on https://github.com/oTree-org/otree-core/ was last updated 13 Decemeber 2020 for v3.3.6. It was clear that actual development happened elsewhere, presumably in a private repository.

At least oTree is open enough that you can download the source code, and look at changes between releases manually, but that is far more work.

#8 by Chris_oTree

Hi all, I develop oTree in the way I do because I'm comfortable with that and it gets me the most results with my limited time.

I understand that some people are enthusiastic about open development / GitHub etc, but that is something to practice in one's own open-source projects, not to compel others to practice in theirs. It's fine to suggest it once, but if the developer is not interested then it's best to just accept that and move on. (I say this because there is a user who has pressured me about otree-core in a way that I find excessive, especially when they are already using what I built for free.)

Open development is a great fit for some projects, but not for others. Check out this official GitHub article on the matter: https://github.com/readme/featured/how-open-is-open-source.

I follow open development for some of my oTree-related repos but not all. In the case of otree-core, it's a complex codebase and there are many interdependencies with my other projects. I have a system other than the classic Git/GitHub workflow, which I have found to add overhead and distraction. Also, from a privacy perspective I don't like feeling that every little thing I do day-to-day is visible to the public.

Some people have said that if I follow open development, I will attract contributions from the community. Well, many of oTree's repositories are already openly developed on GitHub (documentation, sample games, tools, etc); if you want to contribute, please go ahead! If you have been following oTree, you've seen that I have taken many initiatives to get people involved in various ways.

oTree-core followed an open development model for a long time, with clearly labeled branches, issues, commits, and tags. I put a lot of effort into collaborating with potential contributors. But still there were not many people who stepped up to the plate. So I decided that since I am the one doing the work, I should do it in the way that is most practical for me. If you want to contribute to otree-core, then the source code is here (https://pypi.org/project/otree/#files); we don't need a GitHub pull request, just send me the code, or publish a diff/patch. As long as you are using a recent version of oTree, I will be able to merge it in. (Or just post your idea/proposal on this forum.) With the current rate of contributions, that is actually the most efficient solution. If there are enough valuable contributions, then I will introduce a more formal process. But I want to see evidence before changing my workflow.

My goal is to make oTree an excellent software for the majority of social scientists who are not experienced programmers. I found that the otree-core GitHub site was not helping me toward that goal. What I have learned is that the users who make the most vocal requests are often also some of the biggest outliers in terms of having needs that are not very relevant to most of oTree's userbase. By the way, related to the GitHub article I posted above (https://github.com/readme/featured/how-open-is-open-source), also check out the discussion on Hacker News about the developer mentioned in that article: https://news.ycombinator.com/item?id=25940195. I'm linking to it so you can see how much support there is from other open source devs in the comments and understand that there is a lot of nuance about how open source should be done.

#9 by recap

As with @olafghanizadeh can someone clarify the relation between the github otree-core repo and the pip packages. When I pull master I get version 5.0.0a1 while pip lists packages till version 6.0.0a9. My question is: where is all the code in between? Am I missing a repo?

#10 by Chris_oTree

Hi, this is what I explained in my above post. See the 4th and 6th paragraphs. Anyway, I just took down the repo since it was not up to date anyway.

#11 by aseyq

Dear Chris,

This is a good thread and occasion to start with thanking you. You see our issues often here in this forum, but praises are often invisible. So on behalf of oTree users, let me start with it: Thank you so much for your efforts and constant help, we are immensely grateful for your massive efforts. 

Although I believe oTree would benefit from an open-development model and utilize the potential efforts of the community, it is very understandable that you develop it the way it is most convenient to you. Of course, you don't owe anything to anyone; if anything, it's the other way around. 

Let me also share my opinion, which might reflect other people's concerns. My main interest is whether oTree is open or not, if, one day, you stop developing oTree, decide that you'd like to continue developing it as proprietary software or take an alternative direction etc., whether anybody else could step up and create a derivative based on the old software. As far as I understood, the license of oTree is MIT + the citation requirement. So my understanding is that it allows derivatives to be produced (Probably keeping the citation requirement, I am not sure). So we should be safe on that side. (Correct me if I am wrong.) 

Another aspect is that I feel like sometimes oTree changes so fast without collecting many opinions. This can be tough to adjust, but all I can say about it is "fair enough." However, I believe that it can really help the development process. People probably are reluctant to send you an email. So maybe a separate thread on this forum might help get the optimal design when something big is subject to change. (To be fair, I saw you already have been doing it on some occasions in the old email group.)

And finally, about the "copyleft" aspect. It didn't occur until @gr0ssmann pointed out that oTree projects can be considered derivative work. So probably, it is better not to have a more restrictive license, isn't it? I usually open-source my code for obvious scientific reasons, but I wouldn't like to be obliged and unable to decide when I should do it.

Anyways, again, we are really grateful. And let us know how we can help you or reduce your work from time to time.

#12 by somas

Hi Chris. First of all, many many thanks for the effort you've been doing. I think we all can appreciate that.

My concern (and I think one of the most common ones) isn't as much as the closed development but the inability to have an effective control system and issue tracking of the source code. I'm an open source developer myself of a moderately popular application and I really get your struggles about burnout by open development, so I won't insist on that specific point.

But having access to a .git repo (even if PRs are blocked) is insanely useful when working with a big codebase like oTree. Being able to bisect to find when an issue began, or to easily see diffs between versions. And of course comprehensive release notes between each minor version. Usually user-facing release notes are not as detailed as the history of commits. For example, pypi has a 6 prerelease, but there's no easy way to understand what has changed between 5 and 6, or the direction of the project.

On top of that, the issue tracker is just way better than any forum for searching for issues others have had previously. I know for experience that triaging and maintaining an issue tracker is s*it work, but I guess contributors could help there.

I don't want to insist, and I guess you've made your decision - just wanted to voice out my concerns

#13 by peterjc

I would echo all of that from "somas" - including the thank you.

Even a public "read only" repository was just to contain the releases (on branches as appropriate like the main versions), it would be incredibly useful - like comparing the code in a specific file between two arbitrary versions. I've done this myself in the past - and even partly automated what I needed in building such a repository from release snapshots: https://github.com/peterjc/tarball2git

Kind regards,


#14 by Chris_oTree

Hi, these posts about wanting a Git repo are repeating the same things that have been said many times, such as here (https://groups.google.com/g/otree/c/foKpjU43pgo/m/oQryFnNJCgAJ) and especially in the GitHub thread you were both in. You can see my replies in that Google Groups thread as well as in my post above.

Given that you do not appear to be satisfied with my stance, be aware that oTree is a "do-ocracy". The more you contribute to the work, the more seriously your opinion will be taken about how the project is developed (development style, processes, tools/platforms, major decisions). If you are interested in getting involved, I have a couple of suggestions.

@peterjc: Given that you have posted many times in oTree's various forums about the importance of having a Git repo for otree-core, I can see this is very important to you. Back in Jan 2022, I said that if someone made a Git repo out of the PyPI releases, I would be happy to host it on the official GitHub. You said you would make something based on your tarball2git tool and would prepare a pull request. In September 2022 you wrote: "I got distracted and did not make that pull request, but note the otree-core on this GitHub repo has not changed since 13 Dec 2020". See the attached screenshot. How about creating that repo at this point?

@somas: I checked out your GitHub and see that many of your repos are in Spanish. Translating oTree's documentation to Spanish is a high priority because of the many Spanish speakers who are currently trying to learn oTree. Would you be able to help with this? (It needs to be done by someone who knows oTree programming to ensure the translation is correct.) The repo is here: https://github.com/oTree-org/otree-docs/. The README has localization instructions, and it has already been translated to Chinese and Japanese so you can follow those examples. I'm not sure how long it will take but the Chinese translation was done by one person in a few weeks during the evenings.

If anyone else would like to get involved, please post here and I can propose some appropriate starter projects.

#15 by peterjc

Those are both well defined projects, thank you. I'm not currently working with oTree, but have a project with it lined up within the next six months or so. If version 6 is ready by then (currently in pre-release on PyPI), and no one else has volunteered, that'll be an extra incentive for me to put together a git history of oTree as last time round I was using version 5.

#16 by somas

@Chris_oTree that seems actionable but also time-intensive and I'm already thin spread among my job and other open source projects. I may try to give it a go in a future if I get more time though

Write a reply

Set forum username