Skip to content
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

Memo individual novels #6

Merged
merged 11 commits into from
Nov 2, 2020
Merged

Memo individual novels #6

merged 11 commits into from
Nov 2, 2020

Conversation

phildiderichsen
Copy link
Collaborator

@phildiderichsen phildiderichsen commented Nov 2, 2020

Towards Docker/Korp setup according to CLI argument/envvar.

We're working towards supporting different custom setups of Korp.

These changes make it possible to build one of several custom setups according to a single CLI argument.

Each custom setup has its own custom version of the frontend/app/ directory.
Each of these folders is partly redundant, leading to a lot of added code.
However, they are the correct unit for a single self-contained frontend config of Korp:
Each represents a separate setup of Korp where changes must be made simultaneously to several files,
some of which would break the other setups.

  • app
  • app_all
  • app_lanchart
  • app_memotest
  • app_memotest_all
  • app_test

Another partly redundant addition comes from the CWB encoding scripts in backend/corpora/encodingscripts/.
Some of these are autogenerated.
They could be refactored to a single shell script.
For now, they are not because in each case, a long list of arguments would be required,
which would probably have to be stored in a file anyway.

  • encode_LANCHARTcorpusAmager.sh
  • encode_LANCHARTcorpusBornholm.sh
  • encode_LANCHARTcorpusKoege.sh
  • encode_MEMO_authcorpora.sh
  • encode_MEMO_individual_files.sh
  • encode_MEMO_yearcorpora.sh
  • encode_MEMOtestcorpus.sh
  • encode_testcorpus.sh

The script encode.sh is where the corpora to be encoded are selected.
Based on the single CLI argument to docker-compose.

  • encode.sh

The script create_MEMOconfigs.py is run from the MEMO encoding scripts.
This saves the manual work of creating Korp configs for the MEMO corpora.

  • create_MEMOconfigs.py

There are changes to both backend and frontend Dockerfiles and start scripts, and to the docker-compose file.
The changes support the CLI argument functionality.

  • backend/Dockerfile
  • backend/start.sh
  • frontend/Dockerfile
  • frontend/start.sh
  • docker-compose.yml

An important change consists of setting the CWB registry to a folder on the image rather than the host.

  • backend/config.py

Obsolete files removed:

  • corpora/annotated/vrt_out.txt
  • corpora/encodingscripts/encode_all_corpora.sh
  • corpora/encodingscripts/encode_LANCHARTcorpus.sh

Copy link
Member

@simongray simongray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bare du selv har overblikket over det... :S

@simongray
Copy link
Member

... men lad være med at merge før du har squashed!

Lav evt. et midlertidigt separat branch du kan øve det på, så du ikke ved et uheld kommer til at miste kode.

@phildiderichsen phildiderichsen merged commit acad61c into master Nov 2, 2020
@phildiderichsen phildiderichsen deleted the memo_individual_novels branch November 2, 2020 13:12
@simongray
Copy link
Member

Du mergede uden at squashe...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants