Apache License 2.0

项目介绍

apache/airavata-django-portal 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 Apache License 2.0 许可证,目前获得 36 个 Star、49 次 Fork。

仓库全名
apache/airavata-django-portal
开源许可证
Apache License 2.0
Star 数
36
Fork 数
49
未关闭 Issue
1

README 摘要

Apache Airavata Django Portal The Airavata Django Portal is a web interface to the Apache Airavata API implemented using the Django web framework. The intention is that the Airavata Django Portal can be used as is for a full featured web based science gateway but it can also be customized through various plugins to add more domain specific functionality as needed. Getting Started The following steps will help you…

完整内容见 GitHub 原始 README 或本页 。

常见问题

airavata-django-portal 用什么语言开发?

主要使用 Python 编写,采用 Apache License 2.0 许可证,目前有 36 个 Star。

airavata-django-portal 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 airavata-django-portal 的源码?

可以直接克隆仓库:git clone https://github.com/apache/airavata-django-portal.git,默认分支为 master;安装与运行步骤见仓库 README。

airavata-django-portal 最近还在维护吗?

仓库最近一次更新为 5月16日,当前有 1 个未关闭 Issue;Star 数为 36,可作为社区活跃度的参考。

关于

Apache Airavata Django Portal Framework

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
148
价值分
37
活跃状态
活跃

语言占比

Batchfile
CSS
Dockerfile
HTML
JavaScript
Python
SCSS
Shell
Vue

README

Apache Airavata Django Portal

Build Status Build Status

The Airavata Django Portal is a web interface to the Apache Airavata API implemented using the Django web framework. The intention is that the Airavata Django Portal can be used as is for a full featured web based science gateway but it can also be customized through various plugins to add more domain specific functionality as needed.

Getting Started

The following steps will help you quickly get started with running the Airavata Django Portal locally. This will allow you to try it out and can also be used as a development environment. If you just want to run the Airavata Django Portal locally, see the Docker instructions below for a more simplified approach.

The Airavata Django Portal works with Python versions 3.6 - 3.10. You’ll need one of these versions installed locally.

You’ll also need Node.js and yarn to build the JavaScript frontend code. Please install Node.js version 19. You can also use nvm to manage the Node.js install. If you have nvm installed you can run nvm install && nvm use before running any yarn commands. See the Yarn package manager for information on how to install Yarn 1 (Classic).

  1. Checkout this project and create a virtual environment.

    git clone https://github.com/apache/airavata-django-portal.git
    cd airavata-django-portal
    python3 -m venv venv
    source venv/bin/activate
    pip install --upgrade pip setuptools wheel
    pip install -r requirements.txt
    
    • Windows note: Use venv\Scripts\activate instead of source venv/bin/activate

    • macOS note: to install the MySQL dependencies you need to have the MySQL development headers and libraries installed. Also, on macOS you need to have openssl installed. See the mysqlclient-python installation notes for more details.

  2. Create a local settings file.

    • Option 1 (recommended). The best way to get a local settings file is to download one from an existing Airavata Django Portal instance. If you have Admin access, you can log in, go to Settings and then Developer Console (/admin/developers) and download a settings_local.py file for local development. Save it to the django_airavata/ directory.

    • Option 2. Otherwise, if you know the hostname and ports of an Airavata deployment, you can copy django_airavata/settings_local.py.sample to django_airavata/settings_local.py and edit the contents to match your Keycloak and Airavata server deployments.

      cp django_airavata/settings_local.py.sample django_airavata/settings_local.py
      
  3. Run Django migrations

    python manage.py migrate
    
  4. Build the JavaScript sources. There are a few JavaScript packages in the source tree, colocated with the Django apps in which they are used. The build_js.sh script will build them all.

    ./build_js.sh
    
    • Window note: on Windows, run .\build_js.bat instead
  5. Load the default Wagtail CMS pages.

    python manage.py load_cms_data new_default_theme
    
  6. Run the server

    python manage.py runserver
    
  7. Point your browser to http://localhost:8000.

Docker instructions

To run the Django Portal as a Docker container, you need a settings_local.py file which you can create from the settings_local.py.sample file. Then run the following:

  1. Build the Docker image.

    docker build -t airavata-django-portal .
    
  2. Run the Docker container.

    docker run -d \
      -v /path/to/my/settings_local.py:/code/django_airavata/settings_local.py \
      -p 8000:8000 airavata-django-portal
    
  3. Load an initial set of Wagtail pages (theme). You only need to do this when starting the container for the first time.

    docker exec CONTAINER_ID python manage.py load_cms_data new_default_theme
    
  4. Point your browser to http://localhost:8000.

Multi-architecture images

To build and push multi-architecture images, first create a builder (one time)

docker buildx create --name mybuilder --use

then run

docker buildx build --pull --platform linux/amd64,linux/arm64 -t apache/airavata-django-portal:latest --push .

Documentation

Documentation currently is available at https://apache-airavata-django-portal.readthedocs.io/en/latest/ (built from the ‘docs’ directory).

To build the documentation locally, first set up a development environment, then run the following in the root of the project:

mkdocs serve

Feedback

Please send feedback to the mailing list at [email protected]. If you encounter bugs or would like to request a new feature you can do so in the Airavata Jira project (just select the Django Portal component when you make your issue).

Customization

See the Customization Guide in the documentation for information on how to customize the Airavata Django Portal user interface. To get started we recommend going through the Gateways Tutorial. This tutorial covers the different ways that the user interface can be customized.

Contributing

For general information on how to contribute, please see the Get Involved section of the Apache Airavata website.

Setting up development environment

Run pip install -r requirements-dev.txt to install development and testing libraries.

Use a code editor that integrates with editorconfig and flake8. I also recommend autopep8 for automatically formatting code to follow the PEP8 guidelines. Prettier is used for formatting JavaScript and Vue.js code.

See the docs for more information on developing the backend and frontend code.

Running Django Tests

Run ./runtests.py to run the Django unit tests.

License

The Apache Airavata Django Portal is licensed under the Apache 2.0 license. For more information see the LICENSE file.

评论

暂无评论