👨💼 Bu yapılandırma dosyası sayesinde test işlemleri ve diğer paket hizmetleri yönetilir
👨🔧 src/ypackage kısmına kendi paketinizin adını yazın
[flake8]
max-line-length = 99
exclude = */migrations/*
[options]
# tests_require is a list of dependencies that are *absolutely required*
# to run the tests. tests_require is used when running tests from your
# *current* Python environment (that is, not using tox).
# tests_require is ignored by tox.
#
# As such, you can usually get away with neglecting tests_require ---
# it's not a big deal if some of the dependencies get left out.
#
# If you're running tests from your current environment, it's because
# you're actively developing, in which case you usually have an
# environment you built for development. But if you have to change
# environments mid-development for any reason, tests_require can save you
# from getting tripped up.
#
# tests_require is used when running tests and debugging through an IDE like
# PyCharm, to ensure the environment the IDE is using has the requirements.
#
# Unless you're in one of those situations, you can simply ignore this.
tests_require = pytest
[aliases]
# Alias `setup.py test` to `setup.py pytest`
test = pytest
[tool:pytest]
# If a pytest section is found in one of the possible config files
# (pytest.ini, tox.ini or setup.cfg), then pytest will not look for any others,
# so if you add a pytest config section elsewhere,
# you will need to delete this section from setup.cfg.
norecursedirs =
.git
.tox
.env
venv
dist
build
migrations
python_files =
test_*.py
*_test.py
tests.py
addopts =
-ra
--strict
--ignore=docs/conf.py
--ignore=setup.py
--ignore=ci
--ignore=.eggs
--doctest-modules
--doctest-glob=\*.md
--tb=short
--pyargs
# The order of these options matters. testpaths comes after addopts so that
# nameless in testpaths is interpreted as
# --pyargs nameless.
# Any tests in the src/ directory (that is, tests installed with the package)
# can be run by any user with pytest --pyargs nameless.
# Packages that are sensitive to the host machine, most famously NumPy,
# include tests with the installed package so that any user can check
# at any time that everything is working properly.
# If you do choose to make installable tests, this will run the installed
# tests as they are actually installed (same principle as when we ensure that
# we always test the installed version of the package).
# If you have no need for this (and your src/ directory is very large),
# you can save a few milliseconds on testing by telling pytest not to search
# the src/ directory by removing
# --pyargs and nameless from the options here.
testpaths =
src/ypackage
tests/
🏹 __init__ ile modülleri dışa aktarma
⤴️ Dosyanın amacı içerisindeki her paketleri dışarı aktarmaktır
💁♂️ Dosyanın içi boş olursa, tüm dizini ele alır
from . import filesystem
from . import common
from . import gitbook
from . import markdown
📢 Bu dosya olmazsa diğer paketleri pip aracı algılayamaz
📑 Manifest Dosyası
🕵️♂️ Manifest dosyası ile paket içerisindeki dosyaların projeye dahil olması sağlanır
📌 Bu dosya proje dizininde bulunmalıdır
➕ include komutu ile harici dosyalar dahil edilir
🗃️ recursive-include komutu ile dizin ve içerisindeki tüm dosyalar dahil edilir
MANIFEST.in
include LICENSE
include README.md # docs/README.md
# recursive-include src/ypackage/templates *
⚗️ Paketi Test Etme
👨🔬 Paket kurulumunu pip install -e . komutu ile yerel olarak yapabilirsin.
💁♂️ Kaynak kodunu değiştirmeye ve istenildiği zaman yeniden test edilmeye olanak sağlar
🧙♂ Detaylı bilgi için Good Integration Practice - Install Package With Pip alanına bakabilirsin.
📡 GitHub'da Yayınlama
GitHub üzeinden repository oluşturun ve projenizi oraya upload edin.
GitHub hakkında detaylar için arama sitemin arama motoruna GitHub yazabilirsiniz
GitHub projenizin urline girin
Release alanına tıklayın
Daha önceden varsa Edit yoksa Create butonuna tıklayın ve yeni bir sürüm oluşturun
Tags alanına setup.py dosyamızdaki VERSION değerini yazın
Download url kısmındaki ...{VERSION}.tar.gz' yapısından dolayı
Örn: 1.0.0
Açıklamalarınızı yapıp Update Release butonuna basın
Ek olarak dosya eklemenize gerek yoktur
🛰️ Projeyi PyPI'da Yayınlama
📦 Gerekli Paketlerin Kurulumu
Bu işlemleri için python ve pip araçlarının kurulu olması lazımdır.