-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:ihmeuw/easylink into sbachmei/mic-5…
…561/improve-docstrings-graph_components-implementation
- Loading branch information
Showing
8 changed files
with
124 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# ----------------------------------------------------------------------------- | ||
# - invoked on push to any branch | ||
# ----------------------------------------------------------------------------- | ||
name: update README | ||
|
||
on: push | ||
|
||
jobs: | ||
update-readme: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.11 | ||
- name: Update README | ||
run: | | ||
pip install packaging | ||
python update_readme.py | ||
- name: Commit and push changes | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "github-actions" | ||
git diff --quiet && git diff --staged --quiet || ( | ||
git add README.rst | ||
git commit -am "update README with supported Python versions" | ||
git pull --rebase origin ${{ github.ref_name }} | ||
git push origin ${{ github.ref_name }} | ||
) | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ entity resolution (ER) pipelines. | |
|
||
.. _python_support: | ||
|
||
Supported Python versions: 3.11, 3.12 | ||
**Supported Python versions: 3.11, 3.12** | ||
|
||
.. _end_python_support: | ||
|
||
|
@@ -22,21 +22,20 @@ There are a few things to install in order to use this package: | |
likely need to request it from your system admin. | ||
Refer to https://docs.sylabs.io/guides/4.1/admin-guide/installation.html | ||
|
||
.. highlight:: console | ||
|
||
- Install graphviz via: | ||
:: | ||
|
||
.. code-block:: console | ||
$ conda install graphviz | ||
- Install EasyLink. | ||
|
||
Option 1 - Install from PyPI with pip:: | ||
Option 1 - Install from PyPI with pip:: | ||
|
||
$ pip install easylink | ||
|
||
Option 2 - Build from source with pip:: | ||
Option 2 - Build from source with pip:: | ||
|
||
$ git clone [email protected]:ihmeuw/easylink.git # or git clone https://github.com/ihmeuw/easylink.git | ||
$ cd easylink | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[build-system] | ||
requires = ["packaging", "setuptools"] | ||
|
||
[tool.black] | ||
line_length = 94 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["3.11", "3.12"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
""" This script updates the README.rst file with the latest information about | ||
the project. It is intended to be run from the github "update README" workflow. | ||
""" | ||
|
||
import json | ||
import re | ||
|
||
from packaging.version import parse | ||
|
||
# Load supported python versions | ||
with open("python_versions.json", "r") as f: | ||
versions = json.load(f) | ||
versions_str = ", ".join(versions) | ||
versions = [parse(v) for v in versions] | ||
max_version = max(versions).base_version | ||
|
||
# Open README and replace python versions | ||
with open("README.rst", "r") as file: | ||
readme = file.read() | ||
# Update the list of supported python versions | ||
# NOTE: this regex assumes the version format is always major.minor | ||
readme = re.sub( | ||
r"Supported Python versions:\s*(?:\d+\.\d+\s*,\s*)+\d+\.\d+", | ||
r"Supported Python versions: " + versions_str, | ||
readme, | ||
) | ||
# Update the python version used in the installation code snipped example | ||
readme = re.sub(r"python=\d+\.\d+", "python=" + max_version, readme) | ||
|
||
# Write the updated README back to file | ||
with open("README.rst", "w") as file: | ||
file.write(readme) |