PosGraduacao

所属分类:后台框架
开发工具:HTML
文件大小:2646KB
下载次数:0
上传日期:2022-12-08 10:24:24
上 传 者sh-1993
说明:  港口应用社会科学中心(CCSA)研究生项目工人和学生的实用系统...
(Utility system for the workers and students of postgraduate programs at Applied Social Sciences Center (CCSA, in portuguese) in Universidade Federal do Rio Grande do Norte (UFRN).)

文件列表:
Dockerfile (96, 2021-05-24)
LICENSE (33452, 2021-05-24)
app.py (1791, 2021-05-24)
delete_database.js (36, 2021-05-24)
diary (0, 2021-05-24)
diary\18_03_2020.org (1744, 2021-05-24)
diary\19_04_2021.org (266, 2021-05-24)
diary\25_03_2020.org (323, 2021-05-24)
diary\28_03_2021.org (319, 2021-05-24)
docker-compose.yml (154, 2021-05-24)
models (0, 2021-05-24)
models\clients (0, 2021-05-24)
models\clients\api_sistemas.py (4486, 2021-05-24)
models\clients\mongo.py (558, 2021-05-24)
models\clients\util (0, 2021-05-24)
models\clients\util\keyring.py (2033, 2021-05-24)
models\dao.py (18767, 2021-05-24)
models\factory.py (5973, 2021-05-24)
models\users.py (4918, 2021-05-24)
requirements.txt (663, 2021-05-24)
scraping (0, 2021-05-24)
scraping\institutional_repository.py (3178, 2021-05-24)
scraping\professors_sigaa.py (2124, 2021-05-24)
settings (0, 2021-05-24)
settings\extensions.py (674, 2021-05-24)
settings\files (0, 2021-05-24)
settings\files\api_keys.fake.json (228, 2021-05-24)
settings\files\news_installation.js (1848, 2021-05-24)
settings\files\standard_installation.js (56588, 2021-05-24)
settings\files\standard_installation_tests.js (55969, 2021-05-24)
static (0, 2021-05-24)
static\assets (0, 2021-05-24)
static\assets\ccsa_logo.png (81184, 2021-05-24)
static\assets\icon-acessoainformacao.png (1883, 2021-05-24)
static\assets\lattes.gif (1059, 2021-05-24)
static\assets\logo-alrn.jpg (67865, 2021-05-24)
static\assets\logo-ifpb.jpg (16908, 2021-05-24)
... ...

# Plataforma de Pos-Graduacao ## Version 1: Minerva Utility system for the workers and students of postgraduate programs from University Applied Social Sciences Center ([CCSA](https://ccsa.ufrn.br/)/[UFRN](http://ufrn.br/)). This first goal is to start assembling data and providing basic information management. ## Setting up development environment This will show up how to start the project using Linux **Lubuntu 17.04** with virtualenv. > Read [wiki](https://github.com/ccsa-ufrn/PosGraduacao/wiki/) for information about dockerized setup. Having already installed: - Python 3.5 interpreter, ```python3``` (was already installed by default); - PyPI 9 client, ```pip3``` from 'python3-pip' package (usual ```sudo apt install``` command); - VirtualEnv module, ```python3 -m virtualenv``` command (usual ```sudo pip3 install``` script); and - MongoDB 3.2 and its shell ```mongo``` from an updated source (following [this Digital Ocean tutorial](https://www.digitalocean.com/community/tutorials/como-instalar-o-mongodb-no-ubuntu-16-04-pt)). Now start by cloning this repository in a local folder and change directory to it: ```sh git clone https://github.com/ccsa-ufrn/PosGraduacao PosGrad cd PosGrad ``` ### Virtualenv Use these command lines to create and activate the virtual environment: ```sh python3 -m virtualenv ./pg_env/ source ./pg_env/bin/activate ``` You will notice a ```(pg_env)``` prefixing your prompt string if it worked. Now install all required libs: ```sh pip install -r ./requirements.txt ``` ### API Keys Copy ```./settings/files/api_keys.fake.json```'s content and paste it at ```./settings/files/api_keys.json```. A suggestion that may work (note that I use ```nano``` editor, but it's a random option): ```sh # copy the template content cat ./settings/files/api_keys.fake.json > ./settings/files/api_keys.json # put valid authorization data while editing the real json nano ./settings/files/api_keys.json ``` ### Database server Let's start a mongo service. Here I run: ```sh sudo systemctl start mongod sudo systemctl status mongod ``` We should see, after the last command line, an output "Active: active (running)". Assuming that there's no PosGrad database installed, it's necessary to run a initial script for inputting some initial data. It consists of redirecting some scripts to ```mongo```: ```sh mongo < ./settings/files/standard_installation.js ``` Not only do we need the PosGrad database, but is also good practice to have a database whose only function is to run tests, we create that database in the next line. ```sh mongo < ./settings/files/standard_installation_tests.js ``` Please, check if mongo output looking for errors before proceding, everything should have been well acknowledged. Make sure to have an updated Mongo service running too. ### Web server If packages installation went successfully and our configuration files are ok, you can now start running the local server: ```sh python ./app.py ``` Assuming that you did everything right, your terminal will output the URL for you to access using a web browser. It should be http://localhost:4444/ but always read the output ("0.0.0.0:80" means you have super user permission and your server is opened for public access, so you need to know your IP address instead of "localhost" or "0.0.0.0"). ### Tests If you wanna run some tests, this is what you have to do. First you need to tell the application what database to use, you can do that by setting an environment variable, after that you can run the unit test script test_unit.py ```sh export DATABASE_NAME='posgrad-test' python test_unit.py ``` You should see the application running now. Unfortunately to use the admin function, an admin+password from the PortalCCSA is needed, since the autentication is made using this service API. Any doubts, just open an issue here on GitHub! ## License Copyright (C) 2017 Marcell "Mazuh" Guilherme Costa da Silva Contact: mazuh@ufrn.edu.br This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see .

近期下载者

相关文件


收藏者