Skip to content

Merging build and docs fixes from main #793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,44 @@ __pycache__/
.Python
*.so

# Private files
.env*
**/.env*
.invenio.private*
docker/nginx_local/samlPrivateKey.key
docker/nginx_local/samlCertificate.key
docker-compose*

# Cache directories
.mypy_cache/
**/.mypy_cache/
.pytest_cache/
**/.pytest_cache/
.ruff_cache/
**/.ruff_cache/

# Git and vscode directories
.git/
**/.git*
.github/
**/.github*
.pytest_cache/
**/.pytest_cache/
.vscode/

# Logs
logs/*
**/test_logs
**/logs

# Scripts
scripts/experiments
scripts/sample_files

# Build artifacts
build/
site/build
site/kcworks.egg-info

# Static files
static/admin
static/dist
static/bootstrap
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
branches: [ main, dev, staging, production ]
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 3 * * 6"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ docs/build/
# Testing
test.db
.pytest_cache/
.mypy_cache/
.ruff_cache/

# Environments
.venv
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ RUN apt-get update && apt-get install -y \
libffi-dev \
uuid-dev \
wget \
vim \
curl \
&& rm -rf /var/lib/apt/lists/* \
&& sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
Expand Down
3 changes: 1 addition & 2 deletions scripts/setup-services-production.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ echo -e "${yellow}Creating the database...${clear}"
invenio db init create
echo -e "${yellow}Setting up s3 storage...${clear}"
invenio files location s3-default s3://$INVENIO_S3_BUCKET_NAME --default;
echo -e "${yellow}Setting up admin user and role...${clear}"
echo -e "${yellow}Setting up admin roles and permissions...${clear}"
invenio roles create admin
invenio roles create administration
invenio roles create administration-moderation
Expand All @@ -68,7 +68,6 @@ echo -e "${yellow}Compiling translations...${clear}"
pybabel compile -d /opt/invenio/src/translations
echo -e "${yellow}Setting up task queues...${clear}"
invenio queues declare
echo -e "${yellow}Creating administrator role...${clear}"
if [ $fixtures==1 ]
then
echo -e "${yellow}Setting up fixtures in two stages (this may take a long time!!)...${clear}"
Expand Down
24 changes: 14 additions & 10 deletions scripts/setup-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,25 @@ select yn in "s3" "local"; do
local ) echo -e "${yellow}Setting up local storage...${clear}"; invenio files location create --default default-location /opt/invenio/var/instance/data; break;;
esac
done
echo -e "${yellow}Setting up admin user and role...${clear}"
echo -e "${yellow}Setting up admin roles and permissions...${clear}"
invenio roles create admin
invenio roles create administration
invenio roles create administration-moderation
invenio roles create admin-moderator
invenio access allow superuser-access role admin
invenio access allow superuser-access role administration
invenio access allow superuser-access role administration-moderation
invenio access allow administration-access role administration
invenio access allow administration-moderation role administration-moderation
echo -e "${yellow}Setting up OpenSearch index...${clear}"
invenio index init
echo -e "${yellow}Setting up custom metadata fields...${clear}"
invenio rdm-records custom-fields init
invenio communities custom-fields init
echo -e "${yellow}Compiling translations...${clear}"
pybabel compile -d /opt/invenio/src/translations
echo -e "${yellow}Setting up task queues...${clear}"
invenio queues declare
echo -e "${yellow}Setting up fixtures in two stages (this may take a long time!!)...${clear}"
invenio rdm fixtures
invenio rdm-records fixtures & pid=$!
Expand All @@ -39,14 +50,7 @@ do
printf "\b%c" "${sp:i++%4:1}"
sleep 0.1
done
echo -e "${yellow}Compiling translations...${clear}"
pybabel compile -d /opt/invenio/src/translations
echo -e "${yellow}Setting up task queues...${clear}"
invenio queues declare
echo -e "${yellow}Creating administrator role...${clear}"
invenio roles create administrator
echo -e "${green}All done setting up services."
echo -e "${yellow}Building assets for Knowledge Commons Works instance...${clear}"
cd /opt/invenio/src/scripts
bash ./build-assets.sh
echo -e "${green}Building and symlinking assets..."
bash ./scripts/build-assets.sh
echo -e "${green}Your instance is now ready to use.${clear}"
1 change: 1 addition & 0 deletions site/kcworks/webpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"dependencies": {
"geopattern": "^1.2.3",
"orcid-utils": "^1.2.2",
"react-invenio-forms": "3.5.2",
},
"aliases": {
"@js/invenio_modular_deposit_form_extras": (
Expand Down
Loading