profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/nandoflorestan/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Nando Florestan nandoflorestan Wrocław - Poland http://dev.nando.audio/ Nando develops in the programming languages Python, Javascript, F#... and a couple more, in the domains of web and audio/music.

nandoflorestan/kerno 50

Framework for a Python application service layer, approximating Uncle Bob Martin's Clean Architecture.

jackrosenthal/kajiki 34

Python XML-based template engine with Genshi-like syntax and Jinja-style blocks

nandoflorestan/bag 25

A Python library for several purposes

nandoflorestan/nine 25

Python 2 and 3 compatibility library, such that your code looks more like Python 3

nandoflorestan/deform_bootstrap_extra 4

OBSOLETE. Extra widgets and features for deform_bootstrap

nandoflorestan/mithril-widgets 3

Widgets for Mithril, using Bootstrap 4 and ECMAScript 6

chronossc/django-bootstrap-toolkit 2

Bootstrap support for Django projects

nandoflorestan/pluserable 2

Generic user registration for the Pyramid web framework

nandoflorestan/babel 1

The new official repository for Babel, the Python Internationalization Library

nandoflorestan/holiday 1

Project deprecated. Use the "workalendar" library instead

push eventnandoflorestan/pluserable

Nando Florestan

commit sha 7a4598bef2317188c3ddd45184172ad04f2c605c

Feature: email domains blacklist

view details

push time in 2 months

issue commentsamuelcolvin/pydantic

Context when validating data

I am validating the email address of a new user. Depending on the runtime environment (local, staging, production etc.) we have certain domains blacklisted. This is a job for a context object (the blocked domains are a configuration that depends on the environment). The validator function needs to be aware of the context.

I don't know how you're going to adapt the pydantic API to accomplish this -- just wanted to add an example of a common use case to this discussion. Similar to this use case, often my validators need access to my repository object in order to query the database -- yet another thing that a context variable in a validator function would solve.

The colander library solves this by allowing the user to bind a schema instance to certain variables at runtime, e. g.:

my_schema = SomeSchemaClass().bind(request=request, repository=repository)

...and then the validator function can do this:

def email_domain_allowed(node, value):
    request = node.bindings["request"]
    ...

So in Colander, the context bindings are a property of the node, rather than a 3rd argument to validator functions.

Maybe the above will help in some way... if not, sorry for the noise.

samuelcolvin

comment created time in 2 months

push eventnandoflorestan/kerno

Nando Florestan

commit sha abeb56890b6270eeeabad4afe0911fcecb273d83

I think mypy is senile or something

view details

push time in 2 months

issue commentaxe-me/vite-plugin-tailwind

Cannot read property 'theme' of undefined

Because I had no answer for 17 days I switched to WindiCSS.

nandoflorestan

comment created time in 2 months

issue closedaxe-me/vite-plugin-tailwind

Cannot read property 'theme' of undefined

I am getting the following error:

[vite] Internal server error: Cannot read property 'theme' of undefined
  Plugin: vite:css
  File: /home/nando/py/jobs/fairsplit/fair/fair/ui/src/App.module.css
      at _default (/home/nando/py/jobs/fairsplit/fair/fair/ui/node_modules/tailwindcss/lib/lib/substituteScreenAtRules.js:16:5)
      at /home/nando/py/jobs/fairsplit/fair/fair/ui/node_modules/@tailwindcss/jit/src/index.js:50:11
      at LazyResult.runOnRoot (/home/nando/py/jobs/fairsplit/fair/fair/ui/node_modules/postcss/lib/lazy-result.js:339:16)
      at LazyResult.runAsync (/home/nando/py/jobs/fairsplit/fair/fair/ui/node_modules/postcss/lib/lazy-result.js:391:26)
      at LazyResult.async (/home/nando/py/jobs/fairsplit/fair/fair/ui/node_modules/postcss/lib/lazy-result.js:221:30)
      at LazyResult.then (/home/nando/py/jobs/fairsplit/fair/fair/ui/node_modules/postcss/lib/lazy-result.js:206:17)

I could be wrong, but I believe the problem is, vite-plugin-tailwind should not be using the dependency https://github.com/tailwindlabs/tailwindcss-jit anymore -- if you visit that, you'll see a prominent notice:

As of Tailwind CSS v2.1 this project has been merged with the core Tailwind CSS repository and all future development will happen there.

So I could be wrong, but I think this plugin is currently broken.

I do have a tailwind.config.ts file at the root of my project which contains:

export default {
	mode: 'jit',
	purge: [],
	darkMode: false, // or 'media' or 'class'
	theme: {
	  extend: {},
	},
	variants: {},
	plugins: [],
}

Any help appreciated.

closed time in 2 months

nandoflorestan

startedmichaelhue/keyscss

started time in 3 months

push eventnandoflorestan/kerno

Nando Florestan

commit sha 05aa88b3eee4bab0a97b6aaf89be6b414ce8cc4b

Add raise_if_not_authenticated()

view details

push time in 3 months

issue commentGruntfuggly/triggertaskonsave

Does nothing for me -- but why?

Done. Thank you for the code and the support!

nandoflorestan

comment created time in 3 months

issue closedGruntfuggly/triggertaskonsave

Does nothing for me -- but why?

It does not run my build task. I don't know why. I can run the build task from the command pallette. Further, this plugin logs this when I change a .ts file:

5:55:24 PM Document /home/nando/py/jobs/fairsplit/fair/fair/ui/.vscode/tasks.json saved in workspace ui
5:55:24 PM {}

I think part of the problem is I cannot find a complete example of a tasks.json file with this. The documentation is too terse!

Here's my current file:

{
	// See https://go.microsoft.com/fwlink/?LinkId=733558
	// for the documentation about the tasks.json format
	"version": "2.0.0",
	"tasks": [
		{
			"label": "build",
			"type": "npm",
			"script": "build",
			"group": "build",
			"problemMatcher": [
				"$eslint-stylish"
			]
		}
	],
	"triggerTaskOnSave.tasks": {
		"build": [
			"src/*",
		],
	},
	"triggerTaskOnSave.showNotifications": true,
	"triggerTaskOnSave.on": true,
}

closed time in 3 months

nandoflorestan

PR opened Gruntfuggly/triggertaskonsave

Update README.md

Clarify the configuration detail that tripped me.

+5 -0

0 comment

1 changed file

pr created time in 3 months

push eventnandoflorestan/triggertaskonsave

Nando Florestan

commit sha 5389c0e9684180d6d7a5a3a4a3e88e4b00a71eda

Update README.md

view details

push time in 3 months

create barnchnandoflorestan/triggertaskonsave

branch : nando-doc

created branch time in 3 months

fork nandoflorestan/triggertaskonsave

A Visual Studio Code extension to trigger tasks when saving files

fork in 3 months

issue commentGruntfuggly/triggertaskonsave

Does nothing for me -- but why?

By the way, I must thank you profusely for your speedy reply. That was awesome!

nandoflorestan

comment created time in 3 months

issue commentGruntfuggly/triggertaskonsave

Does nothing for me -- but why?

Suggestion: Add that piece of information to the README.

Would you like a pull request?

nandoflorestan

comment created time in 3 months

issue commentGruntfuggly/triggertaskonsave

File changed

I am a different person from the original poster.

I saw you wrote "I can add a file watcher to the extension". I would be against that. I already have plenty of file watchers I can run. I don't want to run them, I don't want the performance impact. This plugin already does what I want: run a script when I save a file in my editor.

I meant an added file watcher might be a disservice to those like me.

I hope this is clearer...

llgcode

comment created time in 3 months

issue openedGruntfuggly/triggertaskonsave

Does nothing for me -- but why?

It does not run my build task. I don't know why. I can run the build task from the command pallette. Further, this plugin logs this when I change a .ts file:

5:55:24 PM Document /home/nando/py/jobs/fairsplit/fair/fair/ui/.vscode/tasks.json saved in workspace ui
5:55:24 PM {}

I think part of the problem is I cannot find a complete example of a tasks.json file with this. The documentation is too terse!

Here's my current file:

{
	// See https://go.microsoft.com/fwlink/?LinkId=733558
	// for the documentation about the tasks.json format
	"version": "2.0.0",
	"tasks": [
		{
			"label": "build",
			"type": "npm",
			"script": "build",
			"group": "build",
			"problemMatcher": [
				"$eslint-stylish"
			]
		}
	],
	"triggerTaskOnSave.tasks": {
		"build": [
			"src/*",
		],
	},
	"triggerTaskOnSave.showNotifications": true,
	"triggerTaskOnSave.on": true,
}

created time in 3 months

issue commentGruntfuggly/triggertaskonsave

File changed

FWIW the entire reason why I am trying out this extension is because I don't want to run a file watcher (such as Python's watchdog).

llgcode

comment created time in 3 months