Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove explicit declare of package-data #4018

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
e840571
remove package-data section
DanielYang59 Aug 26, 2024
43fe42d
WIP: fix some reason files listed in exclude-package-data is still in…
DanielYang59 Aug 26, 2024
06f9836
Merge branch 'master' into package-data
DanielYang59 Aug 28, 2024
e868a89
Merge branch 'master' into package-data
DanielYang59 Aug 30, 2024
b68f5af
Merge branch 'master' into package-data
DanielYang59 Aug 30, 2024
694ccc6
Merge branch 'master' into package-data
DanielYang59 Sep 2, 2024
68f4960
Merge branch 'master' into package-data
DanielYang59 Sep 6, 2024
634e7c8
Merge branch 'master' into package-data
DanielYang59 Sep 7, 2024
967952c
update omitted files for coverage
DanielYang59 Sep 7, 2024
c8a3a50
include everything for now
DanielYang59 Sep 7, 2024
5414ca5
Merge branch 'master' into package-data
DanielYang59 Sep 8, 2024
fca74fe
Merge branch 'master' into package-data
DanielYang59 Sep 9, 2024
6faac54
Merge branch 'master' into package-data
DanielYang59 Sep 11, 2024
2f36ad0
Merge branch 'master' into package-data
DanielYang59 Sep 18, 2024
605df2c
experimented with setuptools-scm, but no luck to exclude file
DanielYang59 Sep 18, 2024
47025a6
maybe give setuptools-scm a chance, need really careful check of pack…
DanielYang59 Sep 18, 2024
49905f2
fix py.typed placement
DanielYang59 Sep 19, 2024
08bf67d
Merge branch 'master' into package-data
DanielYang59 Sep 26, 2024
f142b94
Merge branch 'master' into package-data
DanielYang59 Oct 13, 2024
73aa493
Merge branch 'master' into package-data
DanielYang59 Oct 15, 2024
1cd423a
Merge branch 'master' into package-data
DanielYang59 Oct 21, 2024
b2eda5b
Merge branch 'master' into package-data
shyuep Oct 21, 2024
bac2e8a
Merge branch 'master' into package-data
DanielYang59 Nov 13, 2024
6c4b781
Merge branch 'master' into package-data
DanielYang59 Nov 14, 2024
8f1bcc4
encourage google style docstring
DanielYang59 Nov 14, 2024
b4388a8
fix internal index
DanielYang59 Nov 14, 2024
2c50c00
TEST, test install from sdist
DanielYang59 Nov 14, 2024
b1ef965
Revert "TEST, test install from sdist"
DanielYang59 Nov 14, 2024
8482fff
revert contributing change
DanielYang59 Nov 15, 2024
3a1877b
change default to False
DanielYang59 Nov 15, 2024
04b8f3b
Revert "change default to False"
DanielYang59 Nov 15, 2024
aa0e4dd
Merge branch 'master' into package-data
DanielYang59 Nov 16, 2024
cf3108d
Merge branch 'master' into package-data
DanielYang59 Nov 25, 2024
7a2db54
unskip test_pkg
DanielYang59 Nov 25, 2024
fb84435
refactor test_pkg
DanielYang59 Nov 25, 2024
8ed49b2
add test_source_distribution
DanielYang59 Nov 25, 2024
de0da3f
remove bdist build
DanielYang59 Nov 25, 2024
7b48912
fix failure in Windows and avoid hard-coded slash
DanielYang59 Nov 25, 2024
3b3b040
rename src_dir to avoid confusion
DanielYang59 Nov 25, 2024
9909527
simplify file reading for Path obj
DanielYang59 Nov 25, 2024
4bdb549
avoid checking SOURCES.txt in sdist
DanielYang59 Nov 25, 2024
8f291d8
also check typed file
DanielYang59 Nov 25, 2024
937e547
temp save
DanielYang59 Nov 25, 2024
75c9917
revert py.typed change
DanielYang59 Nov 26, 2024
560565b
Merge branch 'master' into package-data
DanielYang59 Dec 11, 2024
31dc284
Merge branch 'master' into package-data
DanielYang59 Jan 10, 2025
d6b8e67
Merge branch 'master' into package-data
DanielYang59 Jan 18, 2025
159c5c6
Merge branch 'master' into package-data
DanielYang59 Jan 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Exclude entire directories
prune .github/
prune dev_scripts/
prune docs/
prune examples/
prune tests/

# Exclude individual files
exclude .* \
Copy link
Contributor Author

@DanielYang59 DanielYang59 Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather accidentally include some useless files than missing some necessary ones, so I should be really careful using wildcard for exclusion.

Is there any hidden file needed (at least no from current distributions)?

ADMIN.md CONTRIBUTING.md SECURITY.md \
CITATION.cff pdm.lock tasks.py
28 changes: 1 addition & 27 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ requires = [
# https://numpy.org/devdocs/dev/depending_on_numpy.html#build-time-dependency
"numpy>=2.1.0",
"setuptools>=65.0.0",
"setuptools-scm>=8", # include all Git tracked files as package data file
]
build-backend = "setuptools.build_meta"

Expand Down Expand Up @@ -121,37 +122,10 @@ feff_plot_cross_section = "pymatgen.cli.feff_plot_cross_section:main"
feff_plot_dos = "pymatgen.cli.feff_plot_dos:main"
get_environment = "pymatgen.cli.get_environment:main"

[tool.setuptools]
include-package-data = false

[tool.setuptools.packages.find]
where = ["src"]
include = ["pymatgen", "pymatgen.*"]

[tool.setuptools.package-data]
"pymatgen.analysis" = ["*.csv", "*.json", "*.yaml"]
"pymatgen.analysis.chemenv" = [
"coordination_environments/coordination_geometries_files/*.json",
"coordination_environments/coordination_geometries_files/*.txt",
"coordination_environments/strategy_files/ImprovedConfidenceCutoffDefaultParameters.json",
]
"pymatgen.analysis.structure_prediction" = ["*.yaml", "data/*.json"]
"pymatgen.analysis.diffraction" = ["*.json"]
"pymatgen.analysis.magnetism" = ["default_magmoms.yaml"]
"pymatgen.analysis.solar" = ["am1.5G.dat"]
"pymatgen.entries" = ["*.json.gz", "*.yaml", "data/*.json"]
"pymatgen.core" = ["*.json"]
"pymatgen" = ["py.typed"]
"pymatgen.io.vasp" = ["*.json", "*.json.bz2", "*.json.gz", "*.yaml"]
"pymatgen.io.feff" = ["*.yaml"]
"pymatgen.io.cp2k" = ["*.yaml"]
"pymatgen.io.lobster" = ["lobster_basis/*.yaml"]
"pymatgen.command_line" = ["*"]
"pymatgen.util" = ["*.json", "structures/*.json"]
"pymatgen.vis" = ["*.yaml"]
"pymatgen.io.lammps" = ["CoeffsDataType.yaml", "templates/*.template"]
"pymatgen.symmetry" = ["*.json", "*.sqlite", "*.yaml"]

[tool.pdm.dev-dependencies]
lint = ["mypy>=1.10.0", "pre-commit>=3.7.1", "ruff>=0.4.9"]
test = ["pytest-cov>=5.0.0", "pytest-split>=0.9.0", "pytest>=8.2.2"]
Expand Down
Loading