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

change names #19

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Stinx is a sibling repository of the DFT code [Sphinx](https://sxrepo.mpie.de).
Stinx's input parser is created from the yaml-file located at `src/input_data.yml`. The input file is generated by `src/generator.py`. You can use the parser via:

```python
from stinx.input import sphinx
from sphinx_parser.input import sphinx
```

This instance `sphinx` is used to create all possible input classes for Sphinx by choosing the class via dot-notation and call `create`. For example in order to generate the class `kPoints`, you can run:
Expand All @@ -27,7 +27,7 @@ basis = sphinx.basis.create(kPoints=kPoints)
Finally, you can translate it into the Sphinx format via:

```python
from stinx.toolkit import to_sphinx
from sphinx_parser.toolkit import to_sphinx

sphinx_input = to_sphinx(basis)
```
Expand Down
16 changes: 8 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
master_doc = 'index'

# General information about the project.
project = u'stinx'
project = u'sphinx_parser'
copyright = u'2024, Max-Planck-Institut für Nachhaltige Materialien GmbH - Computational Materials Design (CM) Department ' \
u'All rights reserved'

Expand Down Expand Up @@ -244,7 +244,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'stinx.tex', u'stinx Documentation',
('index', 'sphinx_parser.tex', u'sphinx_parser Documentation',
u'Max-Planck-Institut für Nachhaltige Materialien GmbH - Computational Materials Design (CM) Department', 'manual'),
]

Expand Down Expand Up @@ -275,8 +275,8 @@
# (source start file, name, description, authors, manual section).
man_pages = [
('index',
'stinx',
u'stinx Documentation',
'sphinx_parser',
u'sphinx_parser Documentation',
[u'Max-Planck-Institut für Nachhaltige Materialien GmbH - Computational Materials Design (CM) Department'], 1)
]

Expand All @@ -291,10 +291,10 @@
# dir menu entry, description, category)
texinfo_documents = [
('index',
'stinx',
u'stinx Documentation',
'sphinx_parser',
u'sphinx_parser Documentation',
u'Max-Planck-Institut für Nachhaltige Materialien GmbH - Computational Materials Design (CM) Department',
'stinx',
'sphinx_parser',
'One line description of project.',
'Miscellaneous'),
]
Expand All @@ -311,7 +311,7 @@
# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False

main(['-e', '-o', 'apidoc', '../stinx', '--force'])
main(['-e', '-o', 'apidoc', '../sphinx_parser', '--force'])

curdir = os.path.dirname(os.path.abspath(__file__))
if os.path.exists(os.path.join(curdir, 'source/notebooks')):
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. stinx documentation master file
.. sphinx_parser documentation master file

.. _index:

Expand All @@ -9,4 +9,4 @@
:hidden:

source/examples.rst
source/indices.rst
source/indices.rst
4 changes: 2 additions & 2 deletions notebooks/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"metadata": {},
"outputs": [],
"source": [
"import stinx\n",
"print(stinx.__version__)"
"import sphinx_parser\n",
"print(sphinx_parser.__version__)"
]
}
],
Expand Down
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ requires = [
build-backend = "setuptools.build_meta"

[project]
name = "stinx"
description = "stinx - Your pyiron-like module."
name = "sphinx_parser"
description = "sphinx_parser - Your pyiron-like module."
readme = "docs/README.md"
keywords = [ "pyiron",]
requires-python = ">=3.9, <3.13"
Expand All @@ -34,18 +34,18 @@ file = "LICENSE"

[project.urls]
Homepage = "https://pyiron.org/"
Documentation = "https://stinx.readthedocs.io"
Repository = "https://github.com/pyiron/stinx"
Documentation = "https://sphinx_parser.readthedocs.io"
Repository = "https://github.com/pyiron/sphinx_parser"

[tool.versioneer]
VCS = "git"
style = "pep440-pre"
versionfile_source = "stinx/_version.py"
parentdir_prefix = "stinx"
tag_prefix = "stinx-"
versionfile_source = "sphinx_parser/_version.py"
parentdir_prefix = "sphinx_parser"
tag_prefix = "sphinx_parser-"

[tool.setuptools.packages.find]
include = [ "stinx*",]
include = [ "sphinx_parser*",]

[tool.setuptools.dynamic.version]
attr = "stinx.__version__"
attr = "sphinx_parser.__version__"
File renamed without changes.
6 changes: 3 additions & 3 deletions stinx/_version.py → sphinx_parser/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ def get_config() -> VersioneerConfig:
cfg = VersioneerConfig()
cfg.VCS = "git"
cfg.style = "pep440-pre"
cfg.tag_prefix = "stinx-"
cfg.parentdir_prefix = "stinx"
cfg.versionfile_source = "stinx/_version.py"
cfg.tag_prefix = "sphinx_parser-"
cfg.parentdir_prefix = "sphinx_parser"
cfg.versionfile_source = "sphinx_parser/_version.py"
cfg.verbose = False
return cfg

Expand Down
2 changes: 1 addition & 1 deletion stinx/ase.py → sphinx_parser/ase.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
import scipy.constants as sc
from stinx.input import sphinx
from sphinx_parser.input import sphinx
from ase.io.vasp import _handle_ase_constraints


Expand Down
2 changes: 1 addition & 1 deletion stinx/input.py → sphinx_parser/input.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
from typing import Optional
from stinx.toolkit import fill_values
from sphinx_parser.toolkit import fill_values


class sphinx:
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion stinx/src/generator.py → sphinx_parser/src/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def export_class(yml_file_name="input_data.yml", py_file_name="input.py"):
imports = [
"import numpy as np",
"from typing import Optional",
"from stinx.toolkit import fill_values",
"from sphinx_parser.toolkit import fill_values",
]
file_content = "\n".join(imports) + "\n\n\n" + file_content
file_content = format_str(file_content, mode=FileMode())
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/unit/test_ase.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
from ase.build import bulk
from stinx.ase import get_structure_group, id_ase_to_spx, id_spx_to_ase
from stinx.toolkit import to_sphinx
from sphinx_parser.ase import get_structure_group, id_ase_to_spx, id_spx_to_ase
from sphinx_parser.toolkit import to_sphinx
import re
from ase.constraints import FixedPlane

Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_generator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from stinx.src import generator
from sphinx_parser.src import generator
import yaml
import os

Expand All @@ -8,9 +8,9 @@ class TestStinx(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.current_dir = os.path.dirname(os.path.abspath(__file__)).replace("\\", "/")
cls.file_name = cls.current_dir + "/../../stinx/src/input_data.yml"
cls.file_name = cls.current_dir + "/../../sphinx_parser/src/input_data.yml"

def test_stinx(self):
def test_sphinx_parser(self):
with open(self.file_name, "r") as f:
file_content = f.read()
all_data = yaml.safe_load(file_content)
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_input.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
from stinx.input import sphinx
from stinx.toolkit import to_sphinx
from sphinx_parser.input import sphinx
from sphinx_parser.toolkit import to_sphinx


class TestStinx(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_output.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
import os
from stinx import output
from sphinx_parser import output
import numpy as np


Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_potential.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from stinx.potential import get_potential_path
from sphinx_parser.potential import get_potential_path
import os


Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_tests.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import unittest
import stinx
import sphinx_parser


class TestVersion(unittest.TestCase):
def test_version(self):
version = stinx.__version__
version = sphinx_parser.__version__
print(version)
self.assertTrue(version.startswith('0'))
Loading