@stdlib/datasets-fivethirtyeight-ffq-cli 0.1.0

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.
@@ -0,0 +1,165 @@
1
+ #/
2
+ # @license Apache-2.0
3
+ #
4
+ # Copyright (c) 2023 The Stdlib Authors.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #/
18
+
19
+ # Workflow name:
20
+ name: publish_cli
21
+
22
+ # Workflow triggers:
23
+ on:
24
+ # Allow the workflow to be manually run:
25
+ workflow_dispatch:
26
+ # Workflow inputs:
27
+ inputs:
28
+ version:
29
+ description: 'Version Increment'
30
+ type: choice
31
+ default: 'none'
32
+ options:
33
+ - 'none'
34
+ - 'major'
35
+ - 'minor'
36
+ - 'patch'
37
+ - 'premajor'
38
+ - 'preminor'
39
+ - 'prepatch'
40
+ - 'prerelease'
41
+
42
+ # Workflow jobs:
43
+ jobs:
44
+
45
+ # Define job to publish package to npm:
46
+ publish:
47
+
48
+ # Define display name:
49
+ name: 'Publish CLI package to npm'
50
+
51
+ # Define the type of virtual host machine on which to run the job:
52
+ runs-on: ubuntu-latest
53
+
54
+ # Define environment variables:
55
+ env:
56
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
57
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
58
+
59
+ # Define the sequence of job steps...
60
+ steps:
61
+
62
+ # Checkout cli branch:
63
+ - name: 'Checkout cli branch'
64
+ uses: actions/checkout@v3
65
+ with:
66
+ ref: cli
67
+
68
+ # Install Node.js:
69
+ - name: 'Install Node.js'
70
+ uses: actions/setup-node@v3
71
+ with:
72
+ node-version: 16
73
+ timeout-minutes: 5
74
+
75
+ # Configure git:
76
+ - name: 'Configure git'
77
+ run: |
78
+ git config --local user.email "noreply@stdlib.io"
79
+ git config --local user.name "stdlib-bot"
80
+
81
+ # Increment package version (if requested):
82
+ - name: 'Increment package version (if requested)'
83
+ if: ${{ github.event.inputs.version != 'none' }}
84
+ run: |
85
+ # Save NPM_TOKEN to user's .npmrc:
86
+ echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
87
+
88
+ # Increment package version:
89
+ npm version ${{ github.event.inputs.version }} --no-git-tag-version
90
+
91
+ # Define variable for new version:
92
+ NEW_VERSION=$(node -p "require('./package.json').version")
93
+
94
+ # Replace branch in README.md link definitions for badges with the new version:
95
+ find . -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/branch([=:])[^ ]+/branch\1v${NEW_VERSION}/g"
96
+
97
+ # Create a new commit and tag:
98
+ git add package.json README.md
99
+ git commit -m "Release v${NEW_VERSION}"
100
+ git tag -a "v${NEW_VERSION}-cli" -m "Release v${NEW_VERSION}"
101
+
102
+ # Push changes to GitHub:
103
+ SLUG=${{ github.repository }}
104
+ git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" --follow-tags
105
+
106
+ # Replace GitHub MathJax equations with SVGs:
107
+ - name: 'Replace GitHub MathJax equations with SVGs'
108
+ run: |
109
+ find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe 's/```math\n([\s\S]+?)\n```\n\n//g'
110
+ find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe 's/<!-- <div class="equation"(.*)(<\/div>\s*-->)/<div class="equation"$1<\/div>/sg'
111
+
112
+ # Replace GitHub links to individual packages with npm links:
113
+ - name: 'Replace all GitHub links to individual packages with npm links'
114
+ run: |
115
+ find . -type f -name '*.md' -print0 | xargs -0 sed -Ei '/tree\/main/b; s/@stdlib\/([^:]*)\]: https:\/\/github.com\/stdlib-js/@stdlib\/\1\]: https:\/\/www.npmjs.com\/package\/@stdlib/g'
116
+ SLUG=${{ github.repository }}
117
+ ESCAPED_SLUG=${SLUG//\//\\\/}
118
+ REPO=${SLUG#*/}
119
+ find . -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/https:\/\/github.com\/${ESCAPED_SLUG}\/tree\/main/https:\/\/www.npmjs.com\/package\/@stdlib\/${REPO}/g"
120
+
121
+ # Publish package to npm:
122
+ - name: 'Publish package to npm'
123
+ uses: JS-DevTools/npm-publish@v2
124
+ with:
125
+ token: ${{ secrets.NPM_TOKEN }}
126
+ access: public
127
+
128
+ # Discard any uncommitted changes:
129
+ - name: 'Discard any uncommitted changes'
130
+ run: |
131
+ git reset --hard
132
+
133
+ # Send status to Slack channel if job fails:
134
+ - name: 'Send status to Slack channel in case of failure'
135
+ uses: act10ns/slack@v2
136
+ with:
137
+ status: ${{ job.status }}
138
+ steps: ${{ toJson(steps) }}
139
+ channel: '#npm-ci'
140
+ if: failure()
141
+
142
+ # Define job to cancel any running or queued workflow runs...
143
+ cancel:
144
+
145
+ # Define the type of virtual host machine on which to run the job:
146
+ runs-on: ubuntu-latest
147
+
148
+ # Time out the job after 3 minutes:
149
+ timeout-minutes: 3
150
+
151
+ # Define the sequence of job steps...
152
+ steps:
153
+
154
+ # Cancel any running or queued workflow runs:
155
+ - name: 'Cancel running or queued workflow runs'
156
+ uses: styfle/cancel-workflow-action@0.11.0
157
+ with:
158
+ workflow_id: >-
159
+ benchmark.yml,
160
+ examples.yml,
161
+ test.yml,
162
+ test_coverage.yml,
163
+ test_install.yml,
164
+ publish.yml
165
+ access_token: ${{ github.token }}
package/CONTRIBUTORS ADDED
@@ -0,0 +1,39 @@
1
+ # This file is generated by tools/scripts/update_contributors.
2
+ #
3
+ # Contributors listed in alphabetical order.
4
+
5
+ Ali Salesi <ali_sal1381@yahoo.com>
6
+ Amit Jimiwal <amitjimiwal45@gmail.com>
7
+ Athan Reines <kgryte@gmail.com>
8
+ Brendan Graetz <bguiz@users.noreply.github.com>
9
+ Bruno Fenzl <brunofenzl@gmail.com>
10
+ Christopher Dambamuromo <chridam@gmail.com>
11
+ Dan Rose <danoftheroses@gmail.com>
12
+ Dominik Moritz <domoritz@gmail.com>
13
+ Dorrin Sotoudeh <dorrinsotoudeh123@gmail.com>
14
+ Frank Kovacs <fran70kk@gmail.com>
15
+ Harshita Kalani <harshitakalani02@gmail.com>
16
+ James Gelok <jdgelok@gmail.com>
17
+ Jithin KS <jithinks112@gmail.com>
18
+ Joey Reed <joeyrreed@gmail.com>
19
+ Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
20
+ Joris Labie <joris.labie1@gmail.com>
21
+ Justin Dennison <justin1dennison@gmail.com>
22
+ Marcus Fantham <mfantham@users.noreply.github.com>
23
+ Matt Cochrane <matthew.cochrane.eng@gmail.com>
24
+ Milan Raj <rajsite@users.noreply.github.com>
25
+ Momtchil Momtchev <momtchil@momtchev.com>
26
+ Naresh Jagadeesan <naresh.naresh000@gmail.com>
27
+ Nithin Katta <88046362+nithinkatta@users.noreply.github.com>
28
+ Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
29
+ Philipp Burckhardt <pburckhardt@outlook.com>
30
+ Pranav Goswami <goswami.4@iitj.ac.in>
31
+ Ricky Reusser <rsreusser@gmail.com>
32
+ Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
33
+ Ryan Seal <splrk@users.noreply.github.com>
34
+ Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
35
+ Shraddheya Shendre <shendreshraddheya@gmail.com>
36
+ Stephannie Jiménez Gacha <steff456@hotmail.com>
37
+ Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
38
+ orimiles5 <97595296+orimiles5@users.noreply.github.com>
39
+ rei2hu <reimu@reimu.ws>