Git Product home page Git Product logo

lxaw / delta Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 2.0 14.97 MB

Platform for sharing and editing research data.

License: MIT License

Procfile 0.01% Python 14.91% CSS 25.09% JavaScript 54.01% HTML 0.19% Shell 0.01% TeX 5.79%
data-sharing research data-annotating data-reviewing django-react django-rest django-rest-framework django-rest-framework-react react react-django react-rest react-rest-api rest rest-api django-rest-react rest-react

delta's Introduction

What is it โ“

DataDock is a web file system designed for use by researchers and data scientists. It is essentially a file transfer system with a social media and market aspect. Researchers or data scientists can perform CRUD operations on data, and can also assess the validity of data by creating posts on data sets or ML models or by rating data sets or ML models.

NOTE: Name Change

Please note that DataDock used to be called Delta. We are working on renaming the files accordingly. At the moment, there may be some directories / files with Delta in the name.

Style Guide ๐Ÿ““

Please adhere to the guidelines for JavaScript and Python found here

Running ๐Ÿƒ

Note the following instructions are designed for *nix machines.

To run, first clone the repository by running: git clone https://github.com/SCCapstone/DataDock

Then cd into DataDock.

You should have installed pipenv. Install following https://pipenv.pypa.io/en/latest/install/ or some other resource online.

When installed, you should be able to run pipenv sync to sync the pipenv file, and then pipenv install to install dependencies.

To run the backend, cd into delta_web with cd delta_web. Change directory into delta with cd delta.

The currect working directory should be something like: [OTHER_DIRECTORIES]/DataDock/delta_web/delta/

Then run pipenv run python3 manage.py runserver. Now the backend should be running.

To set up npm, from the same directory as prior cd into frontend. Install the necessary JavaScript requirements with npm i.

On terminal two, type: npm run dev to begin the front end server.

To view the website, open up a browser and type in the url localhost:8000. You should be directed to a login screen.

External Requirements ๐Ÿ’พ

In order to build this project, you will first have to install:

Testing ๐Ÿงช

Testing the DataDock application includes more than a dozens unit and behavioral tests. To accomplish this, we use a combination of testing libraries, which are listed below.

Testing Technology ๐Ÿ’ป

For behavioral tests we use Jest.

For unit tests we use the standard Django testing framework. You can read more on that here

Running Unit tests ๐Ÿ“

All unit tests are found in subdirectories of the the delta directory /DataDock/delta_web/delta

Be sure to be in this directory when running the following commands to perform unit tests.

To run the whole test suite, type pipenv run python3 manage.py test. From there the terminal will show what tests are found, what pass, and what warnings or errors are shown. You may also run individual unit tests or directories.

Different commands for testing

Whole test suite: pipenv run python3 manage.py test

Test directory: pipenv run python3 manage.py test accounts/

A specific test: pipenv run python3 manage.py test [directory_name.test_directory_name.TestCaseName.specific_test_name] i.e. pipenv run python3 manage.py test accounts.tests.RegistrationTestCase.test_registration

Unit tests run against APIs in the following sub-directories:

  • accounts/ -- This is under the tests.py file.
  • data/ -- This is under the tests.py file.
  • organizations/ -- This is under the tests.py file.
  • social/ -- This is slightly different and under the tests folder. Within this folder are the test models (test_models.py), the test setup (test_setup.py) and the test views (test_views.py).

Running Behavioral tests:

Behavioral tests are performed using Jest. You can read more on how Jest is used with React here.

All the behavioral tests can be found in /DataDock/delta_web/delta/frontend/tests/

When running behavior tests, be sure to be in the following directory:

/DataDock/delta_web/delta/frontend/

To run the tests, from the above directory type npm run coverage.

From there the terminal will show what tests are found, what pass, and what warnings or errors are shown.

Note that when making a behavioral test with Jest the JS file must have a .test.js extension.

Support โค๏ธ

  • DataDock is an ambitious project. As such, there are many things that can be added. Please feel free to open an issue for something you think may be useful. This is intended to be a community project.

delta's People

Contributors

lxaw avatar

Watchers

 avatar

delta's Issues

should zip files

If we zip all the files / folders, should be easier for store and transmit

when createsuperuser, add profile

Since profile is 1-1, when you create a super user with python3 manage.py createsuperuser, it will successfully create a superuser, but without a profile. Need to make it so we create a profile when we create the user.

Error: File is larger than 5242880 bytes

Clicked to upload a file that is a pretty standard size (9.3M), but received the error Error: File is larger than 5242880 bytes. I suppose the fix is an environment variable in Django to allow for larger files.

user auth content not persistent across pages

For some reason, after a log in the user auth content is not persistent across pages. At the moment, a hack to fix this is to log in as an admin on one window and continue as a user after that. Not immediately sure what is wrong.

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.