Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add bump_version and bump version #47

Merged
merged 4 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
3 changes: 1 addition & 2 deletions conda.recipe/meta.yaml → .conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% set version = "1.2.10" %}

{% set version = "1.2.11" %}
package:
name: "proteinflow"
version: {{ version }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/process-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ jobs:
run: |
git pull
conda run -n proteinflow . make_docs.sh
echo ${{ needs.test.outputs.update }}
- uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ needs.test.outputs.update }}
with:
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ permissions:
contents: read

jobs:
publish-to-conda:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: publish-to-conda
uses: MichaelsJP/[email protected]
with:
subDir: '.conda'
AnacondaToken: ${{ secrets.ANACONDA_TOKEN }}
override: true

deploy:

runs-on: ubuntu-latest
Expand Down
23 changes: 23 additions & 0 deletions bump_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import click


@click.option("--version", required=True)
@click.command()
def main(version):
with open("pyproject.toml", "r") as f:
lines = f.readlines()
with open("pyproject.toml", "w") as f:
for line in lines:
if line.startswith("version"):
line = f'version = "{version}"\n'
f.write(line)
with open(".conda/meta.yaml", "r") as f:
lines = list(f.readlines())
lines[0] = f'{{% set version = "{version}" %}}\n'
with open(".conda/meta.yaml", "w") as f:
for line in lines:
f.write(line)


if __name__ == "__main__":
main()
7 changes: 6 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,8 @@ <h3 id="using-the-data">Using the data</h3>
&#34;&#34;&#34;

# download fasta files for excluded chains
if not os.path.exists(tmp_folder):
os.makedirs(tmp_folder)
sequences = []
for chain in exclude_chains:
pdb_id, chain_id = chain.split(&#34;-&#34;)
Expand All @@ -1238,8 +1240,11 @@ <h3 id="using-the-data">Using the data</h3>
os.remove(outfnm)

# iterate over files in the dataset to check similarity
print(&#34;Checking excluded chains similarity...&#34;)
exclude_biounits = []
for fn in os.listdir(os.path.join(local_datasets_folder, f&#34;proteinflow_{tag}&#34;)):
for fn in tqdm(
os.listdir(os.path.join(local_datasets_folder, f&#34;proteinflow_{tag}&#34;))
):
if not fn.endswith(&#34;.pickle&#34;):
continue
fp = os.path.join(local_datasets_folder, f&#34;proteinflow_{tag}&#34;, fn)
Expand Down
7 changes: 6 additions & 1 deletion proteinflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,8 @@ def _get_excluded_files(
"""

# download fasta files for excluded chains
if not os.path.exists(tmp_folder):
os.makedirs(tmp_folder)
sequences = []
for chain in exclude_chains:
pdb_id, chain_id = chain.split("-")
Expand All @@ -1108,8 +1110,11 @@ def _get_excluded_files(
os.remove(outfnm)

# iterate over files in the dataset to check similarity
print("Checking excluded chains similarity...")
exclude_biounits = []
for fn in os.listdir(os.path.join(local_datasets_folder, f"proteinflow_{tag}")):
for fn in tqdm(
os.listdir(os.path.join(local_datasets_folder, f"proteinflow_{tag}"))
):
if not fn.endswith(".pickle"):
continue
fp = os.path.join(local_datasets_folder, f"proteinflow_{tag}", fn)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "proteinflow"
version = "1.2.10"
version = "1.2.11"
authors = [
{name = "Liza Kozlova", email = "[email protected]"},
{name = "Arthur Valentin", email = "[email protected]"}
Expand Down Expand Up @@ -36,4 +36,4 @@ keywords = ["bioinformatics", "dataset", "protein", "PDB", "deep learning"]
proteinflow = "proteinflow.scripts.proteinflow_cli:cli"

[tool.setuptools.packages]
find = {}
find = {}