Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
James.Hester committed Aug 16, 2022
2 parents b63ec0f + 7d5594e commit 159eb9e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 19 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/julia-runtests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
name: Run tests

on: [push, pull_request]

on:
push:
paths-ignore:
- '.github/**'
- 'README.md'

pull_request:
paths-ignore:
- '.github/**'
- 'README.md'

workflow_dispatch:

jobs:
test:
runs-on: ${{ matrix.os }}
env:
LD_LIBRARY_PATH: ${{ github.workspace }}/lib:/usr/lib:/lib:/lib64
strategy:
matrix:
julia-version: ['1', 'nightly']
Expand Down
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,18 @@ understand dictionaries written in DDLm and DDL2, which can be used to return co
types and find aliased datanames (note that this includes the PDB
mmCIF dictionaries).

## Warning: early release
## Warning: pre-1.0 release

While usable for the bulk of typical tasks, this package is still in
an early version. Type and method names may change in later versions.
Various debugging messages are printed, documentation strings are patchy.
Types, method names, and method signatures may change in later versions.

On the other hand, if you see ways to improve the naming or architecture,
If you see ways to improve the naming or architecture,
now is the time to raise an issue.

## Installation

Once Julia is installed, it is sufficient to `add CrystalInfoFramework`
at the Pkg prompt (accessed by the `]` character in the REPL).

Faster CIF parsing is available if you install the C library
[cifapi](https://github.com/COMCIFS/cif_api) in a standard
place on your system.

## Documentation

Detailed documentation is becoming progressively available
Expand All @@ -40,7 +34,7 @@ Detailed documentation is becoming progressively available
Type ``Cif`` is like a ``Dict{String,Block}``. A
``Block`` works like a ``Dict{String,Array{Any,1}}``. All returned
values are Arrays, **even if the data name appears as a key-value
pair in the file**. Primitive values are always Strings.
pair in the file**. Primitive values are always `String`s.
CIF2 Tables become julia ``Dict`` types, and CIF2 lists are julia
``Array`` types.

Expand All @@ -53,7 +47,10 @@ returned as 1-element Arrays. **This may change in the future**
name. File names should be provided as ``FilePaths`` paths. These can be
produced from strings be prepending the letter ``p`` once ``FilePaths`` is
added. If a ``String`` is provided to the ``Cif`` constructor it will be
interpreted as the contents of a CIF file.
interpreted as the contents of a CIF file. The optional argument `native`
switches between the [C cif_api parser](https://github.com/COMCIFS/cif_api)
(`native=false`, not currently available for
Windows) and a native Julia parser (`native=true`, the default).

To open a file, and read ``_cell.length_a`` from block ``only_block``,
returning a one-element ``Array{String,1}``:
Expand Down Expand Up @@ -138,12 +135,17 @@ correctly-formatted dictionaries or data files.

## Architecture

If the C `cifapi` library is available its parsing callbacks are used
to construct a `Cif` object during file traversal. In the absence of this
library, a pre-built parser generated by ``Lerche`` using a CIF
EBNF is used to produce a parse tree that is then transformed into a `Cif`
The C cif_api library parsing callbacks are used
to construct a `Cif` object during file traversal. The Julia parser uses
a pre-built parser generated by ``Lerche`` using a CIF
EBNF to produce a parse tree that is then transformed into a `Cif`
object.

## Further information

Read the tests in the tests directory for typical usage examples.

## Contributing

Contributions, suggestions, and bug reports are welcome! Please use
Github issues and pull requests to do this.

0 comments on commit 159eb9e

Please sign in to comment.