Skip to content

Commit

Permalink
merge conflict in readme solved
Browse files Browse the repository at this point in the history
  • Loading branch information
bvreede committed Jan 5, 2024
2 parents 95d6db5 + 540f89f commit 180c4f6
Show file tree
Hide file tree
Showing 47 changed files with 2,938 additions and 300 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.0
current_version = 0.1.1

[comment]
comment = The contents of this file cannot be merged with that of setup.cfg until https://github.com/c4urself/bump2version/issues/185 is resolved
Expand Down
2 changes: 2 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

### To enable this githook, run:
### git config --local core.hooksPath .githooks
### to disable:
### git config --unset core.hooksPath

echo "Script $0 triggered ..."

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-latest']
python-version: ['3.7', '3.10']
python-version: ['3.9', '3.12']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: 3.11
- name: Python info
shell: bash -l {0}
run: |
Expand All @@ -30,7 +30,7 @@ jobs:
python3 -m pip install --upgrade pip setuptools
python3 -m pip install .[dev,publishing]
- name: Install pandoc using apt
run: sudo apt install pandoc
run: sudo apt install pandoc
- name: Build documentation
run: make coverage doctest html
working-directory: docs
73 changes: 73 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Publish Python distributions to PyPI and TestPyPI

on:
release:
types: [published]

jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 🐍
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'rc') # only publish to PyPI on tag pushes that do not contain 'rc'
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/scikit-talk
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
if: startsWith(github.ref, 'refs/tags') && contains(github.ref, 'rc') # only publish to PyPI on tag pushes with 'rc' (release candidate) label
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/sktalk # the testpypi url is different as scikit-talk is still in use
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
10 changes: 10 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

python:
install:
- method: pip
Expand Down
23 changes: 19 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.1.1] - 2024-01-05

### Added

- DOI links to the Zenodo archive

## [0.0.1] - 1900-12-31
## [0.1.0] - 2024-01-05

### Added

- Initial release
- main modules `Corpus`, `Conversation` and `Utterance`
- parsers for `.eaf` and `.cha` files
- read and write `.json` files
- write `.csv` files
- calculate FTO in a Conversation object

### Removed

N/A

### Changed

[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.0...HEAD
[0.0.1]: https://github.com/olivierlacan/keep-a-changelog/releases/tag/v0.0.1
N/A

[0.1.0]: https://github.com/elpaco-escience/scikit-talk/releases/tag/v0.1.0
23 changes: 15 additions & 8 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,28 @@ authors:
-
family-names: Gabor
given-names: Parti
-
family-names: Viviani
given-names: Eva
orcid: "https://orcid.org/0000-0002-1330-0585"
-
family-names: Dingemanse
given-names: Mark
orcid: "https://orcid.org/0000-0002-3290-5723"
date-released: 2023-03-03
doi: 10.0000/FIXME
version: "0.1.0"
-
family-names: Schnober
given-names: Carsten
orcid: "https://orcid.org/0000-0001-9139-1577"
-
family-names: De Kleijn
given-names: Maurice
-
family-names: Qi
given-names: Ji
orcid: "https://orcid.org/0000-0001-8074-2730"
date-released: 2024-01-05
doi: 10.5281/zenodo.10462997
version: "0.1.1"
repository-code: "https://github.com/elpaco-escience/scikit-talk"
keywords:
- conversation
- language corpora
- turn-taking
message: "If you use this software, please cite it using these metadata."
message: "If you use this software, please cite the original paper DOI:10.18653/v1/2021.sigdial-1.26"
license: Apache-2.0
106 changes: 34 additions & 72 deletions README.dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,81 +134,43 @@ bumpversion patch
This section describes how to make a release in 3 parts:

1. preparation
1. making a release on PyPI
1. making a release on GitHub
1. verification

### (1/3) Preparation

1. Update the <CHANGELOG.md> (don't forget to update links at bottom of page)
2. Verify that the information in `CITATION.cff` is correct, and that `.zenodo.json` contains equivalent data
3. Make sure the [version has been updated](#versioning).
4. Run the unit tests with `pytest -v`
1. Verify that the information in `CITATION.cff` is correct
1. Make sure the [version has been updated](#versioning).
1. Run the unit tests with `pytest -v`

### (2/3) Release on GitHub

Releases start on GitHub.
Open [releases](https://github.com/elpaco-escience/scikit-talk/releases/new) and draft a new release.
Copy the changelog for this version into the description.
Tag the release according to [semantic versioning guidelines](https://semver.org/), preceded with a `v` (e.g.: v1.0.0).
The release title is the tag and the release date together (e.g.: v1.0.0 (2019-07-25)).

The Zenodo integration will take care of updating the Zenodo record with a new release.
Releasing on GitHub will also automatically trigger the publication of the release to PyPI, through a Github Action.
To verify that everything works as expected, it is recommended to first publish a release candidate (see [below](#release-candidates)).

> [!NOTE]
>
> #### Release candidates
>
> When releasing a release candidate on Github, tick the pre-release box, and amend the version tag with `-rc` and the candidate number (e.g. v1.0.0-rc1).
> Ensure the release candidate version is accurate in `CITATION.cff`.
> Versions with "rc" (release candidate) in their version tag will only be published to [test.PyPI](https://test.pypi.org/project/test-scikit-talk/).
> Other version tags will trigger a [PyPI release](https://pypi.org/project/scikit-talk/).
> Inspect `.github/workflows/publish-pypi.yml` for more information.
### (3/3) Verification

1. Verify the publication to [testPyPI](https://test.pypi.org/project/test-scikit-talk/) or [PyPI](https://pypi.org/project/scikit-talk/) (depending on the version tag).
1. Confirm that the released package can be installed
- from PyPI with `pip install scikit-talk`
- from test.PyPI with `pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/test-scikit-talk`
1. The release should have triggered a [Zenodo upload](https://zenodo.org/doi/10.5281/zenodo.10462997). Confirm that the Zenodo record has been updated.

### (2/3) PyPI

In a new terminal, without an activated virtual environment or an env directory:

```shell
# prepare a new directory
cd $(mktemp -d scikit-talk.XXXXXX)

# fresh git clone ensures the release has the state of origin/main branch
git clone git@github.com:elpaco-escience/scikit-talk .

# prepare a clean virtual environment and activate it
python3 -m venv env
source env/bin/activate

# make sure to have a recent version of pip and setuptools
python3 -m pip install --upgrade pip setuptools

# install runtime dependencies and publishing dependencies
python3 -m pip install --no-cache-dir .
python3 -m pip install --no-cache-dir .[publishing]

# clean up any previously generated artefacts
rm -rf scikit-talk.egg-info
rm -rf dist

# create the source distribution and the wheel
python3 setup.py sdist bdist_wheel

# upload to test pypi instance (requires credentials)
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
```

Visit
[https://test.pypi.org/project/scikit-talk](https://test.pypi.org/project/scikit-talk)
and verify that your package was uploaded successfully. Keep the terminal open, we'll need it later.

In a new terminal, without an activated virtual environment or an env directory:

```shell
cd $(mktemp -d scikit-talk-test.XXXXXX)

# prepare a clean virtual environment and activate it
python3 -m venv env
source env/bin/activate

# make sure to have a recent version of pip and setuptools
pip install --upgrade pip setuptools

# install from test pypi instance:
python3 -m pip -v install --no-cache-dir \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple scikit-talk
```

Check that the package works as it should when installed from pypitest.

Then upload to pypi.org with:

```shell
# Back to the first terminal,
# FINAL STEP: upload to PyPI (requires credentials)
twine upload dist/*
```

### (3/3) GitHub

Don't forget to also make a [release on GitHub](git@github.com:elpaco-escience/scikit-talk/releases/new). If your repository uses the GitHub-Zenodo integration this will also trigger Zenodo into making a snapshot of your repository and sticking a DOI on it.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
| (1/5) code repository | [![github repo badge](https://img.shields.io/badge/github-repo-000.svg?logo=github&labelColor=gray&color=blue)](git@github.com:elpaco-escience/scikit-talk) |
| (2/5) license | [![github license badge](https://img.shields.io/github/license/elpaco-escience/scikit-talk)](git@github.com:elpaco-escience/scikit-talk) |
| (3/5) community registry | [![RSD](https://img.shields.io/badge/rsd-diversity-aware.svg)](https://www.research-software.nl/projects/diversity-aware) [![workflow pypi badge](https://img.shields.io/pypi/v/scikit-talk.svg?colorB=blue)](https://pypi.python.org/project/scikit-talk/) |
| (4/5) citation | [![DOI](https://zenodo.org/badge/DOI/<replace-with-created-DOI>.svg)](https://doi.org/<replace-with-created-DOI>) |
| (4/5) citation | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10462997.svg)](https://doi.org/10.5281/zenodo.10462997) |
| (5/5) checklist | [![workflow cii badge](https://bestpractices.coreinfrastructure.org/projects/<replace-with-created-project-identifier>/badge)](https://bestpractices.coreinfrastructure.org/projects/<replace-with-created-project-identifier>) |
| howfairis | [![fair-software badge](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B-yellow)](https://fair-software.eu) |
| **Other best practices** | &nbsp; |
| Static analysis | [![workflow scq badge](https://sonarcloud.io/api/project_badges/measure?project=elpaco-escience_scikit-talk&metric=alert_status)](https://sonarcloud.io/dashboard?id=elpaco-escience_scikit-talk) |
| Coverage | [![workflow scc badge](https://sonarcloud.io/api/project_badges/measure?project=elpaco-escience_scikit-talk&metric=coverage)](https://sonarcloud.io/dashboard?id=elpaco-escience_scikit-talk) |
| Documentation | [![Documentation Status](https://readthedocs.org/projects/scikit-talk/badge/?version=latest)](https://scikit-talk.readthedocs.io/en/latest/?badge=latest) |
| Documentation | [![Documentation Status](https://readthedocs.org/projects/sktalk/badge/?version=latest)](https://sktalk.readthedocs.io/en/latest/?badge=latest) |
| **GitHub Actions** | &nbsp; |
| Build | [![build](https://github.com/elpaco-escience/scikit-talk/actions/workflows/build.yml/badge.svg)](https://github.com/elpaco-escience/scikit-talk/actions/workflows/build.yml) |
| SonarCloud | [![sonarcloud](https://github.com/elpaco-escience/scikit-talk/actions/workflows/sonarcloud.yml/badge.svg)](https://github.com/elpaco-escience/scikit-talk/actions/workflows/sonarcloud.yml) |
Expand All @@ -38,7 +38,8 @@ python3 -m pip install .

## Documentation

Include a link to your project's full documentation here.
The user documentation can be found [here](https://sktalk.readthedocs.io/en/latest/?badge=latest).
To read more about the aims of this software, [this paper](https://aclanthology.org/2021.sigdial-1.26/) by Liesenfeld _et al._ (2021) describes the project in detail.

## Contributing

Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# built documents.
#
# The short X.Y version.
version = "0.1.0"
version = "0.1.1"
# The full version, including alpha/beta/rc tags.
release = version

Expand All @@ -46,6 +46,7 @@
"sphinx.ext.viewcode",
"autoapi.extension",
"myst_parser",
"nbsphinx",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down

0 comments on commit 180c4f6

Please sign in to comment.