Skip to content

Commit

Permalink
drop: support for unused databases
Browse files Browse the repository at this point in the history
  • Loading branch information
dmyersturnbull committed Feb 5, 2025
1 parent 2d5a9d3 commit feedfde
Show file tree
Hide file tree
Showing 42 changed files with 21 additions and 6,649 deletions.
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,12 @@ git clone --recurse-submodules https://github.com/rcsb/py-rcsb_db.git

```

Optionally, run test suite (Python versions 3.9+) using
[setuptools](https://setuptools.readthedocs.io/en/latest/) or
[tox](http://tox.readthedocs.io/en/latest/example/platform.html):
Optionally, run test suite (Python versions 3.9+) using either:

```bash
python setup.py test

or simply run

tox
```
- [setuptools](https://setuptools.readthedocs.io/en/latest/)
with `python setup.py test`
- [tox](http://tox.readthedocs.io/en/latest/example/platform.html)
by running simply `tox`

Installation is via the program [pip](https://pypi.python.org/pypi/pip). To run tests
from the source tree, the package must be installed in editable mode (i.e. -e):
Expand All @@ -44,9 +39,7 @@ pip install -e .
You will need a few packages, before `pip install .` can work:

```bash

sudo apt install default-libmysqlclient-dev flex bison

sudo apt install flex bison
```

### Installing on macOS
Expand Down
8 changes: 4 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ schedules:

jobs:
- template: azure-template-tox-job.yml
parameters: {tox: 'format_pep8', python: '3.10', os: 'linux', fixtures: 'mysql,mongodb'}
parameters: {tox: 'format_pep8', python: '3.10', os: 'linux', fixtures: 'mongodb'}
- template: azure-template-tox-job.yml
parameters: {tox: 'lint_pylint', python: '3.10', os: 'linux', fixtures: 'mysql,mongodb'}
parameters: {tox: 'lint_pylint', python: '3.10', os: 'linux', fixtures: 'mongodb'}
#- template: azure-template-tox-job.yml
# parameters: {tox: 'test_coverage', python: '3.10', os: 'linux', fixtures: 'mysql,mongodb'}
# parameters: {tox: 'test_coverage', python: '3.10', os: 'linux', fixtures: mongodb'}
#
- template: azure-template-tox-job.yml
parameters: {tox: 'py310', python: '3.10', os: 'linux', fixtures: 'mysql,mongodb'}
parameters: {tox: 'py310', python: '3.10', os: 'linux', fixtures: 'mongodb'}
- template: azure-template-publish-job.yml
parameters: {tox: 'py310', python: '3.10', os: 'linux'}
#
Expand Down
44 changes: 7 additions & 37 deletions azure-template-tox-job.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File: azure-template-tox-job.yml
# Date: 8-Jul-2019 jdw split out from original pipeline
# Supports: fixtures=mysql,mongodb (linux)
# Supports: fixtures=mongodb (linux)
#
# Updates:
# 6-Aug-2019 jdw build source and binary wheels by default.
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
# ----------------------------------------------
- ${{ if startsWith(parameters.os, 'linux') }}:
- script: lsb_release -a
displayName: "Ubuntu kernal version"
displayName: "Ubuntu kernel version"
- script: which apt
displayName: "Installing OS dependencies"
- script: apt-cache policy | grep http | awk '{print $2 $3}' | sort -u
Expand All @@ -80,39 +80,6 @@ jobs:
- script: sudo apt-get install bison
displayName: "Install bison"
#
- ? ${{ if and(contains(parameters.fixtures, 'mysql'), startsWith(parameters.os, 'linux')) }}
: - bash: |
sudo apt-get install python3-dev mysql-server
sudo apt-get install default-libmysqlclient-dev
sudo apt-get install python-mysqldb
sudo apt list --installed | grep -i mysql
displayName: "Install mysql development libraries"
- bash: |
echo "Retarting mysql service"
sudo systemctl restart mysql.service
mysql -V
mysql --user=root --password=root -e "use mysql; select * from user;"
#
echo "Try resetting password"
mysqladmin --user=root --password=root password 'ChangeMeSoon'
#
# mysql -u root -p root -e "SET PASSWORD FOR root@'localhost' = PASSWORD(‘ChangeMeSoon’);"
# mysql -u root -p root -e "FLUSH PRIVILEGES; update mysql.user set password=password('ChangeMeSoon') where user='root'; FLUSH PRIVILEGES;"
# UPDATE mysql.user SET Password=PASSWORD('ChangeMeSoon') WHERE User='root';
echo "Running preliminary mysql setup"
mysql --user=root --password=ChangeMeSoon <<_EOF_
DELETE FROM mysql.user WHERE User='';
DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');
DROP DATABASE IF EXISTS test;
DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';
FLUSH PRIVILEGES;
_EOF_
ps -ef | grep -i my
mysql --user=root --password=ChangeMeSoon -e "show databases;"
#
displayName: "Start and configure mysql ..."
# -----
- ? ${{ if and(contains(parameters.fixtures, 'mongodb'), startsWith(parameters.os, 'linux')) }}
: # Mongo install
Expand All @@ -137,8 +104,11 @@ jobs:
- script: 'python -c "import sys; print(sys.version); print(sys.executable)"'
displayName: show python information
#
- script: python -m pip install --upgrade pip tox
displayName: "Install tools"
- script: python -m pip install --upgrade pip
displayName: "Upgrade pip"
#
- script: pip install tox jsonschema 'rcsb.utils.chemref>=0.91' 'jsondiff>=1.2.0'
displayName: "Install test requirements"
#
- script: pip install -r requirements.txt
displayName: "Install dependencies"
Expand Down
10 changes: 0 additions & 10 deletions pylintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
[MASTER]

# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-whitelist=MySQLdb

# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS
Expand Down Expand Up @@ -302,11 +297,6 @@ ignored-argument-names=_.*|^ignored_|^unused_
# Tells whether we should check for unused import in __init__ files.
init-import=no

# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io


[FORMAT]

# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
Expand Down
237 changes: 0 additions & 237 deletions rcsb/db/cockroach/CockroachDbLoader.py

This file was deleted.

Loading

0 comments on commit feedfde

Please sign in to comment.