phlorest


Namephlorest JSON
Version 1.6.1 PyPI version JSON
download
home_pagehttps://github.com/phlorest/phlorest
SummaryA cldfbench plugin to curate language phylogenies
upload_time2023-11-17 13:20:06
maintainer
docs_urlNone
authorSimon Greenhill and Robert Forkel
requires_python>=3.8
licenseApache 2.0
keywords cldf
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # phlorest

A [cldfbench](https://github.com/cldf/cldfbench) plugin to curate language phylogenies.


## Install

```shell
pip install phlorest
```


## Usage

### Bootstrapping a `phlorest`-curated dataset

`phlorest` provides a `cldfbench` dataset template to create the skeleton of files and directories for a
`phlorest`-curated dataset, to be run with [cldfbench new](https://github.com/cldf/cldfbench/#creating-a-skeleton-for-a-new-dataset-directory).

Running

```shell
cldfbench new --template phlorest 
```

will create a dataset skeleton looking as follows
```shell
$ tree testtree/
testtree/
├── cldf
│   └── README.md
├── cldfbench_testtree.py
├── etc
│   ├── characters.csv
│   └── taxa.csv
├── metadata.json
├── raw
│   └── README.md
├── setup.cfg
├── setup.py
└── test.py
```


### Implementing CLDF creation

Implementing CLDF creation means - as for any other `cldfbench`-curated dataset - filling in the
`cmd_makecldf` method of the `Dataset` subclass in `cldfbench_<id>.py`.

The CLDF writer which can be accessed as `args.writer` within `cmd_makecldf` is an instance of
`phlorest.CLDFWriter`, which has convenience methods to add summary- or posterior trees to the CLDF
dataset. At least a summary is needed to make a dataset valid. Adding one looks as follows

```python
    args.writer.add_summary(
        self.raw_dir.read_tree(...),
        self.metadata,
        args.log)
```


### Running CLDF creation

With `cmd_makecldf` implemented, CLDF creation can be triggered running
```shell
cldfbench makecldf cldfbench_<id>.py
```

The resulting CLDF dataset can be validated running
```shell
pytest
```


### Release workflow

```shell
cldfbench makecldf --glottolog-version v4.8 --with-cldfreadme cldfbench_<id>.py
pytest
cldfbench zenodo --communities phlorest cldfbench_<id>.py
cldfbench readme cldfbench_<id>.py
phlorest check --with-R cldfbench_<id>.py
git commit -a -m"release vX.Y"
git push origin
phlorest release cldfbench_<id>.py vX.Y
```


## Dependencies

The `run_treeannotator` method of `Dataset` requires the `treeannotator` command from BEAST to be
installed. For details on how to install `treeannotator` (and `BEAST`), see https://beast.community/index.html

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/phlorest/phlorest",
    "name": "phlorest",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "cldf",
    "author": "Simon Greenhill and Robert Forkel",
    "author_email": "dlce.rdm@eva.mpg.de",
    "download_url": "https://files.pythonhosted.org/packages/36/9c/00f599906accc282099a23060173e5e8e4a877a8d434d4d25c943b1cbe25/phlorest-1.6.1.tar.gz",
    "platform": "any",
    "description": "# phlorest\n\nA [cldfbench](https://github.com/cldf/cldfbench) plugin to curate language phylogenies.\n\n\n## Install\n\n```shell\npip install phlorest\n```\n\n\n## Usage\n\n### Bootstrapping a `phlorest`-curated dataset\n\n`phlorest` provides a `cldfbench` dataset template to create the skeleton of files and directories for a\n`phlorest`-curated dataset, to be run with [cldfbench new](https://github.com/cldf/cldfbench/#creating-a-skeleton-for-a-new-dataset-directory).\n\nRunning\n\n```shell\ncldfbench new --template phlorest \n```\n\nwill create a dataset skeleton looking as follows\n```shell\n$ tree testtree/\ntesttree/\n\u251c\u2500\u2500 cldf\n\u2502   \u2514\u2500\u2500 README.md\n\u251c\u2500\u2500 cldfbench_testtree.py\n\u251c\u2500\u2500 etc\n\u2502   \u251c\u2500\u2500 characters.csv\n\u2502   \u2514\u2500\u2500 taxa.csv\n\u251c\u2500\u2500 metadata.json\n\u251c\u2500\u2500 raw\n\u2502   \u2514\u2500\u2500 README.md\n\u251c\u2500\u2500 setup.cfg\n\u251c\u2500\u2500 setup.py\n\u2514\u2500\u2500 test.py\n```\n\n\n### Implementing CLDF creation\n\nImplementing CLDF creation means - as for any other `cldfbench`-curated dataset - filling in the\n`cmd_makecldf` method of the `Dataset` subclass in `cldfbench_<id>.py`.\n\nThe CLDF writer which can be accessed as `args.writer` within `cmd_makecldf` is an instance of\n`phlorest.CLDFWriter`, which has convenience methods to add summary- or posterior trees to the CLDF\ndataset. At least a summary is needed to make a dataset valid. Adding one looks as follows\n\n```python\n    args.writer.add_summary(\n        self.raw_dir.read_tree(...),\n        self.metadata,\n        args.log)\n```\n\n\n### Running CLDF creation\n\nWith `cmd_makecldf` implemented, CLDF creation can be triggered running\n```shell\ncldfbench makecldf cldfbench_<id>.py\n```\n\nThe resulting CLDF dataset can be validated running\n```shell\npytest\n```\n\n\n### Release workflow\n\n```shell\ncldfbench makecldf --glottolog-version v4.8 --with-cldfreadme cldfbench_<id>.py\npytest\ncldfbench zenodo --communities phlorest cldfbench_<id>.py\ncldfbench readme cldfbench_<id>.py\nphlorest check --with-R cldfbench_<id>.py\ngit commit -a -m\"release vX.Y\"\ngit push origin\nphlorest release cldfbench_<id>.py vX.Y\n```\n\n\n## Dependencies\n\nThe `run_treeannotator` method of `Dataset` requires the `treeannotator` command from BEAST to be\ninstalled. For details on how to install `treeannotator` (and `BEAST`), see https://beast.community/index.html\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "A cldfbench plugin to curate language phylogenies",
    "version": "1.6.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/phlorest/phlorest/issues",
        "Homepage": "https://github.com/phlorest/phlorest"
    },
    "split_keywords": [
        "cldf"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3e78aba0987e304e095ada6044ac2c808d1ae5fbff197b4d2f7a733584bf79a5",
                "md5": "d6ef1f71177909be024374c4ea90bfab",
                "sha256": "2e1e191b7c48c1bfa6231ff0ac0be822025ffb264a18dac63b654f2a8dccf670"
            },
            "downloads": -1,
            "filename": "phlorest-1.6.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d6ef1f71177909be024374c4ea90bfab",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 28319,
            "upload_time": "2023-11-17T13:20:04",
            "upload_time_iso_8601": "2023-11-17T13:20:04.471839Z",
            "url": "https://files.pythonhosted.org/packages/3e/78/aba0987e304e095ada6044ac2c808d1ae5fbff197b4d2f7a733584bf79a5/phlorest-1.6.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "369c00f599906accc282099a23060173e5e8e4a877a8d434d4d25c943b1cbe25",
                "md5": "a15b8b1642bf2fc3989730db9ed7ccda",
                "sha256": "5f65c62ffb8620885e0fe40231feda470209fc661fa0d9cbe5a5b23ae16a2564"
            },
            "downloads": -1,
            "filename": "phlorest-1.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a15b8b1642bf2fc3989730db9ed7ccda",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 27405,
            "upload_time": "2023-11-17T13:20:06",
            "upload_time_iso_8601": "2023-11-17T13:20:06.191603Z",
            "url": "https://files.pythonhosted.org/packages/36/9c/00f599906accc282099a23060173e5e8e4a877a8d434d4d25c943b1cbe25/phlorest-1.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-17 13:20:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "phlorest",
    "github_project": "phlorest",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "phlorest"
}
        
Elapsed time: 0.20394s