Giter VIP home page Giter VIP logo

comses / comses.net Goto Github PK

View Code? Open in Web Editor NEW
17.0 6.0 16.0 17.42 MB

comses.net wagtail site

Home Page: https://www.comses.net

License: GNU General Public License v3.0

Python 67.14% HTML 0.80% Shell 0.18% JavaScript 0.16% TypeScript 3.52% Dockerfile 0.25% Vue 11.81% SCSS 1.43% R 0.14% Jinja 14.20% Makefile 0.35%
reproducibility agent-based-modeling computational-modeling digital-repository community-project open-science wagtail codemeta comses

comses.net's Introduction

Support Open Science @ CoMSES Net

Django CI

All Contributors

CoMSES Net is an open, international community of researchers, educators and professionals with the common goal of improving the way we develop, document, share, and (re)use computational models in the social and ecological sciences. This repository contains the codebase for the comses.net CMS and Model Library, built with Wagtail, Django Rest Framework, and VueJS.

Computational Model Library

The Computational Model Library maintains distinct submission information packages (SIPs) and archival information packages (AIPs) using bagit, and emits structured, standardized metadata on every model landing page. All computational models offer citations that adhere to the guidelines and practices set forth by the Force 11 Software Citation Working Group. Models can also undergo peer review to receive a DOI and open code badge.

Code of Conduct

Members who participate in this project agree to abide by the CoMSES Net Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

Ways to Contribute to CoMSES Net

Members are encouraged to participate and we welcome contributions of all kinds to our collective effort. Here's how you can contribute:

Publish your Model Source Code

We develop and maintain the CoMSES Model Library, a digital repository for publishing model code that supports discovery and the FAIR Principles for Research Software, software citation, reproducibility and reuse.

Publish your model here: https://www.comses.net/codebases/

Peer Reviews

The CoMSES Net Peer Review Process helps to verify that a computational model's source code and documentation meets baseline community standards from the software engineering and scientific communities that we serve.

Peer reviewers follow a simple checklist and inspect model code and documentation for completeness, cleanliness, and the ability to run the computational model without errors.

We're always looking for new members willing to review computational models. Feel free to submit your own computational models for peer review as well - after they pass peer review they will be eligible to be issued a DOI.

Lead and Organize Community Activities on Our Forums

Members of our community also use the CoMSES Net Discourse Forums to discuss models, events, jobs, ask questions, and more. If you'd like to lead a journal club or model club or coordinate any other activities on these forums, please contact us.

Update Event and Job Boards

All registered CoMSES Net members can post information about upcoming conferences, workshops and job openings on our events and jobs boards. If you would like to spread the word for new job opportunities or events, please feel free to register on our site and post it on our site!

Events board: https://www.comses.net/events/

Jobs board: https://www.comses.net/jobs/

Usability Testing

CoMSES Net is actively working with the Science Gateways Community Institute to improve the usability of our services. Please let us know if you'd like to participate in upcoming usability studies, or help us conduct usability studies in your institution or area. If you encounter any usability issues while using CoMSES Net we'd love to hear your feedback too! You can use the GitHub issues here or send us a private note through the contact form.

Development

Technology Stack

Javascript: VueJS, typescript

Python: Django Rest Framework, Wagtail

Linux, PostgreSQL, Redis, Elasticsearch, Docker

Pull requests, issues to request new features, enhancements, or bug reports are all welcome. Please make sure to review the CONTRIBUTING.md guidelines.

Create a pull request from a fork

Create an issue

Development Environment Setup

For more detailed development environment instructions, refer to the CoMSES Developer Guide.

Dependencies

  1. Install Docker (Ubuntu-specific install instructions)
  2. The new docker-compose-plugin (e.g., $ apt install -y docker-compose-plugin) provides a docker compose ... command that replaces old docker-compose ... invocations
  3. Create or update the file /etc/sysctl.d/99-docker.conf and add a line vm.max_map_count=262144 so elasticsearch can run properly. You can create / access the file with any plaintext editor like nano e.g., $ sudo nano /etc/sysctl.d/99-docker.conf - follow the in-terminal nano instructions to save and exit.

Apple Silicon + Docker workarounds

For M1/M2 chipsets you must have export DOCKER_DEFAULT_PLATFORM=linux/amd64 set to properly build the Docker images from the command-line. Place this environment variable setting in a shell startup file e.g., .bashrc | .profile | .zshrc | .zprofile so that it will be automatically set when you open an interactive CLI shell to initiate a Docker build.

Building and installing from a fresh clone of the repository can be done by:

  1. $ make build
  2. Edit the generated config.mk file and set BORG_REPO_URL to the URL of a borg backup with preserved comses.net gateway content (WIP)
  3. $ make restore

Debugging

Enabling debugging requires custom workarounds to make the Docker environment accessible to your local system and IDEs. Visual Studio Code has a container environment that can be useful: https://code.visualstudio.com/docs/remote/containers

You can also install project dependencies into your local system. Maintaining isolation with Python and JavaScript virtual environments is strongly recommended.

Other CoMSES Projects

Contributors โœจ

This project follows the all-contributors specification. Contributions of all kinds are welcome!

Contributors (emoji key):

cpritcha
cpritcha

๐Ÿ’ป ๐Ÿ“– ๐Ÿ› ๐Ÿšง โš ๏ธ ๐Ÿ‘€
Christine Nguyแป…n
Christine Nguyแป…n

๐Ÿ› ๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ โš ๏ธ ๐Ÿšง
Katrin Leinweber
Katrin Leinweber

๐Ÿ’ป
A Lee
A Lee

๐Ÿ› ๐Ÿ’ป ๐Ÿ“– ๐Ÿ” ๐Ÿค” ๐Ÿš‡ ๐Ÿšง ๐Ÿ“† ๐Ÿ‘€ ๐Ÿ›ก๏ธ โš ๏ธ
sgfost
sgfost

๐Ÿ’ป ๐ŸŽจ โš ๏ธ
BlllueSea
BlllueSea

๐Ÿ’ป
Charles Sheelam
Charles Sheelam

๐Ÿ’ป
hwelsters
hwelsters

๐Ÿ’ป
Krisha Vekaria
Krisha Vekaria

๐Ÿ’ป

comses.net's People

Contributors

alee avatar allcontributors[bot] avatar asuworks avatar bllluesea avatar charlessheelam avatar cpritcha avatar dependabot[bot] avatar hwelsters avatar karthik99999 avatar katrinleinweber avatar kmuraish avatar krisha100 avatar manuvanegas avatar seanbergin avatar sgfost avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

comses.net's Issues

what to do with Author / Profile / User

would be nice to be able to link Authors to Users / Profiles.

Add a nullable User OneToOne in Author but then we duplicate first_name and last_name in User - I think this is ok because the citation author string representation isn't always the same as User.first_name + User.last_name

Add `is_member` field to the Profile model

Need to keep track of if a user is an affiliate or a full member. Maybe a better idea for this to be an enum (Full Member, Affiliate, Guest) or to make special permission groups.

Integrate Model References with Catalog App

Models sometimes have references on the OpenABM website. These references are strings right now.

Eventually we may want to integrate these references with the catalog application. The import script currently leaves references as strings.

Single Page App or Server Side Rendering plus JavaScript?

Single Page App

Pros

  • No reloading of header and footer content between pages
  • JSON rest API is better tested because we our application uses all of it
  • JavaScript dependencies and code are neatly bundled. Frontend logic is all in JavaScript.

Cons

  • Duplication of code for routing, data structures and validation
  • Manual management of history
  • More work to get Google Scholar and other services to index the site
  • More work to integrate with Wagtail menu system
  • Little to nothing works without JavaScript

Server Side Rendering + JavaScript

Pros

  • Use built in Django functionality
  • Simple pagination and display

Cons

  • Harder to deal with streaming asynchronous updates (status notifications for model runs or see updates to the main page without a refresh)
  • More difficult to determine to what is done by JavaScript and what is done by Django
  • JavaScript dependency management is more manual

Replace Roles with Opt-Ins

Should there be a checkbox to opt-in for reviewing models?

Could this Roles in the current OpenABM site?

StreamField formats

Consistently named StreamField blocks will reduce deserialization code on the front end

General

  • paragraph (TextBlock)
  • heading (CharBlock)
  • subheading (CharBlock)
  • image (ImageChooserBlock)
  • document (DocumentChooserBlock)
  • page (PageChooserBlock)
  • embed (EmbedBlock)

Components

  • cardlist (ListBlock[CardBlock])
  • card (CardBlock)
  • carousel

software citation

Codebase landing page:

  • codebase.root = /codebase/<codebase.identifier>
  • base software package landing page includes all available versions + metadata for latest version

Codebase release landing page: `/<codebase.root>/releases/<release.identifier>

  • release.identifier could be an ID or semver number, discuss
  • metadata specific to that release: also show all available versions + metadata
  • Impact, Citation, Alerts (if using an older version)
  • expose metadata conforming to https://github.com/codemeta/codemeta schema or other standardized metadata schema

Relevant software citation working group discussion: force11/force11-scwg#157

problematic models

no contributors:

https://test.comses.net/codebases/2227/

no parent model nids

2017-01-31 22:39:22 WARNING drupal_migrator.database_migration:_extract:378 Unable to locate parent model nid  for version 2333
2017-01-31 22:39:22 WARNING drupal_migrator.database_migration:_extract:378 Unable to locate parent model nid  for version 2339
2017-01-31 22:39:22 WARNING drupal_migrator.database_migration:_extract:378 Unable to locate parent model nid  for version 2352
2017-01-31 22:39:24 WARNING drupal_migrator.database_migration:_extract:378 Unable to locate parent model nid  for version 2405
2017-01-31 22:39:37 WARNING drupal_migrator.database_migration:_extract:378 Unable to locate parent model nid 4675 for version 4684
2017-01-31 22:39:37 WARNING drupal_migrator.database_migration:_extract:378 Unable to locate parent model nid 4675 for version 4685
2017-01-31 22:39:38 WARNING drupal_migrator.database_migration:_extract:378 Unable to locate parent model nid 4675 for version 4746

files exist on the filesystem, but cannot be found in the DB

  • 3075 (Coherence based opinion dynamics), has files
  • 3622 (no files)
  • 3053 (multiple versions, no files)

email interface to archival

consider building minimalist versioning email bot e.g. archive+<codebase.id>@comses.net

  • parse documents and version as plaintext
  • body: commit message with subject: header or allow override metadata (embedded in the body or as attached file)
  • zipfile attachment interpreted as structured codebase (or codebase + provenance metadata file)
  • error messages bubble back out as emails with links to web UI where they can be resolved faster

Frontend UI Functionality

Does not include styling

Jobs

  • List
  • Detail
  • Create
  • Update

Events

  • List
  • Detail
  • Create
  • Update

Codebase

  • List
  • Detail
  • Create
  • Update

CodebaseRelease

  • List
  • Detail
  • Create
  • Update

CodebaseReview

  • List
  • Detail
  • Create
  • Update

Discourse Integration

Show related forum entries on

  • Codebase
  • CodebaseRelease
  • User Profile

Home Page

  • Job summary
  • Event summary
  • Codebase summary
  • Featured models
  • Discourse forum summary

User Profile

  • Mapping between Discourse users and CoMSES users
  • List
  • Detail
  • Create
  • Update

migrate model library to git repositories

Adjust code in file_migration.py.

Store nid in secondary id hash field and all model + model version metadata in the rdbms. Still need idmapper or equivalent to link a model versions to its Authors, Users, Keywords

Need to figure out what permanent URL structure we want for referencing models.

At first pass, include model version file paths in an extra json field Django rdbms, we'll remove later. Then construct git repositories following conventions-based filesystem layout (cribbed from https://swcarpentry.github.io/good-enough-practices-in-scientific-computing/).

.
|-- CITATION
|-- README
|-- LICENSE
|-- requirements.txt
|-- data
|   -- birds_count_table.csv
|-- doc
|   -- notebook.md
|   -- manuscript.md
|   -- changelog.txt
|-- results
|   -- summarized_results.csv
|-- src
|   -- sightings_analysis.py
|   -- runall.py

import forum + comments into discourse

Need to sync users between Discourse + Wagtail first.

Forum.json + Comments.json

Comments.json also has comments attached to other nodes (including replies to Forum posts in Forum.json), which we may want to import to discourse as well.

file storage

compare

@cpritcha please feel free to update (with sources) if you still think modern filesystems can support many files without significant performance degradation.

At this point I'm considering a hybrid HashFS style implementation, using hashfs to store the submitted package, using the submitted package path as the parent directory and store Releases as bags under it. So something like
/repository/6a/e8/a7/5555209fd6c44157c0aed8016e763ff435a19cf186f76863140143ff72.tar.gz
would be the path of the original submitted archive and
/repository/6a/e8/a7/ would be the root directory for all CodebaseRelease archives.

HashFS lets us choose how to slice up the dir space, this one happens to be 4/2.

hypothesis failed event test

@cpritcha did Hypothesis find a bug?

ERROR: test_add_change_view (home.tests.test_views.EventViewSetTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/code/home/tests/test_views.py", line 112, in test_add_change_view
    @given(generate_event_data(), st.sampled_from(('change', 'add', 'view')))
  File "/usr/local/lib/python3.5/dist-packages/hypothesis/core.py", line 524, in wrapped_test
    print_example=True, is_final=True
  File "/usr/local/lib/python3.5/dist-packages/hypothesis/executors.py", line 78, in <lambda>
    lambda: function(data)
  File "/usr/local/lib/python3.5/dist-packages/hypothesis/executors.py", line 33, in execute
    return function()
  File "/usr/local/lib/python3.5/dist-packages/hypothesis/executors.py", line 78, in <lambda>
    lambda: function(data)
  File "/usr/local/lib/python3.5/dist-packages/hypothesis/core.py", line 111, in run
    return test(*args, **kwargs)
  File "/code/home/tests/test_views.py", line 117, in test_add_change_view
    self.check_authorization(action, owner, event)
  File "/code/wagtail_comses_net/test_helpers/view.py", line 133, in check_authorization
    self._check_authorization(user, obj, action, False)
  File "/code/wagtail_comses_net/test_helpers/view.py", line 95, in _check_authorization
    data = self._check_serialization_round_trip(obj)
  File "/code/wagtail_comses_net/test_helpers/view.py", line 89, in _check_serialization_round_trip
    if serializer.is_valid(raise_exception=True):
  File "/usr/local/lib/python3.5/dist-packages/rest_framework/serializers.py", line 244, in is_valid
    raise ValidationError(self.errors)
rest_framework.exceptions.ValidationError: {'location': ['This field may not be blank.']}

Create a Sitemap

Determine how the education and resources pages should be arranged in the new site. Wagtail would make it easy to generate breadcrumbs and manage content if we stick to a tree structure.

codebase release peer review

  • implement simple version first, candidate pool only comses net full members (or reviewer)
  • provide checklist, emphasize how fast it will be
  • email-driven to start with
  • need status flags to track state

Remaining tasks:

  • invite candidate reviewers via email
  • form for reviewer feedback (unique UUID URL or based on authenticated access under their user profile page)
  • send emails to editor for reviewer acceptance / decline / feedback
  • automatic generation of PeerReviewActions based on activity

social auth + discourse SSO

dependency metadata format

metadata for versioned dependencies to build / run models

Python

  • requirements.txt

NetLogo

Repast Simphony

  • Eclipse

Java

  • Maven pom.xml / Ivy ivy.xml

discussion forums

Roll our own bad implementation or integrate with and rebrand a self-hosted discourse.org Docker instance:

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.