A sample project for ORM
Project description
py-flat-orm
Table of Contents
Installation
pip install py-flat-orm
Get Started
This project is set up using hatch.
- Run
xi_init.ps1orxi_init.shto applypyproject.toml- run
exit(deactivate env) first if you getCannot remove active environment: py-flat-orm
- run
- to other
.ps1or.shfiles for relevant tasks x1means execution, and generally the 1st thing to run- run
hatch -h
Project Creation
Initialisation
- This project is generated using
hatch new py-flat-orm pyproject.tomlis then edited to include[tool.hatch.envs.py-flat-orm]etc.- script files e.g.
x*.ps1are added - set up with git
- Run e.g.
xi_init.ps1to applypyproject.toml
Sync Dependencies
- run
hatch shellto activate env, it also syncs dependencies
Tests Data
- use
./test_datadirectory put test data- test data cannot be put into
./tests, otherwise when runninghatch test, it treats them as tests to execute - you can pattern exclude these files but that requires more project config
- test data cannot be put into
Test in PyCharm
- mark
testsas Test Root, allows right-clicking directories inside to run tests - run tests from root, and save test config as a file e.g.
test.run.xml - IMPORTANT: unmark
testsas Test Root oncetest.run.xmlis generated- if
testsis marked as root, you CANNOT run a single test file, - because it treats
testsas root and can't find files withinsrc - you can verify this by putting
import sys; print(sys.path)at the top of a test file and run it
- if
Static Analysis
- add dependency
mypy - each package needs to add an empty
py.typedfile to make pycharm happy - so each package has
__init__.pyandpy.typed, seems pointless, just live with them
Publish
hatch buildhatch publish- ask chatGPT how to set up a PyPI Account
License
py-flat-orm is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py_flat_orm-0.2.0.tar.gz
(51.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_flat_orm-0.2.0.tar.gz.
File metadata
- Download URL: py_flat_orm-0.2.0.tar.gz
- Upload date:
- Size: 51.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e6807565d98d9be380479f07c2d27034b2139f5f4fdbb0574f4094b5632a6f7
|
|
| MD5 |
1046b983ac1426d0eed723f3e1a716f5
|
|
| BLAKE2b-256 |
8ea9f47c026a8b50a79db9d4e85d6835efd8208c0b3e161c041ff47cfdf2870b
|
File details
Details for the file py_flat_orm-0.2.0-py3-none-any.whl.
File metadata
- Download URL: py_flat_orm-0.2.0-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9412fdd6c09b01a6c566ba0038d35d9c538ed66b6d229d93801982e75c0a39b1
|
|
| MD5 |
c405ebd9d3f31ba3be79a7d27097c73b
|
|
| BLAKE2b-256 |
a9a03944c6254303c5ab05919b74dec028a0100e45943f3506c600c29ce0ea4c
|