Compare commits

..

20 Commits

Author SHA1 Message Date
6ac1015718 initial build/test steps for nodejs 2024-02-20 22:08:07 -07:00
f20c2b24f0 3.9.1 2024-02-20 21:48:35 -07:00
113445ca43 npm package for scwrypts 2024-02-20 21:48:30 -07:00
bdb7851064 circleci configuration for python builds 2024-02-19 18:33:59 -07:00
cdb30f2dc0 hokay first iteration of python-dudes is ready 2024-02-19 18:25:34 -07:00
fb8bfa6a9c mergedeep to slow so I made my options dict shallow 2024-02-18 02:46:29 -07:00
79adf18d9a fix bug with virtualenv loading 2024-02-18 02:35:10 -07:00
7ce71dfca8 verbosity is stupid lets call it log-level 2024-02-18 02:34:43 -07:00
3bcd4f3f6d refactor py/lib into python-scwrypts subproject 2024-02-18 02:31:13 -07:00
d4ef1c70e0 plugins/ci migration from v3 to v4 2024-02-12 23:45:37 -07:00
c9e107d2fd plugins/kubectl migration from v3 to v4 2024-02-12 23:45:05 -07:00
b6b4f2e5b8 FZF_(HEAD|TAIL) refactor to FZF_USER_INPUT 2024-02-12 23:44:43 -07:00
432593a0f3 update ZLE plugin so it no more make errors 2024-02-12 23:43:28 -07:00
6629caf459 FINALLY fix the weird cases for zsh/read builtin (particularly around reading one character from tty/pipe/file); also gave a --force-user-input flag in case you want to require user input on a yn prompt 2024-02-12 23:42:55 -07:00
8bcc99b898 improved i/o handling on the run executable means this is no longer relevant 2024-02-12 23:41:42 -07:00
05694ed022 bring some much-needed tender love and care to the scwrypts runner 2024-02-12 23:39:56 -07:00
67bd712590 v3-to-v4 upgrade docs 2024-02-12 23:39:00 -07:00
a90482de8c swap INFO for DEBUG 2024-02-07 15:16:51 -07:00
261bbee1a4 introduce --verbosity flag rather than mixed logging settings; correct color misnaming to ANSI convention; added sanity-check; simplified hello-world; created FZF_USER_INPUT to replace the confusing FZF_HEAD and FZF_TAIL 2024-02-07 15:14:36 -07:00
fcf492c661 basic runner format; write a MAIN function 2024-02-06 14:06:44 -07:00
6 changed files with 30 additions and 82 deletions

View File

@ -13,40 +13,32 @@ executors:
nodejs: nodejs:
docker: docker:
- image: node:18 - image: node:18
resource_class: medium resource_class: small
jobs: jobs:
python-test: python-test:
executor: python executor: python
working_directory: ~/scwrypts/py/lib working_directory: ./py/lib
steps: steps:
- checkout: - run: |
path: ~/scwrypts
- run:
name: pytest
command: |
: \ : \
&& pip install . .[test] \ && pip install -e . \
&& pytest \ && pytest \
; ;
- run: pip install build && python -m build
python-publish: python-publish:
executor: python executor: python
working_directory: ~/scwrypts/py/lib
steps: steps:
- checkout: - checkout
path: ~/scwrypts - python/dist
- run: pip install build && python -m build
- run: pip install twine && twine upload dist/* - run: pip install twine && twine upload dist/*
nodejs-test: nodesjs-test:
executor: nodejs executor: nodejs
working_directory: ~/scwrypts/zx/lib working_directory: ./zx/lib
steps: steps:
- checkout: - checkout
path: ~/scwrypts
- restore_cache: - restore_cache:
name: restore pnpm cache name: restore pnpm cache
@ -69,14 +61,12 @@ jobs:
- run: pnpm test - run: pnpm test
- run: pnpm lint - run: pnpm lint
- run: pnpm build
nodejs-publish: nodesjs-publish:
executor: nodejs executor: nodejs
working_directory: ~/scwrypts/zx/lib working_directory: ./zx/lib
steps: steps:
- checkout: - checkout
path: ~/scwrypts
- restore_cache: - restore_cache:
name: restore pnpm cache name: restore pnpm cache
@ -97,62 +87,23 @@ jobs:
paths: paths:
- .pnpm-store - .pnpm-store
- run: - run: pnpm build
name: publish - run: pnpm version $(git describe --tags)
command: |
: \
&& [ $CIRCLE_TAG ] \
&& pnpm build \
&& pnpm version $CIRCLE_TAG \
&& pnpm set //registry.npmjs.org/:_authToken=$NPM_TOKEN \
&& pnpm publish --no-git-checks \
;
workflows: workflows:
python-dev: build:
jobs: jobs:
- python-test: - python-test
filters:
branches:
ignore: /^main$/
python:
jobs:
- python-test:
filters:
tags:
only: /^v\d+\.\d+\.\d+.*$/
branches:
ignore: /^.*$/
- python-publish: - python-publish:
requires: [python-test] requires: [python-test]
context: [pypi-yage]
filters: filters:
tags:
only: /^v\d+\.\d+\.\d+.*$/
branches: branches:
ignore: /^.*$/ only: main
nodejs-dev: - nodejs-test
jobs:
- nodejs-test:
filters:
branches:
ignore: /^main$/
nodejs:
jobs:
- nodejs-test:
filters:
tags:
only: /^v\d+\.\d+\.\d+.*$/
branches:
ignore: /^.*$/
- nodejs-publish: - nodejs-publish:
requires: [nodejs-test] requires: [nodejs-test]
context: [npm-wrynegade]
filters: filters:
tags:
only: /^v\d+\.\d+\.\d+.*$/
branches: branches:
ignore: /^.*$/ only: main

3
py/lib/.gitignore vendored
View File

@ -1,4 +1 @@
dist/ dist/
__pycache__/
*.py[cod]
*.so

View File

@ -55,5 +55,6 @@ source = 'versioningit'
[tool.hatch.build.targets.wheel] [tool.hatch.build.targets.wheel]
packages = ['./'] packages = ['./']
[tool.versioningit.vcs] [tool.versioningit]
match = ['v[0-9]*.[0-9]*.[0-9]*'] match = ['v*']

View File

@ -26,7 +26,6 @@
"prettier": "^3.2.5", "prettier": "^3.2.5",
"ts-jest": "^29.1.2", "ts-jest": "^29.1.2",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"typescript": "^5.3.3",
"uuid": "^9.0.1" "uuid": "^9.0.1"
}, },
"eslintConfig": { "eslintConfig": {

3
zx/lib/pnpm-lock.yaml generated
View File

@ -43,9 +43,6 @@ devDependencies:
ts-node: ts-node:
specifier: ^10.9.2 specifier: ^10.9.2
version: 10.9.2(@types/node@20.11.19)(typescript@5.3.3) version: 10.9.2(@types/node@20.11.19)(typescript@5.3.3)
typescript:
specifier: ^5.3.3
version: 5.3.3
uuid: uuid:
specifier: ^9.0.1 specifier: ^9.0.1
version: 9.0.1 version: 9.0.1

View File

@ -64,9 +64,11 @@ afterEach(() => {
}); });
describe('exact lookup', () => { describe('exact lookup', () => {
let output;
beforeEach(async () => { beforeEach(async () => {
sample.spy.getScwryptsLookup.mockReturnValue(sample.lookup.exact); sample.spy.getScwryptsLookup.mockReturnValue(sample.lookup.exact);
await scwrypts(sample.options);
output = await scwrypts(sample.options);
}); });
test('gets the correct lookup', () => { test('gets the correct lookup', () => {
@ -96,6 +98,7 @@ describe('exact lookup', () => {
describe('patterns lookup', () => { describe('patterns lookup', () => {
beforeEach(async () => { beforeEach(async () => {
sample.spy.getScwryptsLookup.mockReturnValue(sample.lookup.patterns); sample.spy.getScwryptsLookup.mockReturnValue(sample.lookup.patterns);
await scwrypts(sample.options); await scwrypts(sample.options);
}); });