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

Refactoring gc_derivatization #1

Open
wants to merge 167 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
5853bad
testing
wverastegui Jul 7, 2022
d260a9b
testing
wverastegui Jul 7, 2022
72e5547
testing
wverastegui Jul 7, 2022
b7056b2
move ipynb to example folder
wverastegui Jul 7, 2022
f5deac2
replace NIST_195_200.txt by NIST_ONSSiMe3.txt
wverastegui Jul 7, 2022
4840c0f
replace NIST_195_200.txt by NIST_ONSSiMe3.txt
wverastegui Jul 7, 2022
19df2a8
undo replacement
wverastegui Jul 7, 2022
0c3d9f6
cleanning
wverastegui Jul 7, 2022
7636b59
Lint
wverastegui Jul 7, 2022
fd46852
testing
wverastegui Jul 8, 2022
2021771
testing
wverastegui Jul 8, 2022
5e12f64
testing
wverastegui Jul 8, 2022
eb668fa
testing
wverastegui Jul 8, 2022
2e7f313
sort
wverastegui Jul 11, 2022
cb6713f
Sort
wverastegui Jul 11, 2022
a5b730e
Sort
wverastegui Jul 11, 2022
9612a6e
copy gc_meox_src.py to example folder (import issues)
wverastegui Jul 11, 2022
b956427
converting ipynb to py
wverastegui Jul 11, 2022
276890c
sorting
wverastegui Jul 11, 2022
60d35f6
sorting
wverastegui Jul 11, 2022
f7ad979
updates
wverastegui Jul 12, 2022
aa0c61c
Refactoring
wverastegui Jul 13, 2022
7ad13e1
Rectoring Py
wverastegui Jul 13, 2022
466cc01
refac
wverastegui Jul 14, 2022
2ff3b5a
Add files via upload
wverastegui Jul 19, 2022
e44c35c
Add files via upload
wverastegui Jul 19, 2022
880697a
test
wverastegui Jul 19, 2022
ae77090
refact
wverastegui Jul 19, 2022
d088a27
Test
wverastegui Jul 19, 2022
c38b9d7
test
wverastegui Jul 19, 2022
e50405f
refact
wverastegui Jul 19, 2022
91fe4b0
test
wverastegui Jul 19, 2022
815ad87
test
wverastegui Jul 19, 2022
7e0ac91
Refatc
wverastegui Jul 19, 2022
420b1f0
Update
wverastegui Jul 19, 2022
6278455
update
wverastegui Jul 19, 2022
334af25
Update
wverastegui Jul 19, 2022
8e61148
Update
wverastegui Jul 19, 2022
00acf2c
Update
wverastegui Jul 19, 2022
160b9d2
Update
wverastegui Jul 19, 2022
d7efa11
Update
wverastegui Jul 19, 2022
a7be859
Merge pull request #1 from wverastegui/refact_gc_derivatization
wverastegui Jul 20, 2022
94d4903
add conda dev environment
maximskorik Oct 21, 2022
608bbde
fix slicing errors in the notebook
maximskorik Oct 21, 2022
3d16e10
move scripts into `gc_derivatization` subdir
maximskorik Oct 21, 2022
7c76e2d
refactor cli script
maximskorik Oct 21, 2022
06a7e30
add `main` func
maximskorik Oct 21, 2022
852a048
move cli to `__main__.py`
maximskorik Oct 21, 2022
a710d62
add `pytest` to dev requirements
maximskorik Oct 21, 2022
c5efc01
add input reading and tests with data
maximskorik Oct 21, 2022
22dc936
move I/O handling to utils.py
maximskorik Oct 21, 2022
a1bafe8
rename directory to reflect the package name
maximskorik Oct 21, 2022
1ba3838
edit setup.cfg
maximskorik Oct 21, 2022
69d2192
move `process_one_mol` to utils.py; edit input reading
maximskorik Oct 21, 2022
a353e79
add pkg dir to setup.cfg
maximskorik Oct 21, 2022
8e1eb04
adjust test for tuples
maximskorik Oct 21, 2022
f07c7cf
add data-writing tests
maximskorik Oct 21, 2022
59d0a6c
add tests for output content
maximskorik Oct 21, 2022
aea0dac
rename file with IO tests
maximskorik Oct 21, 2022
bf8add9
omit duplicate func names
maximskorik Oct 21, 2022
776b249
reformat gc_meox_src.py
maximskorik Oct 25, 2022
ba3e2fc
remove commented code
maximskorik Oct 25, 2022
4dfa058
refactor `is_derivatized`; add tests
maximskorik Oct 25, 2022
af8fb5d
add tests for `add_derivatization_groups`
maximskorik Oct 25, 2022
2fa32d6
adjust for non-deterministic behaviour
maximskorik Oct 25, 2022
a57251f
add pytest plugin to dev env
maximskorik Oct 25, 2022
37dc697
use oneliner to unpack tuple
maximskorik Oct 25, 2022
50b671a
add docstrings to tests
maximskorik Oct 25, 2022
04ab8b3
add test for `process_one_mol`; rename test script
maximskorik Oct 25, 2022
8dcf21a
make `process_one_mol` return kekule SMILES
maximskorik Oct 25, 2022
26c7937
simplify test since its internals are tested elsewhere
maximskorik Oct 25, 2022
d14bdb2
add test for writing without keep
maximskorik Oct 25, 2022
9905d7a
add meta.yaml
maximskorik Oct 26, 2022
afa19c8
move `process_one_mol` to the main module
maximskorik Oct 26, 2022
275d675
fix imports
maximskorik Oct 26, 2022
a5396cb
rename module
maximskorik Oct 26, 2022
b0cfd34
fix setup.cfg
maximskorik Oct 26, 2022
8386066
move plotting
maximskorik Oct 26, 2022
c666bce
update EDA in notebook
maximskorik Oct 26, 2022
ef456b6
move `process_one_mol` test
maximskorik Oct 26, 2022
fd6c19a
remove derivatization.py because it's not used
maximskorik Oct 26, 2022
db86295
add `conda build` CI workflow
maximskorik Oct 27, 2022
77bc051
add `python-package-conda` CI
maximskorik Oct 27, 2022
410c978
add `python-package` CI
maximskorik Oct 27, 2022
661405a
update python requirement to >=3.8
maximskorik Oct 27, 2022
e8a2490
make type hints work with python 3.8
maximskorik Oct 27, 2022
9bf185b
add sonarcloud code check CI
maximskorik Oct 27, 2022
718ed82
add CHANGELOG.md
maximskorik Oct 28, 2022
24fd839
update README-package.md
maximskorik Oct 28, 2022
4702064
remove docker and bash scripts; move exmaple readme to example dir
maximskorik Oct 28, 2022
10e8964
use oneliner for CIs events; use single-quotes for Python versions
maximskorik Oct 28, 2022
3099c96
sync environment-dev.yaml with setup.cfg
maximskorik Oct 31, 2022
04219ac
update installation instructions
maximskorik Oct 31, 2022
ba0c6c7
correct comment
maximskorik Oct 31, 2022
ae6444b
rename test script
maximskorik Oct 31, 2022
fa943a4
add tests for cli; add exit code
maximskorik Oct 31, 2022
8800b8f
add test for ncpu flag
maximskorik Oct 31, 2022
4fdb0bb
add test for repeats flag
maximskorik Oct 31, 2022
0f32093
move data path into a fixture
maximskorik Oct 31, 2022
7fa786e
add `mock` to dev requirements
maximskorik Oct 31, 2022
e29df55
remove pytest-cov since its in dev requirements
maximskorik Oct 31, 2022
67eec82
add pytest-cov to conda dev
maximskorik Oct 31, 2022
940f4c6
apply `isort`; expose functions via __init__.py
maximskorik Oct 31, 2022
a2d84cd
add `pytest-cov` to requirements-dev.txt
maximskorik Oct 31, 2022
4ff4c13
Update conda/meta.yaml
hechth Nov 1, 2022
ad22c93
edit setup.cfg metadata
maximskorik Nov 1, 2022
3269c7f
make conda-dev use requirements.txt
maximskorik Nov 1, 2022
70cabe5
Merge branch 'prep_package' of https://github.com/maximskorik/gc_deri…
maximskorik Nov 1, 2022
a258fac
update example ipynb
maximskorik Nov 1, 2022
f8dd7ee
add rdkit to env-dev bc the pkg is called different in conda
maximskorik Nov 1, 2022
ff6313d
update molecule annotation in ipynb
maximskorik Nov 1, 2022
bd3cf71
remove duplicated fixture
maximskorik Nov 1, 2022
7745ae2
remove horizontal lines in README.md
maximskorik Nov 1, 2022
e793d12
skip SonarCloud CI step until `SONAR_TOKEN` secret is set
maximskorik Nov 1, 2022
1d5afb1
fix typo in reaction name
maximskorik Nov 1, 2022
b9a612c
remove line from ipynb
maximskorik Nov 2, 2022
8ff1986
Merge pull request #9 from maximskorik/prep_package
hechth Nov 2, 2022
5aae5d3
refactor `process_one_mol`
maximskorik Nov 7, 2022
aaf159f
apply `isort`
maximskorik Nov 7, 2022
c4c6766
add missing type hints
maximskorik Nov 7, 2022
5c3e172
Merge pull request #14 from maximskorik/refactor_proc_one_mol
maximskorik Nov 10, 2022
093296a
Move SonarCloud scan to an individual job (#15)
maximskorik Nov 10, 2022
5328aa2
Create MIT LICENSE
maximskorik Nov 22, 2022
e4b75e4
bump version to `1.0.0`
maximskorik Nov 22, 2022
0381634
change pkg name to `gc-meox-tms`
maximskorik Nov 22, 2022
9729046
change pkg name and references to GH repo to `gc-meox-tms`
maximskorik Nov 22, 2022
ea66a70
unify setup config in `pyproject.toml`
maximskorik Nov 23, 2022
10ff0bc
update README.md
maximskorik Nov 23, 2022
078a081
add Conda to the installation guide
maximskorik Nov 24, 2022
8504f24
document `is_derivatized`
maximskorik Dec 13, 2022
e34410d
document `remove_derivatization_groups`
maximskorik Dec 13, 2022
60982f4
document `add_derivatization_groups`
maximskorik Dec 13, 2022
7282cf5
document `process_one_mol`
maximskorik Dec 13, 2022
e3183ea
document `read_input_txt`
maximskorik Dec 13, 2022
0e62f21
document `write_tab_separated`
maximskorik Dec 13, 2022
b5084f2
document `write_flat`
maximskorik Dec 13, 2022
c93a196
add developer documentation and isort package to dev env
maximskorik Dec 13, 2022
b8c364d
correct typo
maximskorik Dec 13, 2022
0de7605
add newline
maximskorik Dec 13, 2022
17d3268
correct typo
maximskorik Dec 13, 2022
2fa510f
add cloning step to dev installation
maximskorik Dec 13, 2022
94e4ae7
update installation instructions for users
maximskorik Dec 13, 2022
c76afff
add "Publish to PyPi" workflow
maximskorik Dec 13, 2022
9e06a79
Merge pull request #23 from maximskorik/add_docs
hechth Dec 13, 2022
39c7b62
Merge pull request #24 from maximskorik/pypi_action
hechth Dec 13, 2022
f94b562
fix publish_pypi workflow
maximskorik Dec 14, 2022
8c3a26a
bump package version for pypi release
maximskorik Dec 14, 2022
13b51df
update CHANGELOG.md
maximskorik Dec 14, 2022
db04574
add pip installation to README.md
maximskorik Dec 14, 2022
2d7b675
Create project_automation.yml
hechth Jun 23, 2023
26ece96
updated python-package.yaml
zargham-ahmad Jun 26, 2023
e9516c5
Merge pull request #27 from zargham-ahmad/sonar-ci
hechth Oct 23, 2023
fb947d2
Fixed test failure & lint
wverastegui Mar 13, 2024
ba99549
Corrected typos
wverastegui Mar 13, 2024
16e8c7a
Update pyproject.toml
hechth Apr 18, 2024
b423cf2
Update requirements.txt
hechth Apr 18, 2024
b50ac0d
Merge pull request #32 from RECETOX/hechth-patch-1
hechth Apr 19, 2024
ac4da25
Merge branch 'master' into wverastegui/issue28
hechth Apr 19, 2024
1c48f80
Merge pull request #31 from RECETOX/wverastegui/issue28
hechth Apr 19, 2024
32e96ce
Fix wrongly named file upload to Sonar
MarcHagen Jun 4, 2024
8b2bcbd
updated ci pipelines
hechth Jun 7, 2024
6996df9
updated python versions
hechth Jun 7, 2024
0e3e480
python versions as string
hechth Jun 7, 2024
a61955d
added conda update conda to list
hechth Jun 7, 2024
2fd2d11
Merge pull request #34 from RECETOX/ci_update
hechth Jun 7, 2024
ae392ae
Merge branch 'master' into patch-1
hechth Jun 7, 2024
9a5648d
Merge pull request #33 from MarcHagen/patch-1
hechth Jun 7, 2024
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
54 changes: 54 additions & 0 deletions .github/workflows/anaconda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Anaconda Build

on: ['push', 'pull_request', 'workflow_dispatch']

jobs:
anaconda_build:
name: Anaconda Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create build environment
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: gc-meox-tms-build
auto-update-conda: true
environment-file: conda/environment-build.yaml
python-version: 3.8
- name: Show conda config
shell: bash -l {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
conda env list
- name: Python info
shell: bash -l {0}
run: |
which python
python --version
- name: Show environment variables
shell: bash -l {0}
run: |
env | sort
- name: Build the conda package
shell: bash -l {0}
run: |
export BUILDDIR=$RUNNER_TEMP/gc-meox-tms/_build
[ "$RUNNING_OS" = "Windows" ] && export BUILDDIR=$RUNNER_TEMP\\gc-meox-tms\\_build
conda config --set anaconda_upload no
conda build --numpy 1.18.1 --no-include-recipe \
--channel bioconda --channel conda-forge \
--croot ${BUILDDIR} \
./conda
- name: Upload package artifact from build
uses: actions/upload-artifact@v2
with:
name: conda-package-artifact
path: ${{ runner.temp }}/gc-meox-tms/_build
retention-days: 1
11 changes: 11 additions & 0 deletions .github/workflows/project_automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Add issues to project

on:
issues:
types:
- opened

jobs:
call-workflow:
uses: recetox/galaxytools/.github/workflows/add_issue_to_project.yml@master
secrets: inherit
26 changes: 26 additions & 0 deletions .github/workflows/publish_pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish to PyPI

on:
release:
types: [published]
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
python -m build --sdist --wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1.8
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/python-package-conda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Python Package using Conda

on: ['push', 'pull_request', 'workflow_dispatch']

jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Add conda to PATH
run: |
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda update conda
conda env update --file conda/environment-dev.yaml --name base
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest --cov --cov-report term --cov-report xml --junitxml=xunit-result.xml
68 changes: 68 additions & 0 deletions .github/workflows/python-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Python Package

on: ['push', 'pull_request', 'workflow_dispatch']

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest --cov --cov-report term --cov-report xml --junitxml=xunit-result.xml
- uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
with:
name: coverage-report
path: |
coverage.xml
xunit-result.xml

sonar-cloud:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Pull coverage report
uses: actions/download-artifact@v2
with:
name: coverage-report
path: ${{ github.workspace }}
- name: Adjust coverage source path
run: sed -i "s+$PWD/++g" coverage.xml
- name: SonarCloud Scan
if: env.SONAR_TOKEN != null
uses: sonarsource/sonarcloud-github-action@master
with:
args: >
-Dsonar.projectKey=RECETOX_gc-meox-tms
-Dsonar.organization=recetox
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.python.version="3.10"
-Dsonar.sources=gc_meox_tms/
-Dsonar.tests=tests/
-Dsonar.python.coverage.reportPaths=coverage.xml
-Dsonar.python.xunit.reportPath=xunit-result.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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).

## [1.0.1]

### Added
* documented functions with docstrings to make use of Python's built-in `help()` function [#23](https://github.com/RECETOX/gc-meox-tms/pull/23)
* added developer documentation [#23](https://github.com/RECETOX/gc-meox-tms/pull/23)
* added `Publish to PyPi` GitHub Actions workflow [#24](https://github.com/RECETOX/gc-meox-tms/pull/24)

## [1.0.0]

### Added
* added **Anaconda build**, **Python Package with pip** (inc. **SonarCloud**), and **Python Package with Conda** GH Actions.
* added test coverage for main and IO functionality
* added conda dev environment and conda meta.yaml recipe
* added CHANGELOG.md

### Changed
* changed package structure
* divided main functionality, IO handling, and CLI into designated modules

### Fixed
* fixed not working examples in IPython notebook
21 changes: 0 additions & 21 deletions Dockerfile

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 RECETOX

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
17 changes: 0 additions & 17 deletions Makefile

This file was deleted.

22 changes: 0 additions & 22 deletions README-package.md

This file was deleted.

Loading