Skip to content

Commit

Permalink
adapt to src move
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed May 7, 2024
1 parent 11ace57 commit 6b48a9b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 23 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ you created the branch, check the section on
:ref:`updating a PR <contributing_changes_update-pull-request>`.


From here, you now can move forward to
From here, you now can move forward to

- contribute to the documentation (see below)
- contribute to the :ref:`code base <contributing_code>`
Expand Down Expand Up @@ -267,7 +267,7 @@ Some other important things to know about the docs:
- The pyDataverse documentation consists of two parts:

- the docstrings in the code itself and
- the docs in the folder ``src/pyDataverse/doc/``
- the docs in the folder ``pyDataverse/doc/``

- The docstrings provide a clear explanation of the usage of the individual functions, while the documentation consists of tutorial-like overviews per topic together with some other information (what’s new, installation, this page you're viewing right now, etc).
- The docstrings follow the `Numpy Docstring Standard <https://numpydoc.readthedocs.io/en/latest/format.html>`_.
Expand Down Expand Up @@ -298,7 +298,7 @@ to ``upstream/develop``, so you have to branch-off from it too.
There is one exception: If you
want to suggest a change to the docs in the folder
``src/pyDataverse/docs/`` (e. g. fix a typo in
``pyDataverse/docs/`` (e. g. fix a typo in
:ref:`User Guide - Basic Usage <user_basic-usage>`),
you can also pull to ``upstream/master``. This means, you have also to
branch-off from the ``master`` branch.
Expand Down Expand Up @@ -411,7 +411,7 @@ To run black alone, use

.. code-block:: shell
black src/pyDataverse/file_changed.py
black pyDataverse/file_changed.py
.. _contributing_code_type-hints:
Expand All @@ -430,7 +430,7 @@ type hints. After making any change you can ensure your type hints are correct b

.. code-block:: shell
mypy src/pyDataverse/file_changed.py
mypy pyDataverse/file_changed.py
.. _contributing_code_testing-with-ci:
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
recursive-include src/pyDataverse/schemas *
recursive-include pyDataverse/schemas *
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
name = "pyDataverse"
version = "0.3.2"
description = "A Python module for Dataverse."
authors = ["Stephan Kasberger <[email protected]>"]
authors = [
"Stephan Kasberger <[email protected]>",
"Jan Range <[email protected]>",
]
license = "MIT"
readme = "README.md"
repository = "https://github.com/gdcc/pyDataverse"
packages = [{ include = "pyDataverse", from = "src" }]
packages = [{ include = "pyDataverse" }]

[tool.poetry.dependencies]
python = "^3.8.1"
httpx = "^0.27.0"
jsonschema = "^4.21.1"
urllib3 = "^2.2.1"

[tool.poetry.group.dev]
optional = true
Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Find out more at https://github.com/GDCC/pyDataverse."""

import os
import pytest
from pyDataverse.api import NativeApi
Expand All @@ -9,7 +10,7 @@ def test_config():
test_dir = os.path.dirname(os.path.realpath(__file__))
root_dir = os.path.dirname(test_dir)
test_data_dir = os.path.join(test_dir, "data")
json_schemas_dir = os.path.join(root_dir, "src/pyDataverse/schemas/json")
json_schemas_dir = os.path.join(root_dir, "pyDataverse/schemas/json")
test_data_output_dir = os.path.join(test_data_dir, "output")
invalid_filename_strings = ["wrong", ""]
invalid_filename_types = [(), [], 12, 12.12, set(), True, False]
Expand Down
26 changes: 13 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@ description = pylint for linting
deps =
-r{toxinidir}/requirements/lint.txt
commands =
pylint src/pyDataverse/
pylint pyDataverse/
pylint tests/

[testenv:mypy]
deps =
-r{toxinidir}/requirements/lint.txt
commands =
mypy src/pyDataverse/ setup.py tests/
mypy pyDataverse/ setup.py tests/

[flake8]
max-line-length = 80
ignore = E129
exclude =
src/pyDataverse/docs/source/conf.py
pyDataverse/docs/source/conf.py
.tox
.egg

Expand All @@ -73,7 +73,7 @@ deps =
commands =
pip uninstall -y flake8-pytest-style
pip uninstall -y flake8-rst-docstrings
flake8 src/pyDataverse/
flake8 pyDataverse/

[testenv:flake8_docs]
description = flake8 for style guide and docstring testing
Expand All @@ -88,7 +88,7 @@ commands =
pip uninstall -y flake8-comprehensions
pip uninstall -y flake8-requirements
pip uninstall -y flake8-return
flake8 --docstring-convention numpy src/pyDataverse/
flake8 --docstring-convention numpy pyDataverse/
flake8 --docstring-convention numpy tests/

[testenv:flake8_tests]
Expand All @@ -103,7 +103,7 @@ description = black for auto-formatting
deps =
-r{toxinidir}/requirements/lint.txt
commands =
black src/pyDataverse/
black pyDataverse/
black tests/

[testenv:pre-commit]
Expand All @@ -116,14 +116,14 @@ description = invoke sphinx-build to build the HTML docs
deps =
-r{toxinidir}/requirements/docs.txt
commands =
sphinx-build -d src/pyDataverse/docs/build/docs_doctree src/pyDataverse/docs/source docs/build/html --color -b html {posargs}
sphinx-build -d pyDataverse/docs/build/docs_doctree pyDataverse/docs/source docs/build/html --color -b html {posargs}

[testenv:pydocstyle]
description = pydocstyle for auto-formatting
deps =
-r{toxinidir}/requirements/docs.txt
commands =
pydocstyle src/pyDataverse/
pydocstyle pyDataverse/
pydocstyle tests/

[testenv:packaging]
Expand All @@ -133,7 +133,7 @@ recreate = True
deps =
-r{toxinidir}/requirements/packaging.txt
commands =
# rm -R {toxinidir}/src/pyDataverse.egg-info
# rm -R {toxinidir}/pyDataverse.egg-info
# rm -R {toxinidir}/dist
# rm -R {toxinidir}/build
python setup.py sdist bdist_wheel
Expand Down Expand Up @@ -169,28 +169,28 @@ description = Radon McCabe number
deps =
-r{toxinidir}/requirements/lint.txt
commands =
radon cc src/pyDataverse/ -a
radon cc pyDataverse/ -a

[testenv:radon-mi]
description = Radon Maintainability Index
deps =
-r{toxinidir}/requirements/lint.txt
commands =
radon mi src/pyDataverse/
radon mi pyDataverse/
radon mi tests/

[testenv:radon-raw]
description = Radon raw metrics
deps =
-r{toxinidir}/requirements/lint.txt
commands =
radon raw src/pyDataverse/
radon raw pyDataverse/
radon raw tests/

[testenv:radon-hal]
description = Radon Halstead metrics
deps =
-r{toxinidir}/requirements/lint.txt
commands =
radon hal src/pyDataverse/
radon hal pyDataverse/
radon hal tests/

0 comments on commit 6b48a9b

Please sign in to comment.