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 name #82

Merged
merged 4 commits into from
Apr 15, 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
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include pyscal_rdf/data/*.??l
include atomrdf/data/*.??l
3 changes: 3 additions & 0 deletions atomrdf/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from atomrdf.graph import KnowledgeGraph
from atomrdf.structure import System
from atomrdf.workflow.workflow import Workflow
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 10 additions & 9 deletions pyscal_rdf/graph.py → atomrdf/graph.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Graph module contains the basic RDFGraph object in pyscal_rdf. This object gets a structure
Graph module contains the basic RDFGraph object in atomrdf. This object gets a structure
as an input and annotates it with the CMSO ontology (PLDO and PODO too as needed). The annotated
object is stored in triplets.
"""
Expand All @@ -17,18 +17,19 @@
import json
import shutil
import tarfile
import pyscal_rdf.json_io as json_io

from pyscal_rdf.visualize import visualize_graph
from pyscal_rdf.network.network import OntologyNetwork
from pyscal_rdf.network.ontology import read_ontology
from pyscal_rdf.structure import System
import pyscal_rdf.properties as prp
from pyscal_rdf.stores import create_store

#from pyscal3.core import System
from pyscal3.atoms import Atoms

from atomrdf.visualize import visualize_graph
from atomrdf.network.network import OntologyNetwork
from atomrdf.network.ontology import read_ontology
from atomrdf.structure import System
import atomrdf.properties as prp
from atomrdf.stores import create_store
import atomrdf.json_io as json_io



CMSO = Namespace("http://purls.helmholtz-metadaten.de/cmso/")
PLDO = Namespace("http://purls.helmholtz-metadaten.de/pldo/")
Expand Down
2 changes: 1 addition & 1 deletion pyscal_rdf/json_io.py → atomrdf/json_io.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
import yaml
from pyscal_rdf.encoder import NumpyArrayEncoder
from atomrdf.encoder import NumpyArrayEncoder

def write_file(outfile, data):
"""
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions pyscal_rdf/network/network.py → atomrdf/network/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
import numpy as np
import os
import warnings
from pyscal_rdf.network.parser import OntoParser
from pyscal_rdf.network.term import OntoTerm, strip_name
from pyscal3.atoms import AttrSetter

from atomrdf.network.parser import OntoParser
from atomrdf.network.term import OntoTerm, strip_name

owlfile = os.path.join(os.path.dirname(__file__), "../data/cmso.owl")

def _replace_name(name):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from pyscal_rdf.network.network import OntologyNetwork
import os
from atomrdf.network.network import OntologyNetwork

#prov = OntologyNetwork('pyscal_rdf/data/prov.rdf', delimiter='#')
def read_ontology():
#read in ontologies
file_location = os.path.dirname(__file__).split('/')
Expand Down
5 changes: 3 additions & 2 deletions pyscal_rdf/network/parser.py → atomrdf/network/parser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from pyscal_rdf.network.term import OntoTerm, strip_name
from pyscal_rdf.network.patch import patch_terms

from owlready2 import get_ontology
import owlready2
Expand All @@ -9,6 +7,9 @@
import numpy as np
import itertools

from atomrdf.network.term import OntoTerm, strip_name
from atomrdf.network.patch import patch_terms


class OntoParser:
def __init__(self, infile, delimiter='/'):
Expand Down
2 changes: 1 addition & 1 deletion pyscal_rdf/network/patch.py → atomrdf/network/patch.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
These are patches specifically designed for pyscal-rdf.
These are patches specifically designed for atomrdf.

These may or may not be implemented in the ontology. As it is implemented; it can be removed
from the patches
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pyscal_rdf/stores.py → atomrdf/stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import os
#special methods; for supporting workflow envs
from pyscal_rdf.workflow import inform_graph
from atomrdf.workflow import inform_graph


def create_store(kg, store, identifier,
Expand Down
10 changes: 5 additions & 5 deletions pyscal_rdf/structure.py → atomrdf/structure.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
StructureGraph is the central object in pyscal_rdf which combines all the functionality
of :py:class:`pyscal_rdf.graph.RDFGraph` along with easy structural creation routines.
StructureGraph is the central object in atomrdf which combines all the functionality
of :py:class:`atomrdf.graph.RDFGraph` along with easy structural creation routines.
"""
import numpy as np
import copy
Expand All @@ -12,15 +12,15 @@
import shutil
import tarfile

import pyscal_rdf.json_io as json_io

import pyscal3.structure_creator as pcs
from pyscal3.grain_boundary import GrainBoundary
from pyscal3.atoms import AttrSetter
import pyscal_rdf.properties as prp
import pyscal3.core as pc
from pyscal3.core import structure_dict, element_dict

import atomrdf.json_io as json_io
import atomrdf.properties as prp

from rdflib import Graph, Literal, Namespace, XSD, RDF, RDFS, BNode, URIRef, FOAF, SKOS, DCTERMS

CMSO = Namespace("http://purls.helmholtz-metadaten.de/cmso/")
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions atomrdf/workflow/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from atomrdf.workflow.pyiron import inform_graph

9 changes: 5 additions & 4 deletions pyscal_rdf/workflow/pyiron.py → atomrdf/workflow/pyiron.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
import os
import numpy as np
from functools import partial, update_wrapper
import pyscal_rdf.workflow.workflow as wf
from pyscal_rdf.structure import _make_crystal
from pyscal_rdf.structure import System
from pyscal3.core import structure_dict, element_dict
import ast
from pyscal3.core import structure_dict, element_dict

import atomrdf.workflow.workflow as wf
from atomrdf.structure import _make_crystal
from atomrdf.structure import System

def _check_if_job_is_valid(job):
valid_jobs = ['Lammps', ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
extract_calculated_properties
inform_graph

See pyscal_rdf.workflow.pyiron for more details
See atomrdf.workflow.pyiron for more details
"""

from pyscal_rdf.structure import System
from rdflib import Graph, Literal, Namespace, XSD, RDF, RDFS, BNode, URIRef, FOAF, SKOS, DCTERMS

import warnings
Expand All @@ -24,14 +23,16 @@
import ast
import uuid

from atomrdf.structure import System

#Move imports to another file
PROV = Namespace("http://www.w3.org/ns/prov#")
CMSO = Namespace("http://purls.helmholtz-metadaten.de/cmso/")
PODO = Namespace("http://purls.helmholtz-metadaten.de/podo/")
ASO = Namespace("http://purls.helmholtz-metadaten.de/aso/")

#custom imports as needed
import pyscal_rdf.workflow.pyiron as pi
import atomrdf.workflow.pyiron as pi


class Workflow:
Expand Down
2 changes: 1 addition & 1 deletion docs/acknowledgements.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## Contributers

Please see the complete list of contributers [here](https://github.com/pyscal/pyscal_rdf/graphs/contributors).
Please see the complete list of contributers [here](https://github.com/pyscal/atomrdf/graphs/contributors).


## Acknowledgements
Expand Down
4 changes: 2 additions & 2 deletions docs/examples.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Examples

The gallery of examples below cover different ways in which pyscal-rdf can be used.
The gallery of examples below cover different ways in which atomrdf can be used.

::::{grid} 1 1 2 3
:class-container: text-center
Expand All @@ -10,7 +10,7 @@ The gallery of examples below cover different ways in which pyscal-rdf can be us
:link: ../examples/01_getting_started
:link-type: doc
:class-header: bg-light
Getting started with pyscal-rdf
Getting started with atomrdf
^^^
Learn the very basis, including the concepts of creating structures, and querying them.
:::
Expand Down
16 changes: 8 additions & 8 deletions docs/extending.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@
# Support

In case of bugs and feature improvements, you are welcome to create a
new issue on the [github repo](https://github.com/pyscal/pyscal_rdf). You
new issue on the [github repo](https://github.com/pyscal/atomrdf). You
are also welcome to fix a bug or implement a feature.

Any other questions or suggestions are welcome, please contact
[us](mailto:[email protected]).

`pyscal-rdf` welcomes and appreciates contribution and extension to the
`atomrdf` welcomes and appreciates contribution and extension to the
module. Rather than local modifications, we request that the
modifications be submitted through a pull request, so that the module
can be continuously improved.

## Reporting and fixing bugs

In case a bug is found in the module, it can be reported on the [issues
page of the repository](https://github.com/pyscal/pyscal_rdf/issues). Once a bug is reported, the status can once again monitored on
page of the repository](https://github.com/pyscal/atomrdf/issues). Once a bug is reported, the status can once again monitored on
the issues page. Additionally, you are of course very welcome to fix any
existing bugs.

## New features

If you have an idea for new feature, you can submit a feature idea
through the [issues page of the
repository](https://github.com/pyscal/pyscal_rdf/issues). As much as
repository](https://github.com/pyscal/atomrdf/issues). As much as
information as you can provide about the new feauture would be greatly
helpful. Additionally, you could also work on feature requests already
on the issues page. The following instructions will help you get started
with local feature development.

### Setting up local environment

1. The first step is to fork `pyscal-rdf`. A detailed tutorial on forking can
1. The first step is to fork `atomrdf`. A detailed tutorial on forking can
be found [here](https://help.github.com/en/articles/fork-a-repo).
After forking, clone the repository to your local machine.
2. We recommend creating a virtual environment to test new features or
Expand All @@ -42,16 +42,16 @@ with local feature development.
3. Once the environment is set up, you can create a new branch for your
feature by `git checkout -b new_feauture`.
4. Now implement the necessary feature.
5. Once done, you can reinstall `pyscal-rdf` by `pip install .`.
5. Once done, you can reinstall `atomrdf` by `pip install .`.
After that please make sure that the existing tests work by running
`pytest tests/` from the main module folder.
6. If the tests work, you are almost done! If the new feature is not
covered in existing tests, you can to write a new test in the tests
folder. `pyscal-rdf` uses pytest for tests. [This
folder. `atomrdf` uses pytest for tests. [This
link](http://doc.pytest.org/en/latest/getting-started.html) will
help you get started.
7. Add the necessary docstrings for the new functions implemented.
`pyscal-rdf` uses the [numpy docstring
`atomrdf` uses the [numpy docstring
format](https://numpydoc.readthedocs.io/en/latest/format.html) for
documentation.
8. Bonus task: Set up few examples that document how the feature works
Expand Down
14 changes: 7 additions & 7 deletions docs/gettingstarted.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# Installation

`pyscal-rdf` can be installed on Linux and Mac OS based systems. On Windows systems, it is recommended to use [Windows subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install). The following instructions will help install `pyscal-rdf`:
`atomrdf` can be installed on Linux and Mac OS based systems. On Windows systems, it is recommended to use [Windows subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install). The following instructions will help install `atomrdf`:

````{tab-set}
```{tab-item} pip
`pip install pyscal-rdf`
`pip install atomrdf`
```

```{tab-item} conda
`conda install -c conda-forge pyscal-rdf`
`conda install -c conda-forge atomrdf`
```

```{tab-item} from source
We strongly recommend creating a conda environment for the installation. To see how you can install conda see [here](https://docs.conda.io/projects/conda/en/latest/user-guide/install/).

Once a conda distribution is available, the following steps will help set up an environment to use `pyscal_rdf`. First step is to clone the repository.
Once a conda distribution is available, the following steps will help set up an environment to use `atomrdf`. First step is to clone the repository.

`git clone https://github.com/pyscal/pyscal_rdf.git`
`git clone https://github.com/pyscal/atomrdf.git`

After cloning, an environment can be created from the included file-

`cd pyscal_rdf`
`cd atomrdf`
`conda env create -f environment.yml`

This will install the necessary packages and create an environment called rdf. It can be activated by,

`conda activate rdf`

then, install `pyscal_rdf` using,
then, install `atomrdf` using,

`pip install .`
```
Expand Down
4 changes: 2 additions & 2 deletions docs/license.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# License

pyscal-rdf
atomrdf

Copyright 2022 (c) Sarath Menon $^1$, Abril Azócar Guzmán $^2$
$^1$: Max Planck Institut für Eisenforschung, Dusseldorf, Germany
Expand All @@ -10,7 +10,7 @@ pyscal-rdf is published under the MIT license:

MIT License

Copyright (c) 2023 pyscal-rdf
Copyright (c) 2023 atomrdf

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 2 additions & 4 deletions environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@ name: rdf
channels:
- conda-forge
dependencies:
- python >3.8
- pyscal3 >=3.1.5
- python >3.8, <3.12
- pyscal3 >=3.1.12
- rdflib
- pyyaml
- jupyterlab
- graphviz
- python-graphviz
- pyyaml
- ase
- networkx
- pandas
- owlready2
- jupyter-book
- plotly
- ipywidgets
- sphinx

3 changes: 1 addition & 2 deletions environment-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ channels:
- conda-forge
dependencies:
- python >3.8, <3.12
- pyscal3 >=3.1.5
- pyscal3 >=3.1.12
- pyscal-rdf
- rdflib
- pyyaml
- jupyterlab
- graphviz
- python-graphviz
- pyyaml
- ase
- networkx
- pandas
Expand Down
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ dependencies:
- jupyterlab
- graphviz
- python-graphviz
- pyyaml
- ase
- networkx
- pandas
Expand Down
Loading
Loading