Skip to content

Commit 0416327

Browse files
Modify markdown, clean up print
1 parent e6934eb commit 0416327

File tree

9 files changed

+59
-49
lines changed

9 files changed

+59
-49
lines changed

CONTRIBUTING.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Starting People Depot
2+
## Stopping processes running on needed ported
3+
Follow these instructions if 5432, 5433, 8000, or 8001 are used by other applications.
4+
5+
1. If Postgresql is running for another app other than People Depot, kill Postgresql
6+
7+
For Mac
8+
- Stop Postgresql: `brew services stop postgresql`
9+
- If it indicates a specific version was stopped (`Stopping ```postgresql@16```...`),
10+
then stop that version: `brew services stop postgresql@16`
11+
12+
For PC:
13+
- ???
14+
15+
2. Repeat for 5433
16+
3. Kill process running on 8000: `kill -9 (lsof -ti:8000)`
17+
4. Repeat for 8001
18+
5. If you think databases on port 5432 or 5433 were used for a different application, then reinitialize or change where ports are started
19+
20+
## Configure
21+
- From terminal:
22+
```
23+
cd django_root
24+
cp .env.local-example .env.local
25+
```
26+
- If you are using People Depot then check PEOPLE_DEPOT_URL is defined. If not, check that it is commented out.
27+
- If you are using Cognito for login, get values for Cognito variables from a development admin or 1password.com (if
28+
a HackForLA account has been setup). You can also create your own Cognito domain if you want. See ???
29+
30+
## Start People Depot
31+
If you are not using People Depot APIs and don't want to set up replication from People Depot, then skip this section.
32+
33+
See https://hackforla.github.io/peopledepot/contributing/dev_environment/ for instructions on how to start People Depot. For the first time, this will create a container with a Postgresql database on port 5432 and a Django web server on port 8000. Subsequent starts will use the docker container, database, and web server and perform any necessary migrations to the database.
34+
35+
## Start Doc Conversion
36+
37+
## Start Knowledgebase
38+
From terminal: `cd django_root`, then `source start-local.sh` or `source start-docker.sh`
39+

NOTES.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ The API user must pick a version status - draft, in review, or approved - for an
4848

4949
# Features
5050
## Google Document Features
51-
# Technical Documentation
5251

5352
# Technical Implementation
5453
## Maintenance with Django

django_root/.env.local-example

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
DJANGO_SETTINGS_MODULE=core.settings
2+
DJANGO_PORT=8001 # PEOPLE_DEPOT runs on 8000
23
# To use db.sqlite3, define DATABASE_HOST and DATABASE_PORT with empty values
34
# DATABASE_HOST=
45
# DATABASE_PORT=
6+
# USE_SQLITE=True
57
# To use postgres, define DATABASE_HOST and DATABASE_PORT with non-empty values
68
DATABASE_HOST=localhost
79
DATABASE_PORT=5433
810
DJANGO_SUPERUSER=kbadmin
911
1012
DJANGO_SUPERUSER_PASSWORD=$DJANGO_SUPERUSER
11-
USE_SQLITE=True
13+
USE_SQLITE=False
1214

1315
# PEOPLE_DEPOT_URL="http://localhost:8000"
1416
# COGNITO_CLIENT_SECRET=...4sq6msq4vf93bdu...
15-
# PEOPLE_DEPOT_URL=http://localhost:8000
16-
# PEOPLE_DEPOT_API_SECRET=people-depot-api-secret
17-
# PEOPLE_DEPOT_API_KEY=people-depot-api-key
1817
# COGNITO_USER_POOL_NAME=peopledepot
1918
# COGNITO_AWS_REGION=us-west-2
2019
# COGNITO_USER_POOL=us-west-2_Fn4rkZpuB
2120
# COGNITO_CLIENT_ID=...npgi8ul8nfn2undd6ufro...
22-
# Temporary, west is preferred
23-
# COGNITO_USER_POOL_NAME=peopledepot
24-
# COGNITO_AWS_REGION=us-east-2
25-
# COGNITO_USER_POOL=us-east-2_i2EKGBFG1
21+

django_root/core/settings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import django
1515
from pathlib import Path
1616
from django.utils.encoding import smart_str
17-
1817
django.utils.encoding.smart_text = smart_str
1918
USE_SQLITE_ENV_VALUE = os.environ.get("USE_SQLITE", default="False")
2019
if type(USE_SQLITE_ENV_VALUE) == bool:

django_root/data/data.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,3 @@
4444

4545

4646
data[AssetType.__name__] = asset_type
47-
print(data)

django_root/data/data_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
class DataUtils:
88
def update_model_from_json_file(model, json_file):
9-
print(f"Updating {model.__name__} from {json_file}")
109
json_file = os.path.join(BASE_DIR, json_file)
1110
with open(json_file, "r") as f:
1211
json_data = json.load(f)

django_root/data/migrations/0005_populate_asset_category.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def run(__apps__, __schema_editor__):
7-
print("Loading phases")
7+
print("Loading asset categories")
88
DataUtils.update_model_from_json_data(AssetCategory)
99

1010

docs/overview/Draft-BOP-and-Knowledgebase-Overview.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
- The purpose of the BoP project is to create an app to catalog knowledge assets about development practices for Code for America brigades.
2-
- The purpose of the Knowledgebase app which is in progress is intended to supported BoP functionality. Additionally, the app supports the generation of web pages from markdown about development practices. The markdown is stored in the HackForLA Website repo and when generated, added to the "Toolkit" of the HackForLA website. The web page and source markdown are also content asset which would be of interest to HackForLA and potentially other Code for America brigades.
3-
- Since Knowledgebase is intended to support BOP, the two projects are being combined.
4-
- MVP for Phase 1 will only support the cataloging of content described in the first bullet. Generation of HackForLA content will be a later phase.
5-
- Knowledgebase stores content assets and related data in a Postgres or (for development only) MySQL database. The data is maintained through the default admin screens in Django.
6-
- The Knowledgebase screens were reviewed to see how closely they align with BOP. The following needs to be added to the Knowledgebase model:
7-
- gdoc (badly named) table which was intended to hold all types of content assets will be split into two tables: asset groups and assets. Most fields will go into asset group. An asset group will have one or more assets associated with it. Asset table will include title, asset type, and URL at a minimum.
1+
# BOP Project
2+
3+
The purpose of the BoP project is to catalog knowledge assets / documentation about development practices for organizations or open source communities, starting with Hackfor LA.
4+
5+
# Knowledgebase
6+
7+
## Cataloging
8+
The purpose of the Knowledgebase app is to support the cataloging of BOP. Knowledgebase app stores content assets and related data in a Postgres database. The data is maintained through the default admin screens in Django.
9+
10+
## Markdown to Google Doc
11+
Some of the BoP assets will be Google Docs. The app will supports the generation of web pages from Google docs to markdown which is then used to generate the web pages for the "Toolkit" website.
12+
13+
14+
# Misc
15+
The Knowledgebase screens were reviewed to see how closely they align with the needs for BOP. The model:
816
- google id is only relevant if the content is used as source for the HackForLA website. To support parallel development of web page generation this field will need to be included but can be hidden when deployed to production.
9-
- a field is needed to indicate this is for / from the HackForLA website, which will be hidden for production.
1017
- Data will be initially populated from existing google sheets
1118
- Subsequent updates and additions will be done through the Django admin page. No APIs need to built for this.
1219
- Viewing and querying can also be done through Django admin, depending on the complexity of the functional and usability requirements.

docs/overview/rework-Screen-Shots.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)