Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
ehua7365 committed Oct 17, 2023
2 parents b4171f6 + bdbf2ff commit 58bc729
Show file tree
Hide file tree
Showing 92 changed files with 1,060 additions and 354 deletions.
72 changes: 50 additions & 22 deletions .github/workflows/build-and-deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,51 +44,79 @@ jobs:

# --------------------------------

# Avoid bugs maybe by skipping cache?

# # Cache Yarn Modules
# - name: Get yarn cache directory path
# id: yarn-cache-dir-path
# run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
# shell: bash
# working-directory: ./eczoo_sitegen

# - name: Restore yarn cache
# uses: actions/cache@v3
# with:
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
# key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
# restore-keys: |
# yarn-cache-folder-
#
# SET UP CACHES
#

# --------------------------------
# Cache Yarn Modules

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash
working-directory: ./eczoo_sitegen

- name: Restore yarn modules cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
# Cache citation information (downloaded information & compiled citations)

- name: Restore citations information cache
uses: actions/cache@v3
with:
path: eczoo_sitegen/_zoodb_citations_cache_LOCAL
key: zoodb-citations-cache-LOCAL-${{ github.sha }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
zoodb-citations-cache-LOCAL-
- name: Initialize local citation information cache if applicable
run: |
if [ ! -e _zoodb_citations_cache_LOCAL/cache_downloaded_info.json ]; then
mkdir -p _zoodb_citations_cache_LOCAL/
cp _zoodb_citations_cache/*.json _zoodb_citations_cache_LOCAL/
fi
working-directory: ./eczoo_sitegen

# --------------------------------

#
# Install any missing modules via yarn
#

# Install any missing modules
- name: Yarn install
run: 'yarn'
working-directory: ./eczoo_sitegen/



# --------------------------------

#
# Build the site!
#

- name: Build Site (yarn buildall)
run: 'yarn buildall'
working-directory: ./eczoo_sitegen/
env:
ECZOO_CITATIONS_CACHE_DIR: "_zoodb_citations_cache_LOCAL"


# ## To Debug S3 deployment w/o building the full site ...
#
# - name: 'DUMMY CREATE SITE FILES'
# run: 'mkdir -p site/_site/ && echo "<html>TEST</html>" >site/_site/index.html'
# working-directory: ./eczoo_sitegen/

# --------------------------------

# - name: 'Move generated site to base dir'
# run: 'mv ./eczoo_sitegen/site/_site .'

# --------------------------------

# ### Old deploy script command, results in crude cache management
# - name: 'Deploy site to S3/Cloudfront'
# uses: reggionick/s3-deploy@v3
# with:
Expand Down
45 changes: 42 additions & 3 deletions .github/workflows/quick-test-compile-zoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,58 @@ jobs:

# --------------------------------

#
# SET UP CACHES
#

# Cache Yarn Modules

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash
working-directory: ./eczoo_sitegen
- name: Restore yarn cache

- name: Restore yarn modules cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
# Cache citation information (downloaded information & compiled citations)

- name: Restore citations information cache
uses: actions/cache@v3
with:
path: eczoo_sitegen/_zoodb_citations_cache_LOCAL
key: zoodb-citations-cache-LOCAL-${{ github.sha }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
zoodb-citations-cache-LOCAL-
- name: Initialize local citation information cache if applicable
run: |
if [ ! -e _zoodb_citations_cache_LOCAL/cache_downloaded_info.json ]; then
mkdir -p _zoodb_citations_cache_LOCAL/
cp _zoodb_citations_cache/*.json _zoodb_citations_cache_LOCAL/
fi
working-directory: ./eczoo_sitegen

# # Cache Yarn Modules
# - name: Get yarn cache directory path
# id: yarn-cache-dir-path
# run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
# shell: bash
# working-directory: ./eczoo_sitegen
# - name: Restore yarn cache
# uses: actions/cache@v3
# with:
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
# key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
# restore-keys: |
# yarn-cache-folder-

# --------------------------------

# Install any missing modules
Expand All @@ -65,6 +102,8 @@ jobs:
# --------------------------------

- name: Quick build site
run: 'yarn build-simple'
run: 'yarn build-simple-noparcel'
working-directory: ./eczoo_sitegen/site/
env:
ECZOO_CITATIONS_CACHE_DIR: "_zoodb_citations_cache_LOCAL"

37 changes: 33 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Your contribution to expanding and improving the Error Correction Zoo is very
welcome.


## How to contribute content

You can contribute by opening sending us an [email][eczooemail], opening an
Expand All @@ -20,15 +21,42 @@ make sure you understand the YAML file syntax and use an appropriate text editor
to avoid YAML syntax errors (such as [Atom][atomurl]).


## Main steps to contribute

- Create a pull request with the content you'd like to propose. Mark it as
a "draft" so we know you're still fine-tuning it.

- Once you created the pull request, you can preview the content as you are
proposing in your pull request by visiting:

https://errorcorrectionzoo.org/gitpreview

Wait until the webpage loads (it can take a couple minutes). Then, enter
your pull request number in the form at the bottom of the page and click
"Go to PR!". Select the relevant code at the top of the page to preview
the code page as it will appear in the zoo if your PR is accepted.

Error messages will hopefully help you identify and locate errors in
your YAML files (e.g., invalid syntax).

- You can update your pull request to fine-tune its contents. To refresh
and reload the preview, you can simply hit "Go to PR!" again.

- Once you're happy with the content you're suggesting, you can mark your
pull request as ready by removing the "draft" mention. Victor might
also have some suggestions for you on your pull request, so make sure
you have your github notifications on :)


## Please take note:

- Use [LaTeX-like formatting minilanguage][eczoollm] features to write math,
- Use [LaTeX-like formatting minilanguage][eczooflm] features to write math,
links, enumeration lists, headers, etc. Use markup sparingly, when it will
help the reader understand the content; don't abuse it.

- Content should be thoroughly cross-referenced with citations and links to
codes that you might mention. Check the [LaTeX-like formatting minilanguage
howto][eczoollm] for details.
howto][eczooflm] for details.

- All Zoo content is distributed under the [CC-BY-SA License][cc-by-sa-license].

Expand All @@ -38,14 +66,15 @@ to avoid YAML syntax errors (such as [Atom][atomurl]).
in `users/users_db.yml` in your pull request. Only significant edits count
in the change log; fixing typos and formatting are not recorded.


## Questions?

Ask us! And thanks again for your interest in contributing.
Ask us! And thanks again for your interest in contributing to the zoo.


[eczooemail]: mailto:errorcorrectionzoo@XXXXXX?subject=code%20data&body=Please%20replace%20'@XXXXXX'%20in%20the%20email%20address%20by%20'@gmail.com'.%20Thanks%20for%20your%20message!

[eczoollm]: https://github.com/errorcorrectionzoo/eczoo_generator/blob/main/latexlike_minilang_howto.md
[eczooflm]: https://github.com/errorcorrectionzoo/eczoo_sitegen/blob/main/flm_howto.md

[eczooedit]: https://errorcorrectionzoo.org/edit_code

Expand Down
81 changes: 60 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,35 @@ it! Here's a BibTeX blurb you could use:

The code meta-information is stored in YAML format, with one file per code.

## The YAML language
Jump to:
* [What is a YAML file?](#the-zoo-data-files)
* [Supported LaTeX-inspired syntax](#latex-inspired-mini-language-syntax)
* [How to contribute content](#contributing)

If you type in new codes, make sure you understand the basics of the
YaML language, and be sure to use a good text editor (if you'd like
a suggestion, check out the [Atom](https://atom.io/) text editor).
## The Zoo data files

YaML is a common markup language. You can [google
"YAML tutorial"](https://google.com/search?q=YaML+tutorial) or check out
the language's [Wikipedia
page](https://en.wikipedia.org/wiki/YAML).)
All of the zoo entries' information are stored in data files that are both
human and machine readable.

See the `template.yml` file to get started.

## Structure and hierarchy of the data files
(@VVA: feel free to fill in more info about folder structure guidelines here)

See the `template.yml` file to get started.
### The YAML language

(@VVA: feel free to fill in more info about folder structure etc. here)
If you type in new codes, make sure you understand the basics of the
YAML language, and be sure to use a good text editor (if you'd like
a suggestion, check out the [Atom](https://atom.io/) text editor).

YAML is a common markup language. You can [google
"YAML tutorial"](https://google.com/search?q=YAML+tutorial) or check out
the language's [Wikipedia
page](https://en.wikipedia.org/wiki/YAML).)

**Note**: Be mindful of line indentation, as it is important in order
to obtain a well-formed and unambiguous YAML file.

## Text content in the YAML file
### Text content in the YAML file

By convention, we store short pieces of text as single-quoted strings, e.g.:

Expand Down Expand Up @@ -71,7 +80,7 @@ because it might interfere with possible whitespace's meaning in our
LaTeX-inspired mini-language; for instance, leaving an empty line
will fail to start a new paragraph.)

## LaTeX-inspired mini-language in text
## LaTeX-inspired mini-language syntax

In most text fields, you can make use of LaTeX-inspired
command syntax. You can insert math expressions, add citations,
Expand All @@ -97,21 +106,51 @@ Example:
Refer to equations with \eqref{eq:stabilizers}, etc. ...


## Contributing

Get in touch with Victor V Albert & feel free to submit pull requests! You
can also check out our more detailed
[contributing guidelines](https://github.com/errorcorrectionzoo/eczoo_data/blob/main/CONTRIBUTING.md).

## Building and previewing the site
The main steps to contribute content are:

- Create a pull request with the content you'd like to propose. Mark it as
a "draft" so we know you're still fine-tuning it.

- Once you created the pull request, you can preview the content as you are
proposing in your pull request by visiting:

https://errorcorrectionzoo.org/gitpreview

Wait until the webpage loads (it can take a couple minutes). Then, enter
your pull request number in the form at the bottom of the page and click
"Go to PR!". Select the relevant code at the top of the page to preview
the code page as it will appear in the zoo if your PR is accepted.

Error messages will hopefully help you identify and locate errors in
your YAML files (e.g., invalid syntax).

- You can update your pull request to fine-tune its contents. To refresh
and reload the preview, you can simply hit "Go to PR!" again.

- Once you're happy with the content you're suggesting, you can mark your
pull request as ready by removing the "draft" mention. Victor might
also have some suggestions for you on your pull request, so make sure
you have your github notifications on :)


## Building and previewing the site locally

To build and preview the site locally, follow the instructions given
in the [`eczoo_sitegen`
repository](https://github.com/errorcorrectionzoo/eczoo_sitegen).


## Contributing

Get in touch with Victor V Albert & feel free to submit pull requests! Check
out our [contributing guidelines](https://github.com/errorcorrectionzoo/eczoo_data/blob/main/CONTRIBUTING.md).

## I want to create the &lt;Your Favorite Topic&gt; Zoo. How did you build the EC Zoo and can I reuse your code?

## I want to create the &lt;Your Favorite Topic> Zoo. How did you build the EC Zoo and can I reuse your code?
The error correction zoo is based on [ZooDb JS library framework](https://github.com/phfaist/zoodb). You
are welcome to use develop your own Zoo based on this library. Consider starting with [this simple toy
example of a zoo built with ZooDb](https://github.com/phfaist/zoodb-example).

Get in touch with me, I'll be happy to point to the basic tools we used and how they
Get in touch with me! I'll be happy to point to the basic tools we used and how they
can be reused to build other zoos (contact info at https://phfaist.com/).
3 changes: 2 additions & 1 deletion codes/classical/analog/lattice/root/eeight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ short_name: '\(E_8\)'
introduced: '\cite{manual:{Gosset, Thorold. "On the regular and semi-regular figures in space of n dimensions." Messenger of Mathematics 29 (1900): 43-48.}}'

description: |
BW lattice in dimension \(8\), which is the lattice corresponding to the \([8,4,4]\) Hamming code via the mod-two lattice construction.
Unimodular even BW lattice in dimension \(8\), consisting of the Cayley integral octonions rescaled by \(\sqrt{2}\).
The lattice corresponds to the \([8,4,4]\) Hamming code via the mod-two lattice construction.
protection: |
The \(E_8\) lattice has a nominal coding gain of \(2\).
Expand Down
2 changes: 1 addition & 1 deletion codes/classical/bits/quantum_inspired/fibonacci_model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protection: |
features:
decoders:
- 'An efficient algorithm base on minimum-weight perfect matching \cite{arXiv:2002.11738}, which can correct high-weight errors that span the lattice, with failure rate decaying super-exponentially with \(L\).'
- 'An efficient algorithm base on minimum-weight perfect matching \cite{arXiv:2002.11738}, which can correct high-weight errors that span rows and columns of the 2D lattice, with failure rate decaying super-exponentially with \(L\).'

relations:
parents:
Expand Down
2 changes: 1 addition & 1 deletion codes/classical/bits/reed_muller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ relations:
- code_id: divisible
detail: 'An RM\((r,m)\) code is \(2^{\left\lceil m/r\right\rceil-1}\)-divisible, according to McEliece''s theorem \cite{doi:10.1016/0097-3165(71)90066-5,doi:10.1016/0012-365X(72)90032-5}.'
- code_id: group
detail: 'RM codes are group-algebra codes \cite{doi:10.1007/BF01072842,manual:{Charpin, Pascale. Codes idéaux de certaines algèbres modulaires. Diss. 1982.}}\cite[Ex. 16.4.11]{preset:HKSalgebra}. Consider a binary vector space of dimension \( m \). Under addition, this forms a finite group with \( 2^m \) elements known as an elementary abelian 2-group -- the direct product of \( m \) two-element cyclic groups \( \mathbb{Z}_2 \times \dots \times \mathbb{Z}_2 \). Denote this group by \( G_m \). Let \( J \) be the Jacobson radical of the group algebra \( \mathbb{F}_2 G_m \), where \(\mathbb{F}_2=GF(2)\). RM\((r,m)\) codes correspond to the ideal \( J^{m-r} \). The length of the code is \( |G_m| = 2^m \), the distance is \( 2^{m-r} \), and the dimension is \( \sum_{i=0}^r {m \choose i} \). A similar construction exists for choices of a prime \( p\neq 2 \).'
detail: 'RM codes are group-algebra codes \cite{doi:10.1007/BF01072842,manual:{Charpin, Pascale. Codes idéaux de certaines algèbres modulaires. Diss. 1982.}}\cite[Ex. 16.4.11]{preset:HKSalgebra}. Consider a binary vector space of dimension \( m \). Under addition, this forms a finite group with \( 2^m \) elements known as an elementary Abelian 2-group -- the direct product of \( m \) two-element cyclic groups \( \mathbb{Z}_2 \times \dots \times \mathbb{Z}_2 \). Denote this group by \( G_m \). Let \( J \) be the Jacobson radical of the \hyperref[topic:group-algebra]{group algebra} \( \mathbb{F}_2 G_m \), where \(\mathbb{F}_2=GF(2)\). RM\((r,m)\) codes correspond to the ideal \( J^{m-r} \). The length of the code is \( |G_m| = 2^m \), the distance is \( 2^{m-r} \), and the dimension is \( \sum_{i=0}^r {m \choose i} \). A similar construction exists for choices of a prime \( p\neq 2 \).'
cousins:
- code_id: bch
detail: 'RM\(^*(r,m)\) codes are equivalent to subcodes of BCH codes of designed distance \(2^{m-r}-1\) while RM\((r,m)\) are subcodes of extended BCH codes of the same designed distance \cite[Ch. 13]{preset:MacSlo}.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ features:

encoders:
- 'Quadratic algorithm: This technique works for all linear block codes and encodes using matrix multiplication \cite{doi:10.1145/258533.258575}.'
- 'Using the nonabelian Fast Fourier Transform and exploiting the symmetry of the underlying graph, an encoding algorithm that requires \(O(n^{4/3})\) has been devised in \cite{doi:10.1145/258533.258575}.'
- 'Using the non-Abelian Fast Fourier Transform and exploiting the symmetry of the underlying graph, an encoding algorithm that requires \(O(n^{4/3})\) has been devised in \cite{doi:10.1145/258533.258575}.'
- 'A modified construction yields codes that may be encoded in linear time yet maintain similar performance \cite{doi:10.1109/18.556668}.'

decoders:
Expand Down
Loading

0 comments on commit 58bc729

Please sign in to comment.