Skip to content

Commit

Permalink
Merge pull request #540 from padix-key/info
Browse files Browse the repository at this point in the history
Save datasets in `structure.info` as BinaryCIF
  • Loading branch information
padix-key authored Mar 22, 2024
2 parents c159327 + 38c2572 commit 241211a
Show file tree
Hide file tree
Showing 37 changed files with 4,655 additions and 4,107 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tests/structure/data/* linguist-vendored
tests/sequence/data/* linguist-vendored
src/biotite/sequence/align/matrix_data/* linguist-vendored
src/biotite/structure/info/ccd/components.bcif filter=lfs diff=lfs merge=lfs -text
25 changes: 17 additions & 8 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ jobs:
outputs:
include: ${{ steps.set-matrix.outputs.include }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- name: Install cibuildwheel
# MAKE SURE THIS STAYS IN SYNC WITH THE LOWER GHA cibuildwheel
run: pipx install cibuildwheel==2.16.5
Expand Down Expand Up @@ -72,7 +74,9 @@ jobs:
include: ${{ fromJson(needs.generate-wheels-matrix.outputs.include) }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true

# QEMU enables building/testing for non-native architectures (ie arm64)
# at the cost of speed
Expand Down Expand Up @@ -103,7 +107,9 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
Expand Down Expand Up @@ -138,7 +144,9 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: biotite-dev
Expand All @@ -159,10 +167,9 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
lfs: true
- name: Build source distribution
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
Expand All @@ -182,7 +189,9 @@ jobs:
NCBI_API_KEY: ${{ secrets.NCBI_API_KEY }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
Expand Down
43 changes: 14 additions & 29 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ Installation
Requirements
------------

*Biotite* requires at least *Python* version 3.6. If you are still using
*Python* 2.7, you should `hurry up <https://pythonclock.org/>`_ with upgrading
to *Python* 3.

*Biotite* also requires the following packages:
*Biotite* requires at least *Python* version 3.7 and the following packages:

- **numpy**
- **requests**
Expand Down Expand Up @@ -78,24 +74,24 @@ Note that installing from source distribution requires a C-compiler
Install from source
-------------------

If you want to install *Biotite* from the
`project repository <https://github.com/biotite-dev/biotite>`_, navigate to the
top-level directory of your local *Biotite* repository clone (the one
``setup.py`` is in) and type the following:

.. code-block:: console
You can also install Biotite from the
`project repository <https://github.com/biotite-dev/biotite>`_.
The repository uses `Git LFS <https://git-lfs.com/>`_ to store large binary
files, which needs to be installed first.

$ pip install .
.. note::
In case installing *Git LFS* is not an option: The binary file can also be
downloaded manually from
`here <https://github.com/biotite-dev/biotite/raw/info/src/biotite/structure/info/ccd/components.bcif>`.
Then the ``biotite/structure/info/ccd/components.bcif`` file in the
repository needs to be replaced with the downloaded file.

Note that this requires a C-compiler (typically GCC) and the packages
`cython` and `wheel` to be installed.
For convenience
`this Conda environment <http://raw.githubusercontent.com/biotite-dev/biotite/master/environment.yml>`_
contains all runtime and build dependencies for *Biotite*:
After cloning the repository, navigate to its top-level directory (the one
``setup.py`` is in) and type the following:

.. code-block:: console
conda env create -f environment.yml
$ pip install .
Having the *Biotite* package always pointing to your directory containing the
repository is also possible.
Expand All @@ -105,17 +101,6 @@ Type the following in the top-level directory:
$ pip install -e .
To generate the wheels and source distribution for upload to PyPI (most
probably you won't need that, but just in case), simply type:

.. code-block:: console
$ python setup.py bdist_wheel
$ python setup.py sdist
You can find the created wheel and the source distribution in the ``dist``
directory.

Common issues and solutions
---------------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_extensions():
# Codon tables
"biotite.sequence" : ["codon_tables.txt"],
# Structure data (masses, bonds, etc.)
"biotite.structure.info" : ["*.json", "*.msgpack"]
"biotite.structure.info" : ["atom_masses.json", "ccd/*"]
},
)

Expand Down
Loading

0 comments on commit 241211a

Please sign in to comment.