inspire-schemas 61.6.13 → 61.6.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,65 +1,30 @@
1
- name: bump, build and release
1
+ name: Bump package version and publish to pypi
2
2
 
3
3
  on:
4
- push:
5
- branches: [master]
6
- pull_request:
7
- branches: [master]
4
+ workflow_call:
8
5
 
9
6
  jobs:
10
- test:
7
+ bump:
8
+ outputs:
9
+ new_sha: ${{ steps.sha.outputs.SHA }}
11
10
  runs-on: ubuntu-latest
12
- strategy:
13
- matrix:
14
- python: ['3.11','3.12','3.13']
15
11
  steps:
16
12
  - name: Checkout
17
- uses: actions/checkout@v2
13
+ uses: actions/checkout@v4
18
14
  with:
15
+ ref: ${{ github.head_ref }}
19
16
  fetch-depth: 0
20
17
 
21
- - name: Install npm dependencies
22
- run: |
23
- npm install buffer-shims
24
- npm install --global rollup
25
-
26
18
  - name: Set up Python
27
19
  uses: actions/setup-python@v5
28
20
  with:
29
- python-version: ${{ matrix.python }}
30
-
31
- - name: Install python dependencies
32
- run: |
33
- python -m pip install --upgrade pip
34
- python -m pip --no-cache-dir install -e .[tests,docs]
35
-
36
- - name: Show python dependencies
37
- run: |
38
- python --version
39
- pip freeze
40
-
41
- - name: Build Test
42
- run: |
43
- ./tests/integration/test_setup.sh python
21
+ python-version: "3.11"
44
22
 
45
- - name: Run tests
23
+ - name: Configure git
24
+ shell: bash
46
25
  run: |
47
- ./run-tests.sh
48
-
49
- bump:
50
- outputs:
51
- new_sha: ${{ steps.sha.outputs.SHA }}
52
- needs: test
53
- if: ${{ github.event_name == 'push' }}
54
- runs-on: ubuntu-latest
55
- steps:
56
- - name: Check out the repository
57
- uses: actions/checkout@v2
58
-
59
- - name: Set up Python
60
- uses: actions/setup-python@v5
61
- with:
62
- python-version: "3.11"
26
+ git config user.name github-actions
27
+ git config user.email "38065702145+github-actions[bot]@users.noreply.github.com"
63
28
 
64
29
  - name: Install bump2version
65
30
  shell: bash
@@ -67,22 +32,16 @@ jobs:
67
32
  python -m pip install --upgrade pip
68
33
  pip install bump2version
69
34
 
70
- - name: Configure git
71
- shell: bash
72
- run: |
73
- git config user.name github-actions
74
- git config user.email github-actions@github.com
75
-
76
35
  - name: Bump version
77
36
  shell: bash
78
37
  run: |
79
38
  bump2version patch --tag --verbose
80
39
 
81
40
  - name: Push changes
82
- uses: ad-m/github-push-action@master
41
+ uses: ad-m/github-push-action@v0.8.0
83
42
  with:
84
- github_token: ${{ secrets.GITHUB_TOKEN }}
85
43
  branch: ${{ github.ref }}
44
+ github_token: ${{ secrets.GITHUB_TOKEN }}
86
45
  tags: true
87
46
 
88
47
  - name: get sha
@@ -90,11 +49,10 @@ jobs:
90
49
  run: |
91
50
  sha_new=$(git rev-parse HEAD)
92
51
  echo $sha_new
93
- echo "::set-output name=SHA::$sha_new"
52
+ echo "SHA=$sha_new" >> $GITHUB_OUTPUT
94
53
 
95
54
  publish:
96
55
  needs: bump
97
- if: ${{ github.event_name == 'push' }}
98
56
  runs-on: ubuntu-latest
99
57
  steps:
100
58
  - name: Checkout
@@ -123,24 +81,22 @@ jobs:
123
81
  run: |
124
82
  python -m pip install --upgrade pip
125
83
  pip install setuptools wheel
126
- pip install -e .[tests,docs]
84
+ pip install -e .[tests]
127
85
 
128
86
  - name: Show python dependencies
129
87
  run: |
88
+ python3 --version
130
89
  pip freeze
131
90
 
132
91
  - name: Build package
133
92
  run: |
134
- mkdir clean-build
135
- python setup.py sdist bdist_wheel --universal --dist-dir ./clean-build
93
+ python setup.py sdist bdist_wheel
136
94
 
137
95
  - name: Publish package
138
- uses: pypa/gh-action-pypi-publish@v1.3.1
96
+ uses: pypa/gh-action-pypi-publish@v1.9.0
139
97
  with:
140
- verify_metadata: false
141
98
  user: __token__
142
99
  password: ${{ secrets.pypi_password }}
143
- packages_dir: clean-build/
144
100
 
145
101
  - name: Build npm package
146
102
  run: |
@@ -0,0 +1,21 @@
1
+ name: Lint
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ ref:
7
+ description: The reference to build
8
+ type: string
9
+ required: true
10
+
11
+ jobs:
12
+ linter:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Checkout Code
16
+ uses: actions/checkout@v4
17
+ with:
18
+ ref: ${{ inputs.ref }}
19
+
20
+ - name: Pre-commit check
21
+ uses: pre-commit/action@v3.0.1
@@ -0,0 +1,17 @@
1
+ name: Pull request master
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [master]
6
+
7
+ jobs:
8
+ lint:
9
+ uses: ./.github/workflows/lint.yml
10
+ with:
11
+ ref: ${{ github.event.pull_request.head.sha }}
12
+
13
+ python3_tests:
14
+ uses: ./.github/workflows/test-python.yml
15
+
16
+ python2_tests:
17
+ uses: ./.github/workflows/test-python-py2.yml
@@ -0,0 +1,17 @@
1
+ name: Push master
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+
7
+ jobs:
8
+ python3_tests:
9
+ uses: ./.github/workflows/test-python.yml
10
+
11
+ python2_tests:
12
+ uses: ./.github/workflows/test-python-py2.yml
13
+
14
+ bump_version:
15
+ needs: [python2_tests, python3_tests]
16
+ uses: ./.github/workflows/bump-and-publish.yml
17
+ secrets: inherit
@@ -0,0 +1,39 @@
1
+ name: Test Python 2
2
+
3
+ on:
4
+ workflow_call:
5
+
6
+ jobs:
7
+ test:
8
+ runs-on: ubuntu-22.04
9
+ steps:
10
+ - name: Checkout
11
+ uses: actions/checkout@v4
12
+ with:
13
+ fetch-depth: 0
14
+
15
+ - name: Install Python2 interpreter
16
+ run: |
17
+ sudo apt-get update
18
+ sudo apt-get install -y python2
19
+
20
+ - name: Install python dependencies
21
+ run: |
22
+ wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
23
+ python2 get-pip.py
24
+ python2 -m pip install --user --upgrade pip
25
+ python2 -m pip --no-cache-dir install --user -e .[tests,docs]
26
+
27
+ - name: Show python dependencies
28
+ run: |
29
+ pip --version
30
+ python2 --version
31
+ pip freeze
32
+
33
+ - name: Build Test
34
+ run: |
35
+ ./tests/integration/test_setup.sh python2
36
+
37
+ - name: Run tests
38
+ run: |
39
+ ./run-tests.sh
@@ -0,0 +1,39 @@
1
+ name: Test Python 3
2
+
3
+ on:
4
+ workflow_call:
5
+
6
+ jobs:
7
+ test:
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ python: ['3.11','3.12','3.13']
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: ${{ matrix.python }}
22
+
23
+ - name: Install python dependencies
24
+ run: |
25
+ python -m pip install --upgrade pip
26
+ python -m pip --no-cache-dir install -e .[tests,docs]
27
+
28
+ - name: Show python dependencies
29
+ run: |
30
+ python --version
31
+ pip freeze
32
+
33
+ - name: Build Test
34
+ run: |
35
+ ./tests/integration/test_setup.sh python
36
+
37
+ - name: Run tests
38
+ run: |
39
+ ./run-tests.sh
@@ -15,3 +15,4 @@ repos:
15
15
  hooks:
16
16
  - id: ruff
17
17
  args: [ --fix, --unsafe-fixes ]
18
+ - id: ruff-format
package/Dockerfile ADDED
@@ -0,0 +1,11 @@
1
+ FROM python:3.11-bullseye AS inspire-schemas-py3-tests
2
+
3
+ ARG APP_HOME=/code
4
+ WORKDIR ${APP_HOME}
5
+
6
+ COPY . .
7
+
8
+ RUN python -m pip install --user --upgrade pip
9
+ RUN python -m pip --no-cache-dir install --user -e .[tests,docs]
10
+
11
+ CMD ["/bin/bash"]
package/Dockerfile.py2 ADDED
@@ -0,0 +1,11 @@
1
+ FROM python:2.7.18-buster AS inspire-schemas-py2-tests
2
+
3
+ ARG APP_HOME=/code
4
+ WORKDIR ${APP_HOME}
5
+
6
+ COPY . .
7
+
8
+ RUN python -m pip install --user --upgrade pip
9
+ RUN python -m pip --no-cache-dir install --user -e .[tests,docs]
10
+
11
+ CMD ["/bin/bash"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inspire-schemas",
3
- "version": "61.6.13",
3
+ "version": "61.6.16",
4
4
  "description": "Inspire schemas.",
5
5
  "main": "js/build/index.js",
6
6
  "module": "js/build/index.es.js",
package/ruff.toml CHANGED
@@ -20,7 +20,7 @@ select = [
20
20
  # flake8-pytest-style
21
21
  "PT",
22
22
  ]
23
- ignore = ["B904"]
23
+ ignore = ["B904","SIM105"]
24
24
 
25
25
 
26
26
  [lint.pycodestyle]
@@ -1,50 +0,0 @@
1
- name: test (python 2.7)
2
-
3
- on:
4
- push:
5
- branches: [master]
6
- pull_request:
7
- branches: [master]
8
-
9
- jobs:
10
- test:
11
- runs-on: ubuntu-22.04
12
- strategy:
13
- matrix:
14
- include:
15
- - python: python2
16
- pip: pip
17
- steps:
18
- - name: Checkout
19
- uses: actions/checkout@v4
20
- with:
21
- fetch-depth: 0
22
-
23
- - name: Install dependencies
24
- run: sudo apt-get update -y && sudo apt-get install -y python2
25
-
26
- - name: Install npm dependencies
27
- run: |
28
- npm install buffer-shims
29
- npm install --global rollup
30
-
31
- - name: Install python dependencies
32
- run: |
33
- wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
34
- ${{ matrix.python }} get-pip.py
35
- ${{ matrix.python }} -m ${{ matrix.pip }} install --user --upgrade pip
36
- ${{ matrix.python }} -m ${{ matrix.pip }} --no-cache-dir install --user -e .[tests,docs]
37
-
38
- - name: Show python dependencies
39
- run: |
40
- ${{matrix.pip}} --version
41
- ${{ matrix.python }} --version
42
- ${{ matrix.pip }} freeze
43
-
44
- - name: Build Test
45
- run: |
46
- ./tests/integration/test_setup.sh ${{ matrix.python }}
47
-
48
- - name: Run tests
49
- run: |
50
- ./run-tests.sh