Skip to content

Commit 00ac233

Browse files
authored
Merge pull request #2062 from effigies/purge-py
Purge Python validator
2 parents d778802 + 4f39fec commit 00ac233

File tree

12 files changed

+1
-1373
lines changed

12 files changed

+1
-1373
lines changed

.circleci/config.yml

Lines changed: 0 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,6 @@
11
version: 2
22

33
jobs:
4-
test_python:
5-
docker:
6-
- image: continuumio/miniconda3
7-
environment:
8-
BASH_ENV: '/root/.bashrc'
9-
steps:
10-
- checkout
11-
- run:
12-
name: setup conda
13-
command: |
14-
conda create -n testenv Python=3.10
15-
conda init
16-
- run: git config --global user.email "bids.maintenance@gmail.com"
17-
- run: git config --global user.name "bids-maintenance"
18-
- run:
19-
name: install datalad
20-
command: |
21-
conda activate testenv
22-
conda install -c conda-forge git-annex
23-
pip install pytest flake8 pydocstyle datalad
24-
- run:
25-
name: test python
26-
command: |
27-
conda activate testenv
28-
cd bids-validator
29-
pip install .
30-
pytest --doctest-modules bids_validator
31-
flake8 bids_validator
32-
pydocstyle bids_validator/bids_validator.py
334
test:
345
docker:
356
- image: node:18-alpine
@@ -104,63 +75,6 @@ jobs:
10475
- ./.next/cache
10576
- store_artifacts:
10677
path: ~/web_version
107-
pypi_precheck:
108-
docker:
109-
- image: alpine:3.13
110-
steps:
111-
- run: apk --no-cache add ca-certificates git openssh-client rust cargo
112-
- checkout
113-
- run:
114-
name: Set up environment
115-
command: apk --no-cache add build-base libffi-dev libressl-dev
116-
- run:
117-
name: Install Python 3 and build tools
118-
command: apk --no-cache add python3 python3-dev
119-
- run:
120-
name: Update Python install tools
121-
command: |
122-
python3 -m ensurepip
123-
python3 -m pip install --upgrade pip build
124-
- run:
125-
name: Install twine, readme renderer
126-
command: python3 -m pip install twine readme_renderer[md]
127-
- run:
128-
name: Check build and readme rendering
129-
command: |
130-
python3 -m build bids-validator/
131-
twine check bids-validator/dist/*
132-
- run:
133-
name: Check sdist installation
134-
command: |
135-
cd bids-validator
136-
python3 -m venv .venv
137-
source .venv/bin/activate
138-
python3 --version
139-
python3 -m pip install --upgrade pip
140-
python3 -m pip install dist/*.tar.gz
141-
pypi_deployment:
142-
docker:
143-
- image: alpine:3.13
144-
steps:
145-
- run: apk --no-cache add ca-certificates git openssh-client rust cargo
146-
- checkout
147-
- run:
148-
name: Set up environment
149-
command: apk --no-cache add build-base libffi-dev libressl-dev
150-
- run:
151-
name: Install Python 3 and build tools
152-
command: apk --no-cache add python3 python3-dev
153-
- run:
154-
name: Update Python install tools
155-
command: |
156-
python3 -m ensurepip
157-
python3 -m pip install --upgrade pip build
158-
- run:
159-
name: Install twine, readme renderer
160-
command: python3 -m pip install twine readme_renderer[md]
161-
- run: git checkout -f $CIRCLE_TAG
162-
- run: python3 -m build bids-validator/
163-
- run: python3 -m twine upload bids-validator/dist/*
16478
gh-pages_deployment:
16579
docker:
16680
- image: node:18-alpine
@@ -213,12 +127,6 @@ workflows:
213127
version: 2
214128
build-deploy:
215129
jobs:
216-
- test_python:
217-
filters:
218-
branches:
219-
only: /.*/
220-
tags:
221-
only: /.*/
222130
- test:
223131
filters:
224132
branches:
@@ -237,21 +145,6 @@ workflows:
237145
only: /.*/
238146
tags:
239147
only: /.*/
240-
- pypi_precheck:
241-
filters:
242-
tags:
243-
only: /.*/
244-
- pypi_deployment:
245-
requires:
246-
- test_python
247-
- test
248-
- test_docker
249-
- pypi_precheck
250-
filters:
251-
branches:
252-
ignore: /.*/
253-
tags:
254-
only: /.*/
255148
- gh-pages_deployment:
256149
requires:
257150
- test

.github/workflows/python_tests.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

bids-validator/LICENSE

Lines changed: 0 additions & 1 deletion
This file was deleted.

bids-validator/MANIFEST.in

Lines changed: 0 additions & 3 deletions
This file was deleted.

bids-validator/README.md

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[![Node Tests](https://github.com/bids-standard/bids-validator/actions/workflows/node_tests.yml/badge.svg)](https://github.com/bids-standard/bids-validator/actions/workflows/node_tests.yml)
2-
[![Python tests](https://github.com/bids-standard/bids-validator/actions/workflows/python_tests.yml/badge.svg)](https://github.com/bids-standard/bids-validator/actions/workflows/python_tests.yml)
32
[![bids-examples tests](https://github.com/bids-standard/bids-validator/actions/workflows/test-bids-examples.yml/badge.svg)](https://github.com/bids-standard/bids-validator/actions/workflows/test-bids-examples.yml)
43
[![CircleCI](https://circleci.com/gh/bids-standard/bids-validator.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/bids-standard/bids-validator)
54
[![Codecov](https://codecov.io/gh/bids-standard/bids-validator/branch/master/graph/badge.svg)](https://codecov.io/gh/bids-standard/bids-validator)
@@ -19,8 +18,6 @@
1918
- [On the Server](#on-the-server)
2019
- [Through Command Line](#through-command-line)
2120
- [Docker image](#docker-image)
22-
- [Python Library](#python-library)
23-
- [Example](#example)
2421
- [Development](#development)
2522
- [Running Locally in a Browser](#running-locally-in-a-browser)
2623
- [Testing](#testing)
@@ -46,29 +43,13 @@
4643
1. Install Docker
4744
1. From a terminal run `docker run -ti --rm -v /path/to/data:/data:ro bids/validator /data`
4845
but replace the `/path/to/data` part of the command with your own path on your machine.
49-
1. Python Library:
50-
1. Install [Python](https://www.python.org/)
51-
1. Install [Pip](https://pip.pypa.io/en/stable/installing/) package manager for Python, if
52-
not already installed.
53-
1. From a terminal run `pip install bids_validator` to acquire the
54-
[BIDS Validator PyPI package](https://pypi.org/project/bids-validator/)
55-
or `conda install bids-validator` for the
56-
[Conda package](https://anaconda.org/conda-forge/bids-validator).
57-
1. Open a Python terminal and type: `python`
58-
1. Import the BIDS Validator package `from bids_validator import BIDSValidator`
59-
1. Check if a file is BIDS compatible `BIDSValidator().is_bids('/relative/path/to/a/bids/file')`
60-
1. Note, the file path must be relative to the root of the BIDS dataset, and
61-
a leading forward slash `/` must be added to the file path.
6246

6347
## Support
6448

6549
The BIDS Validator is designed to work in both the browser and in Node.js. We
6650
target support for the latest long term stable (LTS) release of Node.js and the
6751
latest version of Chrome.
6852

69-
There is also a library of helper functions written in Python, for use with BIDS
70-
compliant applications written in this language.
71-
7253
Please report any issues you experience while using these support targets via
7354
the [GitHub issue tracker](https://github.com/bids-standard/bids-validator/issues).
7455
If you experience issues outside of these supported environments and believe we
@@ -385,31 +366,6 @@ See here for a brief explanation of the commands:
385366
- the third field is optional. In our case, we use `ro` to specify that the
386367
mounted data is _read only_
387368

388-
## Python Library
389-
390-
[![PyPI version](https://badge.fury.io/py/bids-validator.svg)](https://badge.fury.io/py/bids-validator)
391-
[![Conda version](https://img.shields.io/conda/vn/conda-forge/bids-validator)](https://anaconda.org/conda-forge/bids-validator)
392-
393-
There are is a limited library of helper functions written in Python. The main function
394-
determines if a file extension is compliant with the BIDS specification. You can find
395-
the available functions in the library, as well as their descriptions,
396-
[here](https://github.com/bids-standard/bids-validator/blob/master/bids-validator/bids_validator/bids_validator.py).
397-
To install, run `pip install -U bids_validator` (requires python and pip) or
398-
`conda install bids-validator` (requires a Conda environment).
399-
400-
### Example
401-
402-
```Python
403-
from bids_validator import BIDSValidator
404-
validator = BIDSValidator()
405-
filepaths = ["/sub-01/anat/sub-01_rec-CSD_T1w.nii.gz", "/sub-01/anat/sub-01_acq-23_rec-CSD_T1w.exe"]
406-
for filepath in filepaths:
407-
print(validator.is_bids(filepath)) # will print True, and then False
408-
```
409-
410-
Note, the file path must be relative to the root of the BIDS dataset, and a
411-
leading forward slash `/` must be added to the file path.
412-
413369
## Development
414370

415371
To develop locally, clone the project and run `npm install` from the project
@@ -465,7 +421,7 @@ Global installs are not recommended for development because of the possibility o
465421

466422
Publishing is done with [Lerna](https://github.com/lerna/lerna). Use the command `npx lerna publish` and follow instructions to set a new version.
467423

468-
Using lerna publish will create a git commit with updated version information and create a version number tag for it, push the tag to GitHub, then publish to NPM and PyPI. The GitHub release is manual following that.
424+
Using lerna publish will create a git commit with updated version information and create a version number tag for it, push the tag to GitHub, then publish to NPM. The GitHub release is manual following that.
469425

470426
## Acknowledgments
471427

bids-validator/bids_validator/__init__.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)