Skip to content

Commit 9bd276d

Browse files
committed
update with successful run of nbdev_pypi
the twine install seems pretty important, though it's not clear exactly what enabled the push. in any case, this commit contains what was successfully pushed via nbdev_pypi when the previous push failed with ``` WARNING Error during upload. Retry with the --verbose option for more details. ERROR HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/ The description failed to render in the default format of reStructuredText. ``` you can debug this using ``` $ twine check dist/* Checking dist/python_schematized_config-0.0.1-py3-none-any.whl: FAILED ERROR `long_description` has syntax errors in markup and would not be rendered on PyPI. line 20: Warning: Title underline too short. python schematized config ================ WARNING `long_description_content_type` missing. defaulting to `text/x-rst`. Checking dist/python-schematized-config-0.0.1.tar.gz: FAILED ERROR `long_description` has syntax errors in markup and would not be rendered on PyPI. line 20: Warning: Title underline too short. python schematized config ================ WARNING `long_description_content_type` missing. defaulting to `text/x-rst`. ``` although setup.py, being auto-generated, correctly sets the markdown type
1 parent 66550eb commit 9bd276d

7 files changed

Lines changed: 179 additions & 13 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
python schematized config
1+
schematized config
22
================
33

44
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

flake.lock

Lines changed: 78 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
nixConfig.bash-prompt = ''\033[1;32m\[[nix-develop:\[\033[36m\]\w\[\033[32m\]]$\033[0m '';
3+
4+
inputs = {
5+
nixpkgs.url = "github:nixos/nixpkgs/23.05-pre";
6+
whacked-setup = {
7+
url = "github:whacked/setup/58bdbff2eec48980b010048032382bed3a152e7e";
8+
flake = false;
9+
};
10+
};
11+
outputs = { self, nixpkgs, flake-utils, whacked-setup }:
12+
flake-utils.lib.eachDefaultSystem
13+
(system:
14+
let
15+
pkgs = nixpkgs.legacyPackages.${system};
16+
whacked-helpers = import (whacked-setup + /nix/flake-helpers.nix) { inherit pkgs; };
17+
in {
18+
devShell = whacked-helpers.mkShell {
19+
flakeFile = __curPos.file; # used to forward current file to echo-shortcuts
20+
includeScripts = [
21+
# e.g. for node shortcuts
22+
# (whacked-setup + /bash/node_shortcuts.sh)
23+
];
24+
} {
25+
buildInputs = [
26+
pkgs.python3
27+
];
28+
29+
shellHook = (
30+
if pkgs.stdenv.isDarwin then ''
31+
### PREFLIGHT
32+
if ! command -v quarto &> /dev/null; then
33+
pastel paint red "program 'quarto' not found in the path. nbdev requires it to work"
34+
echo -n "you can obtain it manually from "
35+
pastel paint yellow https://quarto.org/docs/get-started
36+
exit
37+
fi
38+
'' else ''
39+
'') + ''
40+
### SETUP
41+
export VIRTUAL_ENV=''${VIRTUAL_ENV-$PWD/venv}
42+
# FIX for ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory
43+
# but note that gcc may be a costly import
44+
export LD_LIBRARY_PATH=${pkgs.gcc-unwrapped.lib}/lib:$LD_LIBRARY_PATH
45+
export JUPYTER_CONFIG_DIR=''${JUPYTER_CONFIG_DIR-$PWD/.jupyter}
46+
if [ ! -e $JUPYTER_CONFIG_DIR ]; then
47+
mkdir $JUPYTER_CONFIG_DIR
48+
fi
49+
setup-venv() { # install all expected virutalenv packages
50+
# see note at https://stackoverflow.com/a/65599505
51+
# on nb extensions (in)compatibility.
52+
# below versions are from trial and error
53+
pip install \
54+
twine==4.0.2 \
55+
notebook==6.2.0 \
56+
jupyter_server==2.3.0 \
57+
jupyter_core==5.2.0 \
58+
nbconvert==7.2.9 \
59+
nbformat==5.7.3 \
60+
nbdev==2.3.12 \
61+
jupytext==1.14.5 \
62+
jupyter_contrib_nbextensions==0.5.1 \
63+
jupyter_nbextensions_configurator
64+
jupyter contrib nbextension install --user
65+
ENABLE_BUNDLED_EXTENSIONS=(
66+
code_prettify/autopep8
67+
codefolding/main
68+
collapsible_headings/main
69+
contrib_nbextensions_help_item/main
70+
datestamper/main
71+
execute_time/ExecuteTime
72+
freeze/main
73+
scratchpad/main
74+
toc2/main
75+
toggle_all_line_numbers/main
76+
varInspector/main
77+
);
78+
}
79+
ensure-venv setup-venv
80+
'' + ''
81+
### SHORTCUTS
82+
alias check='python -m schematized_config'
83+
''; # join strings with +
84+
};
85+
86+
packages = {
87+
default = pkgs.stdenv.mkDerivation {
88+
name = "schematized-config";
89+
src = ./.;
90+
};
91+
};
92+
}
93+
);
94+
}

nbs/index.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"cell_type": "markdown",
1515
"metadata": {},
1616
"source": [
17-
"# python schematized config\n",
17+
"# schematized config\n",
1818
"\n",
1919
"> validate configs using json schema"
2020
]

nbs/nbdev.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ project:
33

44
website:
55
title: "python-schematized-config"
6-
site-url: "https://aistriketeam
7-
8-
requirements = jsonschema>=4.17.3 python-dotenv>=1.0.0.github.io/python-schematized-config"
6+
site-url: "https://aistriketeam.github.io/python-schematized-config"
97
description: "validate configs using json schema"
108
repo-branch: main
11-
repo-url: "https://github.com/aistriketeam
12-
13-
requirements = jsonschema>=4.17.3 python-dotenv>=1.0.0/python-schematized-config"
9+
repo-url: "https://github.com/aistriketeam/python-schematized-config"

schematized_config/_modidx.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
d = { 'settings': { 'branch': 'main',
44
'doc_baseurl': '/python-schematized-config',
5-
'doc_host': 'https://aistriketeam\n\nrequirements = jsonschema>=4.17.3 python-dotenv>=1.0.0.github.io',
6-
'git_url': 'https://github.com/aistriketeam\n'
7-
'\n'
8-
'requirements = jsonschema>=4.17.3 python-dotenv>=1.0.0/python-schematized-config',
5+
'doc_host': 'https://aistriketeam.github.io',
6+
'git_url': 'https://github.com/aistriketeam/python-schematized-config',
97
'lib_path': 'schematized_config'},
108
'syms': { 'schematized_config.cli': { 'schematized_config.cli.generate_sample_dotenv': ( 'cli.html#generate_sample_dotenv',
119
'schematized_config/cli.py'),

settings.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ status = 3
3838
user = aistriketeam
3939

4040
### Optional ###
41-
requirements = jsonschema>=4.17.3 python-dotenv>=1.0.0
41+
requirements = jsonschema>=4.17.3 python-dotenv>=1.0.0
4242
# dev_requirements =
4343
# console_scripts =

0 commit comments

Comments
 (0)